Kenneth Graunke
02435f1294
iris: Require a 4K alignment for extra clear color BOs.
...
Apparently, we've been requiring a 4K alignment for internally allocated
clear color addresses to work around some unknown issues. There's a
comment to that effect in iris_resource_create_with_modifiers().
When importing a dmabuf and tacking on an additional clear color BO, we
only required an alignment of 1. This wasn't a problem for a long time
because all BO allocations were naturally aligned to the 4K page size.
However, once we enabled suballocation, we were able to allocate "BOs"
at 256B granularity, making this no longer 4K aligned. Increase the
alignment requirement to 4K to match the behavior of our normal
allocations and also our previous behavior.
Fixes Piglit's ext_image_dma_buf_import-intel-modifiers.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5482
Fixes: ce2e2296ab ("iris: Suballocate BO using the Gallium pb_slab mechanism")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13326 >
2021-10-13 18:46:03 +00:00
Caio Marcelo de Oliveira Filho
94e07058ee
intel/compiler: Remove unused ret declaration
...
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13340 >
2021-10-13 17:24:29 +00:00
Caio Marcelo de Oliveira Filho
bd2cc4b916
intel/compiler: Convert test_eu_compact to use gtest
...
Be consistent with the other test suites in intel/compiler.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13340 >
2021-10-13 17:24:29 +00:00
Mike Blumenkrantz
420e33f551
radv: move alpha_adjust into conditional during vertex input updating
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13320 >
2021-10-13 17:03:26 +00:00
Mike Blumenkrantz
1b8bdecf6e
radv: add a mask of bound descriptor buffers for dynamic vertex input
...
unnecessarily dereferencing the vertex buffer info array here causes a
ton of cpu overhead due to bad cache locality, so just use a mask to
avoid loading X more cachelines into memory unnecessarily
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13320 >
2021-10-13 17:03:26 +00:00
Mike Blumenkrantz
eda5634e25
radv: pre-calc "simple" dynamic vertex input values
...
when the shader pipeline is known to not require any of the more complex
calculations, those calculations can be excluded from the dynamic update
code
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13320 >
2021-10-13 17:03:26 +00:00
Mike Blumenkrantz
c335a4d70e
radv: dynamically calculate misaligned_mask for dynamic vertex input
...
this avoids incurring overhead at draw time, instead shifting it to vertex
binding commands
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13320 >
2021-10-13 17:03:26 +00:00
Mike Blumenkrantz
90d9c8dc62
radv: don't use invalid stride for triggering vertex state change
...
NULL here means this was regular CmdBindVertexBuffers, so the stride
cannot be used
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13320 >
2021-10-13 17:03:26 +00:00
Adam Jackson
27054f737a
egl/dri: Enable FP16 for EGL_EXT_platform_device
...
Why is this not the same code as EGL_MESA_platform_surfaceless.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13182 >
2021-10-13 16:36:27 +00:00
Adam Jackson
ea038747df
dri: Remove the allow_fp16_configs option, always allow them
...
There's no danger of accidentally using these, the default pixel format
is integer and if you want float you need to have explicitly asked for
it in eglChooseConfig.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13182 >
2021-10-13 16:36:27 +00:00
Adam Jackson
b01fe97a39
wsi/x11: Fetch and discard the SYNC extension info
...
Since we're not checking for this, xcb has to do it for us the first
time we call xcb_sync_destroy_fence, which puts a blocking round-trip in
the swapchain destroy path for no reason. Check for the extension so we
have the extension's opcode cached when we need it.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13339 >
2021-10-13 16:11:11 +00:00
Lone_Wolf
ebfbb42e0e
clover: TargetRegistry.h was moved to another folder
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13290 >
2021-10-13 15:41:49 +00:00
Emma Anholt
cdc009f5aa
Revert "ci: Add osmesa to Windows GitLab CI"
...
This reverts commit 90faabc0ee . It has been
flaky and producing timeouts. (See
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/14634204 for an example)
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13318 >
2021-10-13 15:01:52 +00:00
Lionel Landwerlin
9fb2c84768
isl: only bump the min row pitch for display when not specified
...
If the ISL caller didn't specify a row_pitch_B, let's use the
NVIDIA/AMD requirements. Otherwise keep using the Intel requirement,
as the caller is likely trying to import a buffer and if we can deal
with that row_pitch_B, we should accept it.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: a3a4517f41 ("isl: Work around NVIDIA and AMD display pitch requirements")
Reported-by: Dongwon Kim <dongwon.kim@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13024 >
2021-10-13 14:46:49 +00:00
Lionel Landwerlin
47ff6767ea
anv: fill correct surface state for lowered storage image
...
Small typo/copy-paste.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: c0093c4668 ("anv: Flip around the way we reason about storage image lowering")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13332 >
2021-10-13 14:33:14 +00:00
Bas Nieuwenhuizen
fd8210f27e
radv: Try to do a better job of dealing with L2 coherent images.
...
Only try to invalidate L2 if we actually hit one of the incoherent images.
Note we may actually insert some extra flushes at the end of a command
buffer so that we may asume the caches are clean the start of the next
command buffer. However, on average I think that case is uncommon
enough that being able to make assumptions at the start of a cmdbuffer
is beneficial. Especially since MSAA is somewhat rare in more recent
games.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13239 >
2021-10-13 14:07:05 +00:00
Bas Nieuwenhuizen
64b237436a
radv: Add hooks after in-renderpass meta operations.
...
So that we can mark the rendertargets dirty.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13239 >
2021-10-13 14:07:05 +00:00
Bas Nieuwenhuizen
3de7ba13f5
radv: Document cache coherency rules.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13239 >
2021-10-13 14:07:05 +00:00
Hyunjun Ko
30b4911031
turnip: enable strictLines
...
Now we can enable strictLines as we set rectangular lines by default.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6020 >
2021-10-13 12:18:01 +00:00
Hyunjun Ko
542211676c
turnip: enable VK_EXT_line_rasterization
...
By default line mode is VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT,
when lineRasterizationMode is VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT
and primtype is line - we enable bresenham line mode.
We have to disable MSAA when bresenham lines are used, this is
a hardware limitation and spec allows it:
"When Bresenham lines are being rasterized, sample locations may
all be treated as being at the pixel center (this may affect
attribute and depth interpolation)."
This forces us to re-emit msaa state when line mode is changed.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6020 >
2021-10-13 12:18:01 +00:00
Hyunjun Ko
88afceacf0
freedreno/a5xx,a6xx: rename MSAA_ENABLE to LINE_MODE in GRAS_SU_CNTL
...
This bit seems like the control for line mode of rastrization.
That can be simply figured out by comparing
dEQP-VK.rasterization.primitives.no_stipple.bresenham_lines,
dEQP-VK.rasterization.primitives.no_stipple.rectangular_lines and
dEQP-VK.rasterization.primitives.no_stipple.lines.
For opengl, the value of bresenham lines mode, which is 0, is set
by default and the value of rectangular mode, which is 0x1, is set
when multi-sampled.
For vulkan, the bresenham lines are enabled when lineRasterizationMode is
VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT, which sets the bit to 0, while
the value is 1 when it's VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT,
that seems to be default.
If both multi-sampled and bresenham-lines are used when primitive type is
line, the bit is to be set as 0 and makes msaa disabled.
Note that this is only tested on a6xx, but I guess it's likely the same
for a5xx.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6020 >
2021-10-13 12:18:01 +00:00
Tapani Pälli
d729038c07
anv: use vk_object_zalloc for wsi fences created
...
Otherwise we hit assert in vk_object_base_assert_valid when attemping to
create handle from anv_fence with unknown base type.
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13330 >
2021-10-13 11:59:17 +00:00
Emma Anholt
4721352f97
radeonsi: Fix leak of screen->perfcounters.
...
A refactor dropped one of the frees.
Fixes: 380ac28891 ("ac: import performance counters from RadeonSI")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13322 >
2021-10-13 11:01:19 +00:00
Yipeng Chen (Jasber)
33484a327e
radeonsi: do not use staging texture for APU
...
This is to fix serious performance drop of texture_upload/
texture_resue relative items in chromeos glbench test.
Staging texture is not efficient for CPU uploading.
Signed-off-by: Jasber Chen <yipeng.chen@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13306 >
2021-10-13 10:45:04 +00:00
Marek Olšák
80efe661d7
radeonsi: simplify write_psize code in si_get_vs_out_cntl
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12789 >
2021-10-13 10:28:14 +00:00
Marek Olšák
824d9bed4f
radeonsi: simplify how VS_OUT_CCDIST is set
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12789 >
2021-10-13 10:28:14 +00:00
Arvind Yadav
8f9945a75b
radeonsi: remove the use of PKT3_CONTEXT_REG_RMW
...
This patch is to to remove PKT3_CONTEXT_REG_RMW from radeonsi.
and avoid multiple command buffer(PM4 packet)creation for R_02881C_PA_CL_VS_OUT_CNTL.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Signed-off-by: Arvind Yadav <arvind.yadav@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12789 >
2021-10-13 10:28:14 +00:00
Timur Kristóf
411c081e97
drirc: Apply radv_invariant_geom workaround to World War Z games.
...
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5433
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13312 >
2021-10-13 08:55:33 +00:00
Timur Kristóf
bbce747a0d
drirc: Apply radv_invariant_geom workaround to Resident Evil Village.
...
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5071
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13312 >
2021-10-13 08:55:33 +00:00
Timur Kristóf
574c6612ae
drirc: Fix indentation.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13312 >
2021-10-13 08:55:33 +00:00
Marek Olšák
84d0f54e75
ac/surface: enable better display DCC for chips newer than Yellow Carp
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13214 >
2021-10-13 06:20:13 +00:00
Marek Olšák
a18a7626a2
ac/surface: disallow display DCC for big resolutions
...
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13214 >
2021-10-13 06:20:13 +00:00
Marek Olšák
1a8df6f1be
ac/surface: always use suboptimal display DCC with DRM <= 3.43.0
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13214 >
2021-10-13 06:20:13 +00:00
Tapani Pälli
840c79fc9b
anv/android: fix parameters given for vk_common_QueueSubmit
...
Common queue submit expects pWaitDstStageMask to be set per each
semaphore (as per Vulkan spec) and crashes if these are not given
properly.
This fixes crashes seen when running vulkan apps on Android.
v2: change the VkPipelineStageFlags given (Lionel)
Fixes: b996fa8efa ("anv: implement VK_KHR_synchronization2")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13305 >
2021-10-13 06:00:56 +00:00
Kyle Brenneman
e28ce12afa
Remove the shebang from eglFunctionList.py.
...
eglFunctionList.py isn't executed directly, so it doesn't need a shebang
line.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13130 >
2021-10-13 05:34:27 +00:00
Kyle Brenneman
06309e0f26
Add copyright comments to the GLVND-related files.
...
A few of the GLVND-related files were missing a copyright comment at the
top. Copy the same MIT license text from gen_egl_dispatch.py et. al.
https://gitlab.freedesktop.org/mesa/mesa/-/issues/5267
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13130 >
2021-10-13 05:34:27 +00:00
Rhys Perry
d9c7a17542
radv: enable VK_EXT_vertex_input_dynamic_state
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4768
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
d3c0cbbc84
radv: implement VK_EXT_vertex_input_dynamic_state
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
d45958f82e
aco: implement VS input loads with prologs
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
f4ea2d7887
aco: implement aco_compile_vs_prolog
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
f6f6f18e55
radv: add pre-compiled vertex shader prologs for common states
...
This lets us pre-compile a prolog and avoid a hash table lookup during
command buffer recording, most of the time.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
80841196b2
radv: implement dynamic vertex input state using vertex shader prologs
...
This doesn't actually use the functionality or implement prolog
compilation yet.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
2b8d88ed91
radv: move VS specific input SGPRs first
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
a1069b8bd4
radv: add segregated fit shader memory allocator
...
Way faster than the previous one, especially with a large number of
shaders.
This doesn't have much of an effect right now, but the previous allocator
was expensive compared to the cost of compiling vertex shader prologs.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
404752bfb2
radv: add radv_shader_variant_get_va and radv_find_shader_variant helpers
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
d1f09419b4
radv: add radv_translate_vertex_format()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
6bfacb60ee
radv: add and use radv_vs_input_alpha_adjust
...
Unlike ac_fetch_format, this enum can be packed into two bits.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Rhys Perry
1988a78430
aco: fix vadd32() when b is neither a constant nor temporary
...
This will be useful for compiling vertex shader prologs, where we
basically use ACO as an assembler.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Qiang Yu
50c0451424
nir/linker: rename replace_constant_input to replace_varying_input_by_constant_load
...
To align with replace_varying_input_by_uniform_load and better
describe what it does.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12613 >
2021-10-13 04:45:15 +00:00
Qiang Yu
2604625043
nir/linker: support uniform when optimizing varying
...
Varying assigned from uniform won't change after interpolation,
so move uniform load to fragment shader to eliminate the varying.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12613 >
2021-10-13 04:45:15 +00:00
Qiang Yu
3127282944
mesa/st: delay nir spirv link
...
Following commit for st_nir_link_shaders->nir_link_opt_varyings
may copy uniform variable from one shader to another, so delay
the nir_spirv link which contains mesa uniform information
update (gl_nir_link_uniforms) after it and align with glsl link.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12613 >
2021-10-13 04:45:15 +00:00
Felix DeGrood
5bf6987873
anv: dirty only state impacted by blorp_exec
...
Instead of dirtying all state after blorp operations,
avoid dirtying state that blorp never touches.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5077
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12567 >
2021-10-13 04:31:34 +00:00
Filip Gawin
fab1ad1a11
r300: fixes for UB caused by left shifts
...
r300_vs.c:252:37: runtime error: left shift of negative value -1
r300_state.c:1824:66: runtime error: left shift of 63112 by 16 places
cannot be represented in type 'int'
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13308 >
2021-10-13 04:17:33 +00:00
Marek Olšák
b378d6c5db
radeonsi: fix an out-of-bounds access in si_create_vertex_state
...
Fixes: fb8f532ea1 - radeonsi: implement draw_vertex_state for lower display list overhead
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5484
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13309 >
2021-10-13 03:57:30 +00:00
Marek Olšák
c85ce2531e
radeonsi: align pipe_resource & sampler_view allocations to a cache line
...
It eliminates "False Sharing" for atomic operations. (see wikipedia)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11618 >
2021-10-13 03:26:20 +00:00
Marek Olšák
8c6e18bc51
util,gallium: put count in pipe_resource & sampler_view on its own cache line
...
This adds 60 bytes to both structures. It eliminates "False Sharing"
for atomic operations (see wikipedia).
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11618 >
2021-10-13 03:26:20 +00:00
Daniel Schürmann
b34a3459f8
driconf: set vk_x11_strict_image_count for Wolfenstein: Youngblood
...
Otherwise, the game refuses to start on xwayland.
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13289 >
2021-10-13 02:44:48 +00:00
Filip Gawin
28a6e45a0f
nir: avoiding reading unitialized memory when using nir_dest_copy
...
Deeper in chain of calls, function "src_has_indirect" is used (which
reads "is_ssa" and "reg.indirect").
Fixes: d1eae6f36b ("nir: Properly clean up nir_src/dest indirects")
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13317 >
2021-10-13 02:21:20 +00:00
Danylo Piliaiev
9539315f97
turnip: fix streamout buffer offset calculations
...
Fixes vkd3d test "test_vbv_stride_edge_cases"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13315 >
2021-10-13 01:46:03 +00:00
Emma Anholt
62949e7519
ci: Update piglit to 7d7dd2688c214e1b3c00f37226500cbec4a58efb.
...
This brings in a bunch of i915g spurious fail fixes, fixes for !12613 , and
new tests.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13253 >
2021-10-13 00:37:59 +00:00
Emma Anholt
613b9c8c47
ci: Update deqp to vulkan-cts-1.2.7.1.
...
Brings in some VK fixes for tilers.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13253 >
2021-10-13 00:37:59 +00:00
Jason Ekstrand
a00f4c6f7d
vulkan/wsi/display: Delete the wrapper entrypoints
...
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
8abeecf505
vulkan/wsi/wayland: Delete the wrapper entrypoints
...
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
8ade418144
vulkan/wsi/x11: Delete the wrapper entrypoints
...
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
1680cd907d
vulkan/wsi/common: Delete the wrapper entrypoints
...
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
1f2ef68bab
venus: Use the common WSI wrappers
...
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
8c4d78c764
lavapipe: Use the common WSI wrappers
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
1f06554df7
panvk: Use the common WSI wrappers
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
dfed852ddf
v3dv: Use the common WSI wrappers
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
531437d7f6
turnip: Use the common WSI wrappers
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
fbfd761461
radv: Use the common WSI wrappers
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
a64d90026b
anv: Use the common WSI wrappers
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
75955c6685
vulkan/wsi: Add common wrappers for most entrypoints
...
For a long time, our Vulkan WSI code has acted as something of a layer.
The WSI code calls into various Vulkan entrypoints inside the driver to
create images, allocate memory, etc. It then implements the API-facing
interface almost entirely. The only thing the driver has to provide is
little wrappers that wrap around the WSI calls to expose them through
the API.
However, now that we have a common dispatch framework, we can implement
entrypoints directly in the WSI code. As long as the driver uses
vk_instance, vk_physical_device, and vk_device, we can provide common
wrappers for the vast majority of entrypoints. The only exceptions are
vkAcquireNextImage, vkQueuePresent, vkRegisterDeviceEventEXT, and
vkRegisterDisplayEventEXT because those may have to manually poke at
synchronization primitives. We provide wrappers for vkAcquireNextImage
and vkQueuePresent because some drivers can use the default versions.
For now, we're intentionally avoiding any link-time dependencies between
WSI and the common code. We only use VK_FROM_HANDLE and associated
inline helpers and vk_physical_device has a pointer to a wsi_device.
Eventually, we may tie the two together closer, but this lets us get 95%
of the way there without reworking the universe.
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
020fbb9ea1
vulkan/wsi: Add a dispatch table for WSI entrypoints
...
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Jason Ekstrand
916c9335b4
meson: Add and use an idep for Vulkan WSI
...
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234 >
2021-10-13 00:06:15 +00:00
Ella-0
17dcdb000a
v3dv: enable VK_KHR_surface_protected_capabilities
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13298 >
2021-10-12 22:12:46 +00:00
Eric Engestrom
9aee7855d2
egl: implement EGL_EXT_present_opaque on wayland
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: James Jones <jajones@nvidia.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12373 >
2021-10-12 21:40:54 +00:00
Eric Engestrom
fe46280748
egl: sync eglext.h & egl.xml from Khronos
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12373 >
2021-10-12 21:40:54 +00:00
Emma Anholt
d071a241f4
ci/freedreno: Disable the minetest trace due to flaky shader code.
...
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4595
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13316 >
2021-10-12 20:50:17 +00:00
Nanley Chery
d7e836443a
iris: Tile cache flush for depth before fast clear
...
Instead of doing a tile cache flush after slow clears or when the clear
value changes, do it before every fast clear of a HIZ_CCS_WT surface.
This agrees with the Bspec.
Fixes: c85ea824bc ("iris: reduce redundant tile cache flushes")
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11539 >
2021-10-12 18:05:46 +00:00
Nanley Chery
10be870c72
anv: Tile cache flush for depth before fast clear
...
Instead of doing a tile cache flush after slow clears, resolves, and
ambiguates, do it before fast clears of HIZ_CCS_WT surfaces. This agrees
with the Bspec.
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11539 >
2021-10-12 18:05:46 +00:00
Nanley Chery
81e9c25c1b
anv: Allow HIZ_CCS_WT with subpass self-dependencies
...
This unblocks later commits that aim to align the driver with the tile
cache flushing requirements in the Bspec.
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11539 >
2021-10-12 18:05:46 +00:00
Danylo Piliaiev
4218596671
ir3/freedreno: handle non-uniform a1en instructions
...
Fixes vkd3d test "test_bindless_samplers_sm51"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13311 >
2021-10-12 17:43:52 +00:00
Danylo Piliaiev
f0d469e85f
ir3/freedreno: handle non-uniform resinfo
...
We forgot to handle non-uniform resinfo case.
Fixes vkd3d test "test_bindless_bufinfo_sm51"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13311 >
2021-10-12 17:43:52 +00:00
Timur Kristóf
ca6ef505ff
aco/optimizer: Skip SDWA on v_lshlrev when unnecessary in apply_extract.
...
In the following cases:
- lower 16 bits are extracted and the shift amount is 16 or more
- lower 8 bits are extracted and the shift amount is 24 or more
the undesireable upper bits are already shifted out, and therefore
there is no need to add SDWA to the v_lshlrev instruction.
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 58239 (45.27% of 128647) affected shaders:
CodeSize: 153498624 -> 153265616 (-0.15%); split: -0.15%, +0.00%
Instrs: 29636304 -> 29578064 (-0.20%); split: -0.20%, +0.00%
Latency: 136931496 -> 136876379 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 21134367 -> 21078861 (-0.26%); split: -0.26%, +0.00%
Copies: 2777550 -> 2777548 (-0.00%); split: -0.00%, +0.00%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13121 >
2021-10-12 16:27:50 +00:00
Timur Kristóf
5de91cfc04
ac/nir/nggc: Write undef to variables in non-repacked ES threads.
...
This helps the compiler generate a little bit more efficient code.
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 4659 (3.62% of 128647) affected shaders:
CodeSize: 7468320 -> 7404484 (-0.85%); split: -0.88%, +0.03%
Instrs: 1423425 -> 1407454 (-1.12%); split: -1.16%, +0.03%
Latency: 5250593 -> 5226163 (-0.47%); split: -0.47%, +0.00%
InvThroughput: 739848 -> 733373 (-0.88%); split: -0.90%, +0.02%
Copies: 200139 -> 190307 (-4.91%); split: -5.13%, +0.22%
Branches: 87925 -> 85998 (-2.19%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13121 >
2021-10-12 16:27:50 +00:00
Timur Kristóf
783f8f728c
ac/nir/cull: Accept NaN and +/- Inf in face culling.
...
When the determinant that we use for calculating triangle area
is NaN, it's not possible to decide the facing of the triangle.
This can happen when a coordinate of one of the triangle's vertices
is INFINITY. It's better to just accept these triangles in the shader
and let the PA deal with them.
Let's do the same for +/- Infinity too.
Though we haven't seen this yet, it may be troublesome as well.
Fixes: 651a3da1b5
Closes : #5470
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13299 >
2021-10-12 15:23:52 +00:00
Bas Nieuwenhuizen
33065149c1
amd/common: Add fallback for misreported clocks for RGP.
...
Traces with clock = 0 are totally useless due to RGP getting very
confused.
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13301 >
2021-10-12 12:28:04 +00:00
Connor Abbott
f8e9a50322
ir3: Fold ldc src immediates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
470bf75ff8
ir3: Fix handling cat6 immediates
...
We were treating them the same as regular cat2/cat3/cat4 immediates, but
that's not right because cat6 sources are only 8 bits.
Our bindless code was handling this before for bindless resources, and
it was disabled for most other things, so this was mostly harmless, but
fixing it will be necessary for handling ldc offsets.
In addition enable tests for this that were just commented out, and add
a custom test making sure that the immediate source is treated as
unsigned.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
bf3c8e3705
ir3: Fix check for immediate range
...
This would incorrectly allow both e.g. 0x2000 and 0xffffe000 to be
encoded as 0x2000.
Fixes: f0a1f3de27 ("freedreno/ir3: cp small negative integers too")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
6dc56f18bc
ir3/legalize: handle WAR for special regs
...
In particular many cat5/cat6 instructions read a1.x, and we need to add
a (ss) before any mova1 instruction afterwards, as the blob does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
1ed9a2f50c
ir3: Handle special regs in regmask
...
Use the same hack as post-RA scheduling.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
a37f9602b7
ir3: Remove separate regmask.h
...
Inline it into its one user. There's no point in keeping it separate,
and in order to handle special registers it will have to become a bit
more intertwined with core ir3.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
548377bcf3
ir3: Always create barycentrics in the input block
...
Otherwise, when there are uses in multiple blocks the collect may not
dominate some of the uses.
This is a bugfix, but before it would've mattered only in weird
scenarios with interpolateAt*. When we start moving prefetch textures
into the block before the preamble it will start to matter more, because
it will need to read the barycentrics from a different block than the
bary.f instructions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
38a84723f1
ir3: Make ir3_create_collect() take a block
...
There's no reason to make this any different from the other builders,
since it just creates a collect instruction, and in the next commit
we'll need to create a collect in the first block for prefetch textures.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
8fb99b58df
ir3: Fix printing branch type
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
b516208a55
nir/lower_ubo_vec4: Fix align_mul=8 special case
...
In order for the load to never straddle the load can't extend past 8
bytes, not 16. For example a vec2 load with align_mul = 8 and
align_offset = 4 can straddle.
Fixes assertion failures when we stop pushing UBOs in the preamble on
a6xx.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
751f425c37
ir3/cp: Fix inlining 32->16 const into meta instructions
...
We shouldn't return early here, because we still need to actually do the
conversion. Fixes an infinite loop.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Connor Abbott
ab0a665615
ir3/cp: Add missing const promotion check
...
We need to check the source type for moves when the destination type is
u16, just like the f16 check above.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142 >
2021-10-12 11:30:52 +00:00
Joshua Ashton
1d9bd8b262
radv: Do early and late tests for fast clears
...
We don't know some information regarding DCC image stores and therefore fast clears until we know the surface info.
We should work towards eliminating this, but the cases where this will hit on GFX10_3 is basically 0.
Finally fixes a perf regression in Doom Eternal.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13283 >
2021-10-12 10:59:32 +00:00
Samuel Pitoiset
49c3a88fad
radv: implement VK_KHR_format_feature_flags2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13194 >
2021-10-12 10:20:47 +00:00
Samuel Pitoiset
5dee0d9da9
radv: switch to VK_FORMAT_FEATURE_2_XXX/VkFormatProperties3KHR
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13194 >
2021-10-12 10:20:47 +00:00
Samuel Pitoiset
cd4a52b52c
radv: remove duplicated code about NGG passthrough determination
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243 >
2021-10-12 09:09:26 +02:00
Samuel Pitoiset
6bfe65d1dc
radv: do not initialize is_ngg_passthrough for geometry shaders
...
Geometry shaders can't be NGG passthrough at all.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243 >
2021-10-12 09:09:25 +02:00
Samuel Pitoiset
b3269444fd
aco: cleanup setup_vs_output_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243 >
2021-10-12 09:09:23 +02:00
Samuel Pitoiset
849832bc89
radv: stop gathering output GS info for vertex shaders
...
This has no effect.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243 >
2021-10-12 09:09:21 +02:00
Samuel Pitoiset
595b16013a
radv: rename needs_multiview_view_index to uses_view_index
...
To avoid confusion with radv_pipeline_key::has_multiview_view_index.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243 >
2021-10-12 09:09:19 +02:00
Samuel Pitoiset
960d7bf2d3
radv: remove no-op about the view index in the shader info pass
...
The view index is always lowered to map the layer ID for fragment
shaders. This was never reached.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243 >
2021-10-12 09:09:17 +02:00
Samuel Pitoiset
61a3e75242
radv,aco: remove nir_intrinsic_load_layer_id
...
This was never used because the layer ID isn't a system value.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243 >
2021-10-12 09:09:15 +02:00
Bas Nieuwenhuizen
ad0bd2a7d2
radv: Handle copying zero queries.
...
Looks like this is allowed.
Fixes: 8475a14302 ("radv: Implement pipeline statistics queries.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12907 >
2021-10-11 23:27:45 +00:00
Esme Xuan Lim
1c3ee13a7f
docs/panfrost: Fix link to use rst syntax
...
Currently the link uses markdown syntax to direct users to IRC, switch
to IRC to render this correctly.
Fixes: e39929663b ("docs/panfrost: Add web chat link")
Signed-Off by: Esme Xuan Lim <esmethedev@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13296 >
2021-10-11 23:03:57 +00:00
Vinson Lee
c30fb8ee4d
freedreno: Add valgrind dependency.
...
Fix a build error.
In file included from ../src/util/u_queue.h:38,
from ../src/freedreno/drm/freedreno_ringbuffer.h:33,
from ../src/freedreno/ds/fd_pps_driver.h:13,
from ../src/freedreno/ds/fd_pps_driver.cc:7:
../src/util/simple_mtx.h:35:12: fatal error: valgrind.h: No such file or directory
35 | # include <valgrind.h>
| ^~~~~~~~~~~~
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13280 >
2021-10-11 19:20:23 +00:00
Iván Briano
0b75b88651
vulkan: Generate defines for aliases of promoted enums
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13264 >
2021-10-11 18:14:06 +00:00
Iván Briano
1c2cd8bc16
vulkan: fix handling of aliases in enum members
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13264 >
2021-10-11 18:14:06 +00:00
Connor Abbott
d4b5d2a020
ir3/ra: Use killed sources in register eviction
...
Let's assume we have a vec2 collect instruction with killed sources that
are non-contiguous and the entire rest of the register file is blocked,
which can happen when our register target is very tight. It's impossible
to just insert move instructions to resolve this, but we can make space
by swapping one of the killed sources with the value next to the other,
assuming it's also scalar.
This commit implements that idea, preventing us from falling back to the
terrible shuffle-everything approach in this case.
total instructions in shared programs: 1566648 -> 1565117 (-0.10%)
instructions in affected programs: 13332 -> 11801 (-11.48%)
helped: 30
HURT: 5
helped stats (abs) min: 6 max: 535 x̄: 51.77 x̃: 25
helped stats (rel) min: 2.67% max: 33.63% x̄: 12.28% x̃: 9.58%
HURT stats (abs) min: 1 max: 6 x̄: 4.40 x̃: 6
HURT stats (rel) min: 0.18% max: 5.13% x̄: 2.41% x̃: 2.13%
95% mean confidence interval for instructions value: -75.05 -12.43
95% mean confidence interval for instructions %-change: -13.18% -7.18%
Instructions are helped.
total mov in shared programs: 77336 -> 76683 (-0.84%)
mov in affected programs: 2135 -> 1482 (-30.59%)
helped: 29
HURT: 5
helped stats (abs) min: 2 max: 227 x̄: 23.31 x̃: 10
helped stats (rel) min: 6.06% max: 72.73% x̄: 31.83% x̃: 30.00%
HURT stats (abs) min: 2 max: 9 x̄: 4.60 x̃: 4
HURT stats (rel) min: 14.29% max: 69.23% x̄: 34.00% x̃: 27.78%
95% mean confidence interval for mov value: -33.21 -5.20
95% mean confidence interval for mov %-change: -32.94% -11.35%
Mov are helped.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13143 >
2021-10-11 16:54:37 +00:00
Connor Abbott
214febdc5d
ir3/ra: Don't reset round-robin start for each block
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13143 >
2021-10-11 16:54:37 +00:00
Connor Abbott
decbced48f
ir3: Initialize local size earlier
...
We need the local size in RA for occupancy calculations. Not
initializing these had the unfortunate consequence of
ir3_get_reg_independent_max_waves() returning 0 for compute shaders with
shared variables, disabling the register limiting logic.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13143 >
2021-10-11 16:54:37 +00:00
Lionel Landwerlin
ce3dd1375f
anv: implement VK_KHR_format_feature_flags2
...
v2: fix SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR (Ivan)
v3: Fixup VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR setting (Ivan)
Add missing drm-modifiers/android bits (Lionel)
v4: Avoid duplicating get_ahw_buffer_format_properties() (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:29:12 -05:00
Lionel Landwerlin
01d1ec292a
anv: start computing KHR_format_features2 flags for storage images
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:29:12 -05:00
Jason Ekstrand
c0093c4668
anv: Flip around the way we reason about storage image lowering
...
There are roughly two cases when it comes to storage images. In the
easy case, we have full hardware support and we can just emit a typed
read/write message in the shader and we're done. In the more complex
cases, we may need to fall back to a typed read with a different format
or even to a raw (SSBO) read.
The hardware has always had basically full support for typed writes all
the way back to Ivy Bridge but typed reads have been harder to come by.
Starting with Skylake, we finally have enough that we at least have a
format of the right bit size but not necessarily the right format so we
can use a typed read but may still have to do an int->unorm or similar
cast in the shader.
Previously, in ANV, we treated lowered images as the default and write-
only as a special case that we can optimize. This flips everything
around and treats the cases where we don't need to do any lowering as
the default "vanilla" case and treats the lowered case as special.
Importantly, this means that read-write access to surfaces where the
native format handles typed writes now use the same surface state as
write-only access and the only thing that uses the lowered surface state
is access read-write access with a format that doesn't support typed
reads. This has the added benefit that now, if someone does a read
without specifying a format, we can default to the vanilla surface and
it will work as long as it's a format that supports typed reads.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:29:09 -05:00
Lionel Landwerlin
fa251cf111
intel/nir: allow unknown format in lowering of storage images
...
We're about to allow unknown format for specific formats in Anv.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:29:09 -05:00
Lionel Landwerlin
0f8efc2b08
anv: switch to use VkFormatFeatureFlags2KHR internally
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:29:09 -05:00
Jason Ekstrand
35315c68a5
anv: Use the common wrapper for GetPhysicalDeviceFormatProperties
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:29:07 -05:00
Jason Ekstrand
1d4d71057b
vulkan: Generate #defines with every bit in a given bitfield
...
This is useful when trying to restrict from VkFoo2 to VkFoo.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:29:05 -05:00
Jason Ekstrand
2741762ca9
vulkan: Generate flag #defines based on bitwidth
...
Instead of basing it on a fixed list, just generate #defines for every
bitfield that's 64-bit. As part of this refactor, we rework things a
bit to record all bitfields and just not do anything with them if
they're not 64-bit.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198 >
2021-10-11 10:28:58 -05:00
Samuel Pitoiset
ced950e42f
radv: store the post-processed shader binary config to the cache
...
This will allow us to reduce the size of radv_shader_info which is
stored in the cache entry.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12992 >
2021-10-11 12:25:41 +00:00
Samuel Pitoiset
1585629db2
radv: move ac_shader_config to radv_shader_binary instead of legacy
...
This will allow us to avoid postprocessing binaries when they are
loaded from the shaders cache.
LLVM binaries already contain the shader config as part of the ELF,
so it's duplicated and increase the cache entry by 48 bytes. Though,
I don't think that should matter for LLVM.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12992 >
2021-10-11 12:25:41 +00:00
Joshua Ashton
77e5f149eb
ac/surface: Expose modifiers capable of DCC image stores first
...
These also have a higher compressed block size.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13056 >
2021-10-11 11:43:39 +00:00
Joshua Ashton
f63ec0128c
radv: Respect max extent for modifiers
...
Some of our modifiers only support upto a certain range, expose this in ImageFormatProperties.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13056 >
2021-10-11 11:43:39 +00:00
Joshua Ashton
baff748cb0
radeonsi: Check if modifier supports the image extent
...
DCN only supports an extent < 4K on !64B && 128B.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13056 >
2021-10-11 11:43:39 +00:00
Joshua Ashton
9cffe1b9ea
ac/surface: Add ac_modifier_max_extent
...
Currently, we aren't checking if the modifier supports the extent of the image.
DCN only works with !64B && 128B on extents < 4K.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13056 >
2021-10-11 11:43:39 +00:00
Connor Abbott
0450c1b8a2
tu: Expose VK_KHR_shader_subgroup_extended_types
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13271 >
2021-10-11 11:00:56 +00:00
Connor Abbott
bbd8301337
ir3: Skip src size validation for cat1
...
They are already handled below, like cat6. The default rules won't work
for the READ_* macros once they have 16-bit sources.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13271 >
2021-10-11 11:00:56 +00:00
Connor Abbott
bf0013f3c5
ir3/lower_subgroups: Support 16-bit READ_* sources
...
With VK_EXT_shader_subgroup_extended_types these will have 16-bit
sources that need to be expanded to 32-bit (and then narrowed again).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13271 >
2021-10-11 11:00:56 +00:00
Marcin Ślusarz
3b9b6db031
anv: fix potential integer overflow
...
Description by Coverity:
"Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression 1 << b with type int
(32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
a context that expects an expression of type VkAccessFlags2KHR (64 bits,
unsigned)"
CID: 1492745
CID: 1492748
Fixes: b996fa8efa ("anv: implement VK_KHR_synchronization2")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13284 >
2021-10-11 10:30:48 +00:00
Samuel Pitoiset
c89616c98d
radv: use nir_ssa_undef() for unused image components in meta shaders
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12561 >
2021-10-11 09:47:06 +00:00
Samuel Pitoiset
f741c04ed1
radv: use get_global_ids() to compute coordinates in meta shaders
...
This was duplicated everywhere.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12561 >
2021-10-11 09:47:06 +00:00
Samuel Pitoiset
80df2110b1
radv: remove few useless nir_channels() in meta shaders
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12561 >
2021-10-11 09:47:06 +00:00
Samuel Pitoiset
b3af3b1863
radv: remove useless coordinate computation in the compute clear path
...
Global Z is always 0.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12561 >
2021-10-11 09:47:06 +00:00
Samuel Pitoiset
ef2e7f7652
radv: use nir_image_deref_{load,store} in the DCC retile compute path
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12561 >
2021-10-11 09:47:06 +00:00
Samuel Pitoiset
6b9e12ea25
radv: advertise VK_KHR_maintenance4
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13193 >
2021-10-11 08:25:46 +00:00
Samuel Pitoiset
19f7a3f01f
radv: implement vkGetDeviceImageSparseMemoryRequirementsKHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13193 >
2021-10-11 08:25:46 +00:00
Samuel Pitoiset
6061609d0f
radv: implement vkGetDeviceImageMemoryRequirementsKHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13193 >
2021-10-11 08:25:46 +00:00
Samuel Pitoiset
863fb8852d
radv: implement vkGetDeviceBufferMemoryRequirementsKHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13193 >
2021-10-11 08:25:46 +00:00
Samuel Pitoiset
ea281f5f0a
radv: remove radv_pipeline::layout
...
From the VK_KHR_maintenance4 spec:
"Allow the application to destroy their VkPipelineLayout object
immediately after it was used to create another object. It is no
longer necessary to keep its handle valid while the created object
is in use."
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13193 >
2021-10-11 08:25:46 +00:00
Marek Olšák
844f66bf38
radeonsi: remove GS fast launch
...
It regresses the first snx test because it adds CPU overhead, and there is
no way to work around it. The average effect on viewperf is 0, meaning that
a few cases improve, while a few others regress.
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13279 >
2021-10-11 07:13:48 +00:00
Dave Airlie
2d15557fd3
crocus/gen5: add dirty flags for urb fences.
...
Fixes hang with some gtk4 apps.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13282 >
2021-10-11 13:33:20 +10:00
Dave Airlie
7079286945
crocus/gen5: reemit shaders on gen5 after new program cache bo.
...
This fixes gtk4 programs.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13281 >
2021-10-11 02:38:36 +00:00
Marek Olšák
86a33569f4
radeonsi: add back a workaround for DCC MSAA on gfx9 due to conformance issues
...
Fixes: 8b95f51ef1 - radeonsi: fix and enable full DCC with MSAA 2x on gfx9
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13256 >
2021-10-11 02:10:10 +00:00
Tapani Pälli
1c3d3bf84a
swrast: Fix another warning from gcc 11
...
This is similar change as commit f535ab59e2 .
[2/4] Compiling C object src/mesa/libmesa_classic.a.p/swrast_s_texfilter.c.o
../src/mesa/swrast/s_texfilter.c: In function ‘sample_2d_footprint’:
../src/mesa/swrast/s_texfilter.c:1817:7: warning: ‘sample_2d_linear’ reading 16 bytes from a region of size 8 [-Wstringop-overread]
1817 | sample_2d_linear(ctx, samp, img, newCoord, rgba);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/mesa/swrast/s_texfilter.c:1817:7: note: referencing argument 4 of type ‘const GLfloat *’ {aka ‘const float *’}
../src/mesa/swrast/s_texfilter.c:1150:1: note: in a call to function ‘sample_2d_linear’
1150 | sample_2d_linear(struct gl_context *ctx,
| ^~~~~~~~~~~~~~~~
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13245 >
2021-10-10 19:19:23 +00:00
Yiwei Zhang
3e36a20a34
venus: update to latest venus-protocol to include tracing
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13255 >
2021-10-09 00:42:32 +00:00
Chia-I Wu
6df3973b61
venus: add atrace support
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13255 >
2021-10-09 00:42:32 +00:00
Yiwei Zhang
2881b43d2c
android_stub: update platform headers to include atrace
...
1. Add tracing headers
2. Update to reflect relocated headers
3. Remove redundant apex/window.h
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13255 >
2021-10-09 00:42:32 +00:00
Yiwei Zhang
8ebf0d1105
radv/anv android: rename buffer usage camera mask
...
AHARDWAREBUFFER_USAGE_CAMERA_MASK enum is defined later and gets
included in the stub headers.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13255 >
2021-10-09 00:42:32 +00:00
Jason Ekstrand
878d8d96c7
nir/lower_discard_or_demote: Fix metadata
...
Passes generally shouldn't use nir_metadata_all unless they don't change
the program in any significant way. Some of these passes insert new
instructions so they should definitely not be preserving most of it.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13261 >
2021-10-08 23:24:49 +00:00
Mike Blumenkrantz
7ba338e253
zink: move glx@glx-multi-window-single-context to flakes
...
I got too excited when this passed on all the runners I guess
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13277 >
2021-10-08 18:24:59 -04:00
Sagar Ghuge
35fd101ad2
isl: Use software programmable render compression format encoding
...
Instead of relying on hardcoded (legacy) encoding format, use software
programmable encoding for render compression format.
v2: (Nanley)
- Fix param mismatch
- Set RenderCompressionFormat unconditionally
- Fix commit message
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12686 >
2021-10-08 18:56:14 +00:00
Sagar Ghuge
dd54e9125a
isl: Add helper to return render compression format encoding
...
v2:
- Fix typo (Marcin)
- Fix comment (Nanley)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12686 >
2021-10-08 18:56:14 +00:00
Sagar Ghuge
e5265c023d
intel/genxml: Add new bit fields Render Compression Format
...
Add RenderCompressionFormat bit field in 3DSTATE_DEPTH/STENCIL_BUFFER
and RENDER_SURFACE_STATE packet to use compression format encoding for
Unified Losless Compression.
v2: (Nanley)
- Drop default value.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12686 >
2021-10-08 18:56:14 +00:00
Michael Tang
c0e45dd882
microsoft/spirv_to_dxil: use dxil_nir_lower_bool_input pass
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13262 >
2021-10-08 17:21:33 +00:00
Michael Tang
36aa1a2959
gallium/d3d12: move d3d12_lower_bool_input to microsoft/compiler
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13262 >
2021-10-08 17:21:33 +00:00
Tapani Pälli
70f193ffcf
intel/isl: FXT1 support was removed on Gfx12.5
...
v2: cleanup (Jordan Justen)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13241 >
2021-10-08 15:45:21 +00:00
Connor Abbott
4537814349
tu: Implement VK_KHR_imageless_framebuffer
...
This is mostly a matter of auditing uses of
cmd->state.framebuffer and replacing every use of fb->attachments with
cmd->state.attachments. We already weren't using the attachments
anywhere outside of the render pass, so this is pretty straightforward.
We also don't have any use for anything in
VkFramebufferAttachmentImageInfo so we can just ignore it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13228 >
2021-10-08 15:09:59 +00:00
Connor Abbott
c5b64dfbf6
tu/clear_blit: Constify some image views
...
I wanted cmd->state.attachments to contain const pointers, since we
can't change the image view, but a few places were still not yet
constified.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13228 >
2021-10-08 15:09:59 +00:00
Timur Kristóf
52413a93af
radv: Enable NGG culling by default on GFX10.3, add nonggc debug flag.
...
This commit enables NGG culling on all GFX10.3 GPUs by default.
A new debug flag environment variable RADV_DEBUG=nonggc is added to
disable this feature on GPUs where it is enabled by default.
The previous perf test flag RADV_PERFTEST=nggc will not be needed on
GFX10.3 anymore but it can still be used to enable the feature on
GPUs where it isn't on by default.
Totals from 58239 (45.27% of 128647) affected shaders:
VGPRs: 1989752 -> 2049408 (+3.00%); split: -3.21%, +6.21%
SpillSGPRs: 675 -> 883 (+30.81%); split: -78.07%, +108.89%
CodeSize: 72205968 -> 153572764 (+112.69%)
LDS: 0 -> 227125248 (+inf%)
MaxWaves: 1614598 -> 1646934 (+2.00%); split: +3.08%, -1.08%
Instrs: 14202239 -> 29654042 (+108.80%)
Latency: 87986508 -> 136960419 (+55.66%); split: -0.23%, +55.89%
InvThroughput: 14444832 -> 21141875 (+46.36%); split: -0.01%, +46.37%
VClause: 340794 -> 493067 (+44.68%); split: -1.33%, +46.01%
SClause: 520983 -> 738636 (+41.78%); split: -0.25%, +42.03%
Copies: 775639 -> 2787382 (+259.37%)
Branches: 296911 -> 1225431 (+312.73%)
PreSGPRs: 1316896 -> 2057270 (+56.22%); split: -0.14%, +56.36%
PreVGPRs: 1473558 -> 1658432 (+12.55%); split: -1.44%, +13.99%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13086 >
2021-10-08 14:18:54 +00:00
Yogesh Mohanmarimuthu
5317874f91
vulkan/device-select: select correct default device for xcb apiVersion 1.0
...
In function fill_drm_device_info(), struct ext_pci_properties is filled only
if has_vulkan11 is true. But the data received from ext_pci_properties is used
without checking for has_vulkan11. Fixing this by setting
drm_device->has_bus_info also if has_vulkan11 is true.
This fix will help in case of nonidentical gpu being used and xcb_surface
extension enabled.
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12816 >
2021-10-08 13:51:33 +00:00
Samuel Pitoiset
d993b59941
aco: constify radv_shader_{info,args}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13192 >
2021-10-08 14:14:50 +02:00
Samuel Pitoiset
64030e79c5
radv,aco: remap PS inputs when declaring shader arguments
...
LLVM seems to require all inputs for PS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13192 >
2021-10-08 14:14:09 +02:00
Samuel Pitoiset
da50534ada
aco: prevent using undeclared shader arguments for PS
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13192 >
2021-10-08 14:14:09 +02:00
Samuel Pitoiset
4e07fe5f78
radv,aco: compute and store the SPI PS input in radv_shader_info
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13192 >
2021-10-08 14:14:08 +02:00
Samuel Pitoiset
a8c471f962
radv: gather more information about PS in the shader info pass
...
To compute the PS SPI inputs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13192 >
2021-10-08 14:14:08 +02:00
Samuel Pitoiset
5728a74ad2
radv: do not overwrite loads_push_constants when declaring shader args
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13149 >
2021-10-08 11:37:19 +00:00
Samuel Pitoiset
a6298b1bc9
radv: remove unnecessary radv_shader_info:num_inline_push_consts
...
This can be determined directly from the user SGPR loc.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13149 >
2021-10-08 11:37:19 +00:00
Samuel Pitoiset
b172d68e69
radv: remove unnecessary radv_shader_info:base_inline_push_consts
...
No need to duplicate it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13149 >
2021-10-08 11:37:19 +00:00
Samuel Pitoiset
bcfba1891a
radv: determine if a shader loads push constants from the SGPR loc
...
If the SGPR loc is declared, the shader loads push constants.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13149 >
2021-10-08 11:37:19 +00:00
Samuel Pitoiset
113ce21528
radv: determine if a shader uses indirect descriptors from the SGPR loc
...
If the SGPR loc is declared, the shader needs indirect descriptor sets.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13149 >
2021-10-08 11:37:19 +00:00
Samuel Pitoiset
2d4fc61bff
radv: declare the shader user locs from the shader arguments
...
Seems more robust. Basically, the idea is to declare shader arguments
from the shader info, and then the user locs from the arguments.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13149 >
2021-10-08 11:37:18 +00:00
Rhys Perry
37a81b4298
radv/llvm: fix parameter index for layer exports
...
Fixes various dEQP-VK.multiview.* tests.
Fixes: 2aa705ec87 ("radv: determine the VS output parameters in the shader info pass")
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13250 >
2021-10-08 10:56:09 +00:00
Rhys Perry
2564fbfc57
ac/llvm: fix image_samples with null descriptors
...
Fixes various dEQP-VK.robustness.robustness2.* tests.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13251 >
2021-10-08 10:27:11 +00:00
Lionel Landwerlin
ee1f0451a8
spirv: deal with null pointers
...
%2456 = some complicated struct...
%8307 = OpTypeInt 32 0
%8308 = OpTypeInt 8 0
%8467 = OpTypePointer Generic %8308
%8500 = OpTypePointer Generic %2456
%8586 = OpConstantNull %8500
%8312 = OpConstant %8307 0
%8314 = OpConstant %8307 2
%9752 = OpInBoundsPtrAccessChain %8467 %8586 %8312 %8314
Right now the parser can't deal with this %8586. Let's create a value
off the Null constant.
v2: add helpers
v3: Correctly create the Null value
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10672 >
2021-10-08 09:30:02 +00:00
Samuel Pitoiset
333472f0de
aco: fix load_barycentric_at_{offset,sample}
...
The linear case was missing.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13257 >
2021-10-08 08:51:24 +00:00
Rob Clark
faed3d4dfe
freedreno/drm: Move pipe unref after fence removal
...
Dropping the final pipe ref could in turn drop the final ref to one
of a couple other bo's, which in turn could indirectly recurse back
into cleanup_fences() on the same bo, resulting in a double decrement
of bo->nr_fences and underflow to a large positive #. This happens
because free'ing a bo back to the bo cache periodically calls
fd_bo_cache_cleanup() and any bo's that have not been re-used can
be really free'd, which in turn calls cleanup_fences().
Fixes: 7dabd62464 ("freedreno/drm: Userspace fences")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13263 >
2021-10-08 07:40:14 +00:00
Samuel Pitoiset
a07bc0c37a
radv: do not set TRAP_PRESENT(1) for fragment shaders
...
It shouldn't be always set. Found by inspection.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13244 >
2021-10-08 09:00:56 +02:00
Mike Blumenkrantz
f5eba77e2e
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13265 >
2021-10-08 04:16:38 +00:00
Mike Blumenkrantz
6cb2787984
zink: rework in-use batch states hash table to be a singly-linked list
...
it was useful to have this be a hash table back before timeline semaphores when
the batch state needed to be looked up every time to determine resource busy state,
but now in the modern world, this is almost never happening, and storing them like
this is actually worse for performance, so flatten it out into a simpler list
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13265 >
2021-10-08 04:16:38 +00:00
Mike Blumenkrantz
2750853894
zink: stop leaking resource surface cache hash tables
...
these are owned by the resource, so stick them on a resource context
instead of the screen context
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13248 >
2021-10-08 03:59:50 +00:00
Mike Blumenkrantz
f00ad70bfb
zink: remove reads/writes members from zink_resource_object
...
these haven't been used in a while
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13259 >
2021-10-08 03:33:03 +00:00
Mike Blumenkrantz
34dbf998ae
zink: switch remaining direct access of zink_resource_object::(reads|writes) to util
...
I missed this one
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13259 >
2021-10-08 03:33:03 +00:00
Mike Blumenkrantz
77b3a3f00f
zink: stop leaking buffers on replacement
...
I tried to be pointlessly clever here to avoid an atomic op, but the move()
here ended up leaking a ref in some cases (descriptor bind + multiple replacements in same cmdbuf)
more importantly, it's a stupid idea now that zink_resource_object structs
are entirely owned by the driver, meaning their refcounts are never
altered in threads, and thus the atomic ops are just regular ops
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13258 >
2021-10-08 03:05:46 +00:00
Mike Blumenkrantz
c161e08c9c
zink: remove zink_context::curr_batch
...
this hasn't been a real value in a while and it's confusing to have
it still exist
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13247 >
2021-10-08 02:53:51 +00:00
Mike Blumenkrantz
d1e0a9a4ff
zink: move semaphore reset handling to submit
...
this is the earliest place the batch_id is available now, so check it
here since ctx->curr_batch isn't actually a thing anymore
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13247 >
2021-10-08 02:53:51 +00:00
Mike Blumenkrantz
df1e18fb5f
zink: wait in the flush thread when ETOOMANY batches are out
...
when dispatch is fast enough, some tests fire off cmdbufs so quickly that the normal
oom flushing and batch pruning in end_batch isn't sufficient to keep memory
usage down
to combat this, start throwing in stalls after submission to clean out a bunch of cmdbufs
while preventing further ones from being submitted
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13247 >
2021-10-08 02:53:51 +00:00
Marek Olšák
65a8b50b7a
radeonsi: remove duplicate partial_count variable
...
"count" is computed identically.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13235 >
2021-10-08 02:31:30 +00:00
Marek Olšák
50e40365c4
radeonsi: fix a leak in draw_vertex_state if threaded_context is disabled
...
Fixes: fb8f532ea1 - radeonsi: implement draw_vertex_state for lower display list overhead
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13235 >
2021-10-08 02:31:30 +00:00
Marek Olšák
1fe24983e7
gallium/u_threaded: fix draw_vertex_state with multi draws
...
It caused an assertion failure in debug builds and a GPU hang in release
builds.
Fixes: 0842488859 - gallium/u_threaded: implement draw_vertex_state
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5457
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13235 >
2021-10-08 02:31:30 +00:00
Mike Blumenkrantz
3a06b0b439
zink: split out fb state updating to helper function
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13127 >
2021-10-08 02:01:59 +00:00
Mike Blumenkrantz
032716df8a
zink: wait on thread queue before destroying context
...
ensure there's no submits in progress that would explode if they were deleted
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13125 >
2021-10-08 01:48:33 +00:00
Dave Airlie
40fdb35c65
crocus: Honor scanout requirement from DRI
...
Translate PIPE_BIND_SCANOUT as ISL_SURF_USAGE_DISPLAY_BIT,
instead of PIPE_BIND_DISPLAY_TARGET.
PIPE_BIND_DISPLAY_TARGET isn't used for dri images and seem to
be set only for fake winsys buffers (which aren't displayed).
The trouble is that a fake buffer could be multisampled and we
cannot have multisampled surface with display bit.
Ported from iris 82b4666783
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Emma Anholt <emma@anholt.net >
Tested-by: Jason Ekstrand <jason@jlekstrand.net >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5464
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13260 >
2021-10-08 01:03:57 +00:00
Jordan Justen
8e735dc72c
intel/isl: Add mocs settings for DG2
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12712 >
2021-10-08 00:48:10 +00:00
Chia-I Wu
8cce6281e6
util/vector: make util_vector_init harder to misuse
...
Make u_vector_init a wrapper to u_vector_init_pot. Let both take
(element_count, element_size) as parameters.
Motivated by eed0fc4caf ("vulkan/wsi/wayland: fix an invalid
u_vector_init call")
v2: rename u_vector_init_pot to u_vector_init_pow2
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13201 >
2021-10-08 00:15:11 +00:00
Jason Ekstrand
781c0eafcf
Revert "mesa: use simple_mtx_t for TexMutex"
...
This reverts the following commit from main:
commit f6abb3445b
Author: Marek Olšák <maraeo@gmail.com >
Date: Fri Oct 1 15:46:48 2021 -0400
mesa: use simple_mtx_t for TexMutex
change mtx_recursive -> mtx_plain, there's no recursive locking
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
Contrary to the claim in the commit message, there is recursive locking.
The meta stuff used by i965 does GL operations while the texture is
locked. If we don't allow recursive locks, it will deadlock. No, it's
not great, but it's the current state of affairs. Once we delete i965
in favor of crocus and any other users of meta, we can restore the above
patch. Until then, we need mtx_recursive.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13254 >
2021-10-07 22:30:26 +00:00
Jason Ekstrand
305b170229
vulkan/device: Use vk_errorf to report missing features
...
With a tiny bit more code-gen, we can now not only throw the error but
also log back to the client exactly which feature was missing.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
5b42f1a374
vulkan/device: Use vk_error
...
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
330f4c9bc9
vulkan/instance: Use vk_error in vk_instance_init
...
We have to be a bit careful here. Calling log functions during instance
initialization can be a bit sketchy. However, we know that __vk_log_impl
only ever touches the callbacks lists if instance->base.client_visible
so it's safe to call vk_error as soon as we've set up instance_callbacks.
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
ad27db2ae9
vulkan/log: Drop _impl from the log helper names
...
Now that we no longer have every driver in the tree defining their own
__vk_errorf and __vk_errorv, we don't need to worry about the symbol
collision anymore and can use the "real" names for the common ones.
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
a1ac8234ec
turnip: Plumb non-startup errors through the new vk_error helpers
...
Also, change every vk_error to use the closest object instead of
fetching all the way back to the instance.
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
bab0530f07
v3dv: Switch to the new vk_error helpers
...
Also, change every vk_error to use the closest object instead of
fetching all the way back to the instance.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
708b65f704
panvk: Switch to the new vk_error helpers
...
Also switch all our calls to use the closest object to the error and let
vk_error sort out which object to actually use.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
47adb11143
lavapipe: Switch to the new vk_error helpers
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
7a2516568d
radv: Switch to the new common vk_error helpers
...
Also, change every vk_error to use the closest object instead of
fetching all the way back to the instance.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
9e299b50ab
radv: Stop printing descriptor pool allocation failures
...
The VK_ERROR_FRAGMENTED_POOL and VK_ERROR_OUT_OF_POOL_MEMORY errors are
not as exceptional cases as most. These are expected to be hit by
applications in the normal course of doing their thing. Probably best
not to spam stderr and the debug logs with them.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
88a8b937b5
anv: Use the common vk_error and vk_errorf helpers
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
f6d52768d6
anv/queue: Plumb the queue through all the queue_submit calls
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
ab36efcb4c
anv: Drop unused logging helpers
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
0cad3beb2a
vulkan/log: Add common vk_error and vk_errorf helpers
...
These helpers have quite a bit of smarts in them to log errors to chase
the object chain as needed and log errors to roughly the appropriate
object. For instance, VK_ERROR_OUT_OF_DEVICE_MEMORY always goes to a
device while VK_ERROR_OUT_OF_HOST_MEMORY always goes to the instance.
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
ec34ec388b
vulkan/log: Handle logging to a physical device
...
Instance-level objects won't have a device pointer so we can't rely on
that. Instead, we should look at the object type and try to chase it
back to an instance. Sadly, we can't do that for certain display and
WSI objects. However, we never use the vk_log* helpers for those.
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
ad27b27389
anv: s/vk_error/anv_error/g
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Jason Ekstrand
aa94220d7d
anv: Stop printing descriptor pool allocation failures
...
The VK_ERROR_FRAGMENTED_POOL and VK_ERROR_OUT_OF_POOL_MEMORY errors are
not as exceptional cases as most. These are expected to be hit by
applications in the normal course of doing their thing. Probably best
not to spam stderr and the debug logs with them.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:35 +00:00
Jason Ekstrand
31148ee88e
anv: drop a misplaced and wrong comment
...
We do actually use vk_error in the one place we check that limit.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:35 +00:00
Jason Ekstrand
9067c12d2a
vulkan/log: Log to instance messages during instance construction
...
If the instance isn't client-visible yet (i.e. foo_instance_to_handle
hasn't been called), then the instance is still under construction and
we should log using vk_debug_message_instance. This makes the vk_log*
macros work regardless of whether the instance is fully constructed or
not.
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:35 +00:00
Jason Ekstrand
e884e35077
vulkan/log: Assert if the driver logs a client-invisible object
...
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:35 +00:00
Jason Ekstrand
571b5f5000
vulkan: Track which objects are client-visible
...
When dealing with debug logging, it's useful to track when an object's
construction is finished and it's now visible to the client. We can
detect this pretty easily by setting a flag the first time foo_to_handle
is called. As long as drivers only ever call that function at the end
of object construction (they all do to my knowledge), this should be a
reliable mechanism for detecting when a client knows about a handle.
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:35 +00:00
Jason Ekstrand
a815b2b3c1
vulkan: Drop vk_object_base_reset
...
It's no longer used and just makes the init/finish path more
complicated.
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:35 +00:00
Boris Brezillon
fabf60f892
spirv: Declare PointCoord as a sysval
...
Now that all drivers have been patched to convert sysvals to input
varyings when they have too, we can safely declare PointCoord as a sysval
too.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13017 >
2021-10-07 19:45:35 +00:00
Boris Brezillon
b47090c5b3
spirv: Always declare FragCoord as a sysval
...
Now that all spirv_to_nir() users take care of converting sysvals to
varyings, we can unconditionally declare FragCoord as a sysval.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13017 >
2021-10-07 19:45:35 +00:00
Boris Brezillon
4b62e90e71
spirv: Let spirv_to_nir() users turn sysvals into input varyings
...
This is an attempt at simplifying the spirv_to_nir() backend when it
comes to choosing between system values and input varyings. Let's patch
drivers to do the sysval to input varying conversion on their own so we
can get rid of the frag_coord_is_varying field in spirv_to_nir_options
and unconditionally create create sysvals for FragCoord, FrontFacing and
PointCoord inputs instead of adding new xxx_is_{sysval,varying} flags.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13017 >
2021-10-07 19:45:35 +00:00
Boris Brezillon
56251f924d
nir: Add a nir_sysvals_to_varyings() helper
...
Allow backends to turn some sysvals into input varyings so the frontend
(in our case spirv_to_nir()) doesn't have to bother selecting which
one is expected.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13017 >
2021-10-07 19:45:35 +00:00
Jason Ekstrand
b71bdc3404
nir/algebraic: Add some opts for comparisons of comparisons
...
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13167 >
2021-10-07 18:21:11 +00:00
Jason Ekstrand
7abf3955ca
nir/algebraic: Add some boolean optimizations
...
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13167 >
2021-10-07 18:21:11 +00:00
Jason Ekstrand
c8b2be0b95
nir/algebraic: Lower fisfinite
...
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13167 >
2021-10-07 18:21:11 +00:00
Gert Wollny
e95ecff784
mesa: signal driver when buffer is bound to different texture format
...
Gallium caches sampler states for TBOs. Now if a buffer is first
attached to a TBO specifying one format, and later attached by
specifying another format and this TBO is then used, that would lead
to an assertion failure in debug builds, or to invalid rendering in
release builds, because the TBO picks the original, wrong format for
the sampler view.
Resolve this by signalling the change to Gallium (and other drivers), so
that Gallium clears the sampler view cache.
Fixes: f0ecd36ef8
st/mesa: add an entirely separate codepath for setting up buffer views
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13230 >
2021-10-07 17:53:48 +00:00
Rob Clark
1c1c43fbab
gallium/u_threaded: Split out options struct
...
Rather than having an ever increasing list of parameters to
threaded_context_create(), split out a struct for optional
flags and parameters. This should reduce churn in adding
new options.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13207 >
2021-10-07 17:32:25 +00:00
Rhys Perry
1fb63367a8
radv,aco: don't include FMASK in the storage descriptor
...
We perform a FMASK expand when transitioning to GENERAL or TRANSFER_DST
layout, so storage images always have an identity FMASK.
radeonsi doesn't appear to expand the FMASK for read-only storage images,
so the sample index adjustment is still needed there.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Rhys Perry
1e9f72ffbe
radv,aco: use lower_to_fragment_fetch
...
This simplifies ACO and will let us optimize the FMASK fetch (for example,
move it out of loops).
fossil-db (Sienna Cichlid):
Totals from 955 (0.64% of 150170) affected shaders:
CodeSize: 4722016 -> 4722952 (+0.02%); split: -0.02%, +0.04%
Instrs: 875619 -> 875760 (+0.02%); split: -0.02%, +0.04%
Latency: 14069089 -> 14071699 (+0.02%); split: -0.02%, +0.04%
InvThroughput: 2321419 -> 2321218 (-0.01%); split: -0.02%, +0.01%
VClause: 23080 -> 23081 (+0.00%)
SClause: 32426 -> 32019 (-1.26%); split: -1.88%, +0.62%
Copies: 42787 -> 42777 (-0.02%); split: -0.19%, +0.16%
Branches: 17900 -> 17902 (+0.01%); split: -0.04%, +0.06%
PreSGPRs: 43229 -> 41002 (-5.15%); split: -5.16%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Rhys Perry
cfb816b2a5
aco: use correct dim for FMASK fetches
...
I think it somehow worked fine previously, but this is more correct.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Rhys Perry
91a5c9fdf2
ac/nir: return 0x76543210 for NULL FMASK fetch
...
This can replace several v_cndmask_b32 with a single v_cndmask_b32.
fossil-db (Sienna Cichlid):
Totals from 1169 (0.78% of 150170) affected shaders:
SGPRs: 82032 -> 81984 (-0.06%); split: -0.19%, +0.13%
VGPRs: 68368 -> 68280 (-0.13%); split: -0.30%, +0.18%
SpillSGPRs: 8754 -> 8609 (-1.66%); split: -4.06%, +2.40%
CodeSize: 5460132 -> 5446308 (-0.25%); split: -0.42%, +0.17%
MaxWaves: 24456 -> 24462 (+0.02%); split: +0.03%, -0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Rhys Perry
bf0cc05227
aco: return 0x76543210 for NULL FMASK fetch
...
This can replace several v_cndmask_b32 with a single v_cndmask_b32, and
will be useful when we lower sample index adjustment in NIR.
fossil-db (Sienna Cichlid):
Totals from 955 (0.64% of 150170) affected shaders:
VGPRs: 53232 -> 53208 (-0.05%)
CodeSize: 4712548 -> 4722016 (+0.20%); split: -0.02%, +0.23%
MaxWaves: 19052 -> 19056 (+0.02%)
Instrs: 875891 -> 875619 (-0.03%); split: -0.04%, +0.00%
Latency: 14070164 -> 14069089 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 2322982 -> 2321419 (-0.07%); split: -0.08%, +0.01%
VClause: 23070 -> 23080 (+0.04%); split: -0.00%, +0.05%
SClause: 32463 -> 32426 (-0.11%); split: -0.12%, +0.01%
Copies: 42840 -> 42787 (-0.12%); split: -0.19%, +0.07%
Branches: 17907 -> 17900 (-0.04%); split: -0.06%, +0.02%
PreSGPRs: 43585 -> 43229 (-0.82%)
PreVGPRs: 47676 -> 47625 (-0.11%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Rhys Perry
d30ed6ef8b
radv: don't create blit pipelines for multisampled 3D images
...
These don't create sensible NIR.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Rhys Perry
f3723822a4
nir/lower_tex: add lower_to_fragment_fetch_amd
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Rhys Perry
225fe37c14
nir: add _amd suffix to fragment_mask_fetch and fragment_fetch texops
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12214 >
2021-10-07 15:36:39 +00:00
Marcin Ślusarz
3a18963b08
nir/print: pad 64-bit constants with zeroes
...
... just like other-size constants are.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13223 >
2021-10-07 10:49:15 +00:00
Pierre-Eric Pelloux-Prayer
a1dea665d0
radeonsi: make the DRI_PRIME dGPU -> iGPU copy async
...
Doing this copy using SDMA frees up the dGPU to do more
interesting things while the copy is happening; for instance
the rendering of the next frame.
hw queue activity before:
------------------------
dGPU:
gfx: [renderframe 1][copy->iGPU][renderframe 2][copy->iGPU]...
iGPU:
gfx: [Xorg] [Xorg]
hw queue activity before after:
------------------------------
dGPU:
gfx: [renderframe 1][renderframe 2][renderframe 3]....
sdma: [copy->iGPU] [copy->iGPU] [copy->iGPU]
iGPU:
gfx: [Xorg] [Xorg] ...
If SDMA isn't available or can't do the copy, use an async compute
context instead.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 >
2021-10-07 09:21:05 +00:00
Pierre-Eric Pelloux-Prayer
22a1b7c5b3
gallium: add a is_dri_blit_image bool to pipe_blit_info
...
This indicates driver that a given blit is coming from the DRI
frontend.
This information can then be used to pick an appropriate blitting
method.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 >
2021-10-07 09:21:05 +00:00
Pierre-Eric Pelloux-Prayer
f895dc04a5
radeonsi: add an async compute context
...
It'll be used exclusively for DRI_PRIME copies for now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 >
2021-10-07 09:21:05 +00:00
Pierre-Eric Pelloux-Prayer
46c95047bd
radeonsi: implement si_sdma_copy_image for gfx7+
...
SDMA support was dropped in 1f31a21664 mainly because the
advantages of delegating some copy/clear operations to the
SDMA hw came with large drawbacks: CPU overhead due to the
sdma/gfx synchronization and hangs.
This commit restores SDMA support for all gfx7+ chips but
only for the image copy operations.
SDMA operations won't be intertwined with gfx operations
like before. Instead, a SDMA IB will contain a single copy
at a time and the synchronization will be handled by the
winsys (based on the used buffers).
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 >
2021-10-07 09:21:05 +00:00
Bas Nieuwenhuizen
954602b1f8
radv: Add VK_FORMAT_R16G16B16A16_UNORM for accel. structures.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13240 >
2021-10-07 08:57:26 +00:00
Danylo Piliaiev
d590515112
ir3: support source modes for resinfo.b
...
IBO/SSBO may have dynamic index, previously we just silently ignored
this fact. However resinfo supports different modes.
Fixes vkd3d test "test_null_uav"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13224 >
2021-10-07 08:19:13 +00:00
Emma Anholt
e86fec1797
ci/freedreno: try to fix the a630 cubearray flake's regex.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13238 >
2021-10-07 05:17:08 +00:00
Emma Anholt
d4efb16687
ci/freedreno: Move the other a530 test jobs to test-manual-mr.
...
I meant to put this in the general a530 properties, not just the a530 deqp.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13238 >
2021-10-07 05:17:08 +00:00
Filip Gawin
7d95681ea6
r300: avoid searching for temp variable twice
...
(when once is enough)
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13229 >
2021-10-07 02:58:29 +00:00
Mike Blumenkrantz
822fd2b041
features: be explicit about EXT_color_buffer_half_float support
...
it's annoying not being able to glance at this and see whether my
driver has support, so these are the drivers I know support it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13211 >
2021-10-07 02:26:40 +00:00
Mike Blumenkrantz
57610e14f6
build: also remove wayland wsi flags from c++ build
...
...until aco stops exploding
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13233 >
2021-10-07 01:38:23 +00:00
Danylo Piliaiev
127352457c
turnip: do nothing on dispatch with zero total workgroups
...
Otherwise GPU hangs...
Fixes vkd3d test "test_dispatch_zero_thread_groups"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13227 >
2021-10-06 23:53:03 +00:00
Eric Engestrom
1288000dc2
CODEOWNERS: add @jenatali for Microsoft & D3D12
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2178 >
2021-10-06 22:52:05 +00:00
Eric Engestrom
7dfc281b0d
CODEOWNERS: add @bbrezillon for src/panfrost/vulkan/
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2178 >
2021-10-06 22:52:05 +00:00
Eric Engestrom
22e09c92a0
CODEOWNERS: add @alyssa for Asahi and Panfrost
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2178 >
2021-10-06 22:52:05 +00:00
Eric Engestrom
5af09ac857
CODEOWNERS: add android build system
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2178 >
2021-10-06 22:52:05 +00:00
Eric Engestrom
c2a00fb9f9
CODEOWNERS: add intel group
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2178 >
2021-10-06 22:52:05 +00:00
Eric Engestrom
e26062dc50
CODEOWNERS: add SWR maintainers
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2178 >
2021-10-06 22:52:05 +00:00
Eric Engestrom
3047fd4783
gitlab: convert old REVIEWERS into GitLab's CODEOWNERS
...
The old REVIEWERS file was useful back in the mailing lists days, but
nowadays we use GitLab, and we tag people by using their usernames, not
email addresses.
Most of us know each other's usernames by now, but documentation like
this is not meant for us but for everyone else, so that they can talk to
us.
Let's convert the file into GitLab's CODEOWNERS format, which maps files
in the repository to GitLab users that people can look up or tag in
their issues or merge requests.
See also: https://docs.gitlab.com/ce/user/project/code_owners.html
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2178 >
2021-10-06 22:52:05 +00:00
Derek Foreman
7fa6d3fc95
egl/wayland: Support RGBA ordered formats
...
There's no reason not to try to use RGBA ordered formats, and in some
cases doing so might lead to features such as AFBC being available when
they otherwise wouldn't.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13040 >
2021-10-06 22:08:40 +00:00
Dave Airlie
f389f963ee
lavapipe: fix fence handling around wsi submission
...
My previous fix was incorrect, properly fix things so that
fences in acquire get a proper timeline set.
Fixes: 028591954a ("lvp/fence: quick fix to previous commit.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13218 >
2021-10-06 20:52:09 +00:00
Dave Airlie
b1f15b4f4d
Revert "lvp/fence: quick fix to previous commit."
...
This reverts commit 028591954a .
This wasn't the correct fix, that is coming up.
Fixes: 028591954a ("lvp/fence: quick fix to previous commit.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13218 >
2021-10-06 20:52:09 +00:00
Lionel Landwerlin
b996fa8efa
anv: implement VK_KHR_synchronization2
...
v2: Use u_foreach_bit64() (Samuel)
v3: Add missing handling of VkMemoryBarrier2KHR in pNext of
VkSubpassDependency2KHR (Samuel)
v4: Remove unused ANV_PIPELINE_STAGE_PIPELINED_BITS (Ivan)
v5: fix missing anv_measure_submit() (Jason)
constify anv_pipeline_stage_pipelined_bits (Jason)
v6: Split flushes & invalidation emissions on
vkCmdSetEvent2KHR()/vkCmdWaitEvents2KHR() (Jason)
v7: Only apply flushes once on events (Jason)
v8: Drop split flushes for this patch
v9: Add comment about ignore some fields of VkMemoryBarrier2 in
VkSubpassDependency2KHR (Jason)
Drop spurious PIPE_CONTROL change s/,/;/ (Jason)
v10: Fix build issue on Android (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:38 +00:00
Lionel Landwerlin
dff9098059
anv: improve readability of pipelined states
...
Improving maintenance.
v2: Also add TOP_OF_PIPE_BIT, HOST_BIT
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:38 +00:00
Lionel Landwerlin
8d9102bde2
anv: make semaphore helper work on a single object
...
Should have done that last time.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:38 +00:00
Lionel Landwerlin
ad9d95eee4
anv: add missing transition handling bits
...
New access flags & pipeline stages got added for transform feedback
and we missed handling them.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 36ee2fd61c ("anv: Implement the basic form of VK_EXT_transform_feedback")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:38 +00:00
Lionel Landwerlin
97f0a4494b
vulkan: implement legacy entrypoints on top of VK_KHR_synchronization2
...
v2: fix common vkQueueSubmit() pNext generation
fix potential leak of perf_query_submit_info
fix comment about casting VkQueue to vk_object_base
add helper for barrier struct upgrades (Jason)
reuse __vk_append_struct() (Jason)
optimize vk_common_GetQueueCheckpointDataNV
use multialloc for vk_common_QueueSubmit (Dave)
v3: Reuse new vk_queue/vk_command_buffer objects
Fixup CmdWaitEvents() (Jason)
v4: Add comment about dep_flags for CmdWaitEvents() (Jason)
v5: Drop multialloc in VkQueueSubmit entrypoint (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net > (v5)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:38 +00:00
Lionel Landwerlin
9af7506370
vulkan/util: generate define for a selected few enums
...
One of the unfortunate effect of Vulkan starting to use 64bit bitmasks
is that they can no longer be defined using enums because C doesn't
guarantees that enum values will be 64bits.
Vulkan therefore started using those patterns :
static const VkAccessFlags2KHR VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001;
This has the effect that we can not longer use those values in
switch/case statements.
This change introduces defines so that we can keep doing this. For now
only VkAccessFlags2KHR/VkPipelineStageFlags2KHR are allowed to be
redefined this way, this list could be changed later (or all bitmask
could be processed this way).
v2: Generate hexadecimal numbers (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:37 +00:00
Lionel Landwerlin
dbf4cfeff5
vulkan: remove unused VkCommand
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:37 +00:00
Lionel Landwerlin
59e98694be
vulkan: handle new VK_KHR_synchronization2 image layouts
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:37 +00:00
Lionel Landwerlin
2ff3fd4773
vulkan: put generated defines into their own header
...
v2: Put vk_enum_defines.h in the list of generated files
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9045 >
2021-10-06 20:22:37 +00:00
Dave Airlie
7d388c8d09
wsi/x11: cleanup properly after mit shm paths are used.
...
This path was being skipped on sw + has_mit_shm, when it
shouldn't be.
Fixes: a069b4e9b9 ("vulkan/wsi/sw: add mit-shm support for pixmap allocation")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13217 >
2021-10-07 05:43:27 +10:00
Michel Zou
2414001bdd
docs: mark off missing lavapipe exts
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13232 >
2021-10-06 20:08:11 +02:00
Emma Anholt
591afd1d52
turnip: Free disk cache on pdev init failure.
...
Noticed while debugging test failure under valgrind (the disk cache
doesn't come from the vulkan allocator, so we could leak it and not fail
the test).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13200 >
2021-10-06 16:49:03 +00:00
Emma Anholt
36d761f2a5
turnip: Fix allocation failure handling around device->name.
...
Fixes regressions in dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail
Fixes: 5116388e0b ("turnip: Expose a device name similar to the blob.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13200 >
2021-10-06 16:49:03 +00:00
Emma Anholt
23cad1b566
turnip: Plug the vendor/device ID into the pipeline cache fields, too.
...
Fixes a regression in dEQP-VK.pipeline.cache.misc_tests.cache_header_test.
Fixes: 7e471541e0 ("turnip: Match the blob's format for vendorID and deviceID.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13200 >
2021-10-06 16:49:03 +00:00
Danylo Piliaiev
729991e09c
ir3: remove obsolete assert for intrinsic_store_output in tess
...
We do support non-zero nir_intrinsic_component for
nir_intrinsic_store_output in tess shaders.
Fixes vkd3d test "test_hull_shader_fork_phase_dxbc"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13196 >
2021-10-06 16:06:10 +00:00
Marcin Ślusarz
434df66792
anv: allocate zeroed device object
...
When enabling a new feature we made the mistake of initializing some fields
of the device object conditionally, which leads to crashes later. Initializing
those fields would be a trivial fix, but it's probably better to just zero
everything at allocation time and prevent any future screwups. Device objects
are allocated rarely enough for this additional memset to not matter for
performance.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13221 >
2021-10-06 15:20:40 +00:00
Jason Ekstrand
1f7e11a190
genxml: Drop bit 27 from RENDER_SURFACE_STATE::Surface Format
...
Bit 27 is the "ASTC Format" bit in the PRMs but we just extended the
Surface Format field by one bit and made sure all the ASTC formats have
that bit set. Since Gfx12.5 doesn't support ASTC, we can drop that bit
from the field and this will cause GenXML packing functions to assert if
it's ever set.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
e7f3da0138
intel/isl: ASTC support was removed on Gfx12.5
...
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
58bb20179b
anv: Ask ISL about ASTC support
...
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
8afc9626ad
intel/isl: Stop claiming ASTC works on Cherry View
...
We do, however, leave a nice tombstone comment in case anyone comes
looking. Given the age and scarcity of Cherry View hardware and ASTC
apps that run on desktop Linux, it's unlikely we'll ever bother to
implement it.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
0c618f308c
intel/isl: Simplify isl_format_supports_filtering
...
For compressed formats, filtering and sampling has always gone together.
This lets us avoid duplicating all those nasty special cases between the
two functions.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Mike Blumenkrantz
7cc85dba71
build: unify vulkan cpp platform args
...
these were duplicated all over the place, and it's annoying to have to keep
duplicating them any time a new component includes the vulkan header
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13141 >
2021-10-06 14:19:35 +00:00
Mike Blumenkrantz
1d574d4860
lavapipe: remove display extension support
...
lavapipe doesn't actually support these
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13141 >
2021-10-06 14:19:35 +00:00
Thomas Wagner
fe1a091bd0
lavapipe: enable KHR_external_memory_fd
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
9da15aa3aa
llvmpipe: enable EXT_memory_object(_fd)
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
895d3399f7
lavapipe: add support for KHR_external_memory_fd
...
Support creating exportable memory. Use memfd file
descriptors and import/export them as opaque fd handles.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
1608a815e3
llvmpipe: add support for EXT_memory_object(_fd)
...
Enable the import of memory via opaque fd handles, which
are based upon memory-fds. The extension is necessary for sharing
images and buffers from Vulkan.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
1166ee9caf
gallium: add utility and interface for memory fd allocations
...
Add utility functions to allocate aligned memory backed by
mem_fd objects. Add interface to Gallium for same allocation.
It will be used in later commits for external memory support
in Vulkan/OpenGL.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Connor Abbott
0209311c6e
ir3: Use source in ir3_output_conv_src_type()
...
This was incorrectly converted when splitting the regs array. Noticed by
inspection.
Fixes: d3e08327cf ("ir3/core: Switch to srcs/dsts arrays")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13220 >
2021-10-06 13:15:50 +00:00
Roman Stratiienko
f1c322c269
meson_options: Bump max value of platform-sdk-version to 31
...
During building Android-12, the following error appears:
meson.build:21:0: ERROR: New value 31 is more than maximum value 30.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Acked-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13216 >
2021-10-06 12:05:22 +00:00
Danylo Piliaiev
6a16b6a74c
turnip: fix vbs emission when there are holes in bindings
...
Otherwise we read garbage for bindings with value above
vertexBindingDescriptionCount.
Fixes vkd3d test "test_append_aligned_element"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13195 >
2021-10-06 10:05:50 +00:00
Alejandro Piñeiro
bc5892b7fc
v3dv: use NULL for vk_error on initialization failures
...
This commit fixes two issues:
* On CreateInstance, we are freeing the instance, and then trying to
use it when calling vk_error. This could be problematic, so let's
just use NULL.
* On CreateDevice, we are getting a unsupported feature error, and
then trying to call vk_error using the instance. That's is not
really a instance error, and will assert when the ongoing common
vk_error lands mesa. Let's use NULL instead, as the object it
applies, the device, was not created.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13219 >
2021-10-06 11:42:28 +02:00
Dave Airlie
ab1c888c8d
device_select: close dri3 fd after using it.
...
This can leak and causes crashes in some CTS test groups
dEQP-VK.wsi.xcb.incremental_present*
Fixes: 9bc5b2d169 ("vulkan: add initial device selection layer. (v6.1)")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13215 >
2021-10-06 18:24:54 +10:00
Dave Airlie
028591954a
lvp/fence: quick fix to previous commit.
...
This fixes last of xcb cts issues.
Fixes: 8a294b6f97 ("lavapipe: Fix vkWaitForFences for initially-signalled fences")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13212 >
2021-10-06 15:27:33 +10:00
Pavel Asyutchenko
b9617bc621
lavapipe: Fix vkWaitForFences for initially-signalled fences
...
Fences with VK_FENCE_CREATE_SIGNALED_BIT are created with
signalled=true and timeline=0, waiting on them without
submitting first returned VK_TIMEOUT instead of VK_SUCCESS.
Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13128 >
2021-10-06 15:11:04 +10:00
Mike Blumenkrantz
96ea718b7e
lavapipe: EXT_4444_formats support
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12001 >
2021-10-06 04:35:25 +00:00
Dave Airlie
29f4931b52
llvmpipe: fix 4-bit output scaling.
...
This is overkill, but hey 4-bits per channel is hardly something to
care about.
(Suggestions welcome for a better version).
Fixes:
dEQP-GLES2.functional.fbo.render.*rgba4*
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12001 >
2021-10-06 04:35:25 +00:00
Emma Anholt
22a332f5ac
virgl: Add support for NIR shaders when VIRGL_DEBUG=nir.
...
This will let me incrementally fix nir-to-tgsi against virgl without
having to carry around the whole "remove TGSI from mesa/st" MR.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:18 +00:00
Emma Anholt
4e3e149ffd
nir_to_tgsi: Force the TXQ LOD argument to be scalar.
...
Otherwise, older virglrenderer fails all the texturesize tests.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
469f0345ac
nir_to_tgsi: Add a workaround for virgl UBO array dynamic indexing.
...
virgl makes one array of UBOs starting from the first non-CB0 UBO used,
and does dynamic indexing off of that. It requires that the dynamic
indexing be CONST[ADDR[0]+base], rather than having the base be loaded in
addr0.
If we had a nir_intrinsic_base() on load_ubo, this would be easy. As we
don't, emit a subtract at address deref time.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
a292268cd5
nir_to_tgsi: Sort FS output declarations to avoid virglrenderer bugs.
...
The TGSI debug output is a lot more readable if it's in location order,
anyway.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
7dde279db5
nir-to-tgsi: Avoid emitting TXL just for lod 0 on non-vertex shaders.
...
Prompted by comparing virgl fails and finding that it has issues with
immediate args to TXL/TXB, at least.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
c3c560089e
nir_to_tgsi: Turn GS PRIMID into an input instead of a sysval.
...
While TGSI can represent it either way, virgl and r600 at least demand an
input.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
91a5a18dbf
nir_to_tgsi: Add support for nir_intrinsic_load_barycentric_at_sample.
...
It doesn't have to be a constant sample, so we need to store it at load
time and use the load's dest at interpolate_at time.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
15aabcd806
nir_to_tgsi: Add support for load_barycentric_sample.
...
This is used for var->data.sample inputs, which are already declared to be
TGSI_INTERPOLATE_LOC_SAMPLE, so we can just use the interpolated inputs.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
80c007a4dd
nir_to_tgsi: Add support for declaring image arrays.
...
Required for virgl.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
8d6f738007
gallium/ureg: Sort the input decls, too.
...
Just like outputs, virglrenderer needs its inputs sorted. Should be
harmless for other TGSI producers, and makes the declarations more
readable.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
441643b105
nir_to_tgsi: Add support for load_output/load_per_vertex_output.
...
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
96cf3b3595
nir_to_tgsi: Include txf_ms's sample index.
...
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
ba6368b54d
mesa/st: Don't bump locations of patch vars for !PIPE_CAP_TEXCOORD.
...
There's no need to reserve the bottom 9 VARYING_SLOT_PATCH*, since
VARYING_SLOT_TEXCOORD won't be mapped there. This helps us match up with
nir_to_tgsi, which wasn't shifting down by 9 for patch.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Mike Blumenkrantz
2f6debfd6d
lavapipe: inherit from vk_image
...
simple and easy since we don't use much of this anyway
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13146 >
2021-10-06 03:10:06 +00:00
Dave Airlie
9392bd89e9
llvmpipe/cs: change submission pattern for threadpool
...
Recent ncnn benchmarks showed a slowdown, and this change seemed
more likely.
The batching into threads for the main workloads is fine, however
the remainder stuff doesn't get spread out and can bottleneck in
one thread.
Switch to a model where the initial work is batched, but the
remainder is iterated over one by one.
Brings ncnn benchmarks back in line with previously.
Fixes: 69109e0b19 ("llvmpipe/cs: rework thread pool for avoid mtx locking")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13210 >
2021-10-06 02:42:20 +00:00
Lionel Landwerlin
3924df9fe7
anv: enable VK_KHR_maintenance4
...
v2 (Jason Ekstrand):
- Get maxBufferSize from ISL.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Jason Ekstrand
231653ea35
intel/isl: Add a max_buffer_size limit to isl_device
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
9edbd13f81
anv: implement vkGetDeviceImageSparseMemoryRequirementsKHR
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
4075dd16ab
anv: implement vkGetDeviceImageMemoryRequirementsKHR
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
9058fd8979
anv: move VkImage object allocation to anv_CreateImage
...
v2 (Jason Ekstrand):
- Switch the order of arguments to be device, image, other stuff
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Jason Ekstrand
8c2a1ed3da
anv: Add an anv_image_get_memory_requirements helper
...
This is similar to a patch from Lionel except works in terms of aspects
rather than bindings. This makes it easy to use from the Android code.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
76b1d04e72
anv: remove unused function
...
Fixes: 49908c602f ("anv/android: Rework our handling of AHardwareBuffer imports")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
f2397badc4
anv: implement vkGetDeviceBufferMemoryRequirementsKHR
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
8072cc8f20
anv: move GetBufferMemoryRequirement with other buffer functions
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Jason Ekstrand
7677f1d09e
vulkan: Update the XML and headers to 1.2.195
...
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Ian Romanick
cb28361642
nir/algebraic: Small optimizations for SpvOpFOrdNotEqual and SpvOpFUnordEqual
...
No shader-db changes on any Intel platform.
Fossil-db results:
All Intel platforms had similar results. (Ice Lake shown)
Instructions in all programs: 144380118 -> 143692823 (-0.5%)
SENDs in all programs: 6920822 -> 6920822 (+0.0%)
Loops in all programs: 38299 -> 38299 (+0.0%)
Cycles in all programs: 8434782176 -> 8423078994 (-0.1%)
Spills in all programs: 206830 -> 204469 (-1.1%)
Fills in all programs: 318737 -> 313660 (-1.6%)
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12320 >
2021-10-06 01:53:47 +00:00
Ian Romanick
0cf25f559f
spirv: Generate shorter code for SpvOpFUnord comparisons
...
No shader-db or fossil-db changes on any Intel platform.
v2: Keep the flt <-> fge switcharoo local to the SpvOpFUnordLessThan,
etc. handling. Add a comment explaining why the suboptimal
SpvOpFUnordEqual implementation is used here. Suggested by Caio.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12320 >
2021-10-06 01:53:47 +00:00
Ian Romanick
1ce48ce91d
spirv: SpvOpFUnordNotEqual doesn't need special treatment
...
The NIR fneu opcode already matches the "unordered not equal" semantics
of the SPIR-V opcode.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12320 >
2021-10-06 01:53:47 +00:00
Ian Romanick
f8148b861f
spirv: Minor cleanup in SpvOpFOrdNotEqual
...
v2: Add a comment explaining why the suboptimal SpvOpFOrdNotEqual
implementation is still used here.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12320 >
2021-10-06 01:53:47 +00:00
Ian Romanick
803b754b81
spirv: Silence unused parameter warnings in vtn_alu.c
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12320 >
2021-10-06 01:53:47 +00:00
Mike Blumenkrantz
c074b2d812
ci: updates
...
fails are from #4571
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12831 >
2021-10-06 01:12:29 +00:00
Mike Blumenkrantz
a2fb67209e
zink: support 16bit rgbx formats
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12831 >
2021-10-06 01:12:29 +00:00
Alyssa Rosenzweig
c00e7b729f
pan/bi: Optimize abs(derivative)
...
We implement fine derivatives as:
broadcast(x, (lane & ~1) + 1) - broadcast(x, lane & ~1)
Most of the complexity is to get the right sign. If we can ignore the
sign, we can generate the simpler code:
broadcast(x, lane ^ 1) - lane
This is a particular win on v7+ where the broadcast instruction (CLPER)
can do `lane ^ value` for free. However, even on v6 where we lower to an
explicit XOR instruction, it's still a win.
The limiting case is fwidth. The fragment shader
gl_FragColor = fwidth(vec4_varying);
has the following results on v6, v7, and v9:
G72 (-26% instructions, -43% cycles):
38 inst, 30 tuples, 5 clauses, 1.166667 cycles, 1.166667 arith, 28 quadwords
28 inst, 19 tuples, 4 clauses, 0.666667 cycles, 0.666667 arith, 19 quadwords
G76 (-37% instructions, -54% cycles):
38 inst, 30 tuples, 5 clauses, 1.166667 cycles, 1.166667 arith, 28 quadwords
24 inst, 16 tuples, 4 clauses, 0.541667 cycles, 0.541667 arith, 18 quadwords
G78 (-40% instructions, -56% cycles):
40 inst, 1.125000 cycles, 0.250000 fma, 0.109375 cvt, 1.125000 sfu, 20 quadwords
24 inst, 0.500000 cycles, 0.250000 fma, 0.015625 cvt, 0.500000 sfu, 12 quadwords
shader-db tells a similar story -- most shaders are unaffected, but a
shader that uses fwidth has a 20% reduction in cycle count:
instructions helped: shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 264 -> 262 (-0.76%)
instructions helped: shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 36 -> 28 (-22.22%)
tuples helped: shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 27 -> 22 (-18.52%)
tuples HURT: shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 211 -> 212 (0.47%)
clauses HURT: shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 32 -> 33 (3.12%)
cycles helped: shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 1 -> 0.79 (-20.83%)
arith helped: shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 1 -> 0.79 (-20.83%)
quadwords helped: shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 31 -> 28 (-9.68%)
quadwords HURT: shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 176 -> 178 (1.14%)
total instructions in shared programs: 148370 -> 148360 (<.01%)
instructions in affected programs: 300 -> 290 (-3.33%)
helped: 2
HURT: 0
total tuples in shared programs: 124188 -> 124184 (<.01%)
tuples in affected programs: 238 -> 234 (-1.68%)
helped: 1
HURT: 1
helped stats (abs) min: 5.0 max: 5.0 x̄: 5.00 x̃: 5
helped stats (rel) min: 18.52% max: 18.52% x̄: 18.52% x̃: 18.52%
HURT stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.47% max: 0.47% x̄: 0.47% x̃: 0.47%
total clauses in shared programs: 25692 -> 25693 (<.01%)
clauses in affected programs: 32 -> 33 (3.12%)
helped: 0
HURT: 1
total cycles in shared programs: 12132.04 -> 12131.83 (<.01%)
cycles in affected programs: 1 -> 0.79 (-20.83%)
helped: 1
HURT: 0
total arith in shared programs: 4623.75 -> 4623.54 (<.01%)
arith in affected programs: 1 -> 0.79 (-20.83%)
helped: 1
HURT: 0
total quadwords in shared programs: 110386 -> 110385 (<.01%)
quadwords in affected programs: 207 -> 206 (-0.48%)
helped: 1
HURT: 1
helped stats (abs) min: 3.0 max: 3.0 x̄: 3.00 x̃: 3
helped stats (rel) min: 9.68% max: 9.68% x̄: 9.68% x̃: 9.68%
HURT stats (abs) min: 2.0 max: 2.0 x̄: 2.00 x̃: 2
HURT stats (rel) min: 1.14% max: 1.14% x̄: 1.14% x̃: 1.14%
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12332 >
2021-10-06 00:40:57 +00:00
Alyssa Rosenzweig
3e8f540753
nir: Add Mali-specific derivative opcodes
...
Add derivative opcodes fddx_must_abs_mali/fddy_must_abs_mali satisfying:
fabs(fdd*_must_abs_mali(v)) = fabs(fdd*(v))
The sign of their result is undefined.
On Bifrost and Valhall, these unsigned derivatives can be implemented
more efficiently than the correctly-signed counterparts, since the sign
fixup requires extra ALU instructions. On backends where this is the
case, it is useful to optimize fabs(fdd*(v)) to
fabs(fdd*_must_abs_mali(v)). This pattern comes up with the GLSL builtin
`fwidth`.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12332 >
2021-10-06 00:40:57 +00:00
Joshua Ashton
72c0e57e7e
ac/surface: Use 64 && 128 for GFX10_3 on non-modifier path
...
DCC_IND_BLK is not hooked up for this to work in the kernel in any released version, and it's unsafe to do so even if it was because it doesn't check the modifiers.
There's no reason to change the legacy non-modifier path to be more performant at the expense of breaking backwards compatibility with older versions of Mesa.
Fixes: 0f6251b3 ("ac/surface: use DCC compatible with image stores for < 4K resolutions")
Closes : #5422
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13122 >
2021-10-06 00:13:46 +00:00
Marek Olšák
82b420df32
mesa: use simple_mtx_t for ShaderIncludeMutex
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
2021-10-05 23:46:14 +00:00
Marek Olšák
f6abb3445b
mesa: use simple_mtx_t for TexMutex
...
change mtx_recursive -> mtx_plain, there's no recursive locking
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
2021-10-05 23:46:14 +00:00
Marek Olšák
826e03e6e5
gallium/pb_slab: use simple_mtx_t
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
2021-10-05 23:46:14 +00:00
Marek Olšák
5a5637d6ae
gallium/pb_cache: use simple_mtx_t
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
2021-10-05 23:46:14 +00:00
Marek Olšák
b4afe25ebf
util/queue: use simple_mtx_t for finish_lock
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
2021-10-05 23:46:14 +00:00
Marek Olšák
28bde89556
util/slab: use simple_mtx_t
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
2021-10-05 23:46:14 +00:00
Marek Olšák
8f68978caa
mesa: add missing unlock_texture into generate_texture_mipmap
...
Fixes: 5a39938b00 "mesa: Throw an error for compressed glGenerateMipmap on GLES2 contexts."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152 >
2021-10-05 23:46:14 +00:00
Enrico Galli
c79ec5ea3c
nir_to_dxil: Add tagging raw SRVs in shader flags
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13157 >
2021-10-05 23:32:18 +00:00
Dave Airlie
1d48022dab
gallivm/format: clamp SINT conversion rather than truncate.
...
KHR-GL32.packed_pixels.pbo_rectangle.r16i on zink on lavapipe
ends up using a pbo that does an SINT image write. This was producing
truncated rather than clamped values.
Fix the calculations for 8/16-bit signed ints to clamp not truncate.
Fixes: 13e5f331db ("gallivm/nir: fix image store conversions")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13187 >
2021-10-05 23:11:57 +00:00
Emma Anholt
60f464bbce
i915g: Check for the scanout-layout conditions before setting level info.
...
Fixes leaks (release) or assertion failures (debug) on allocating small
scanout resources, when falling through to the non-scanout-specific layout
code, which became more common as of ad50b47a14 ("gbm: assume
USE_SCANOUT in create_with_modifiers").
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13202 >
2021-10-05 22:36:36 +00:00
Alyssa Rosenzweig
f0325ca3da
panfrost: Fix PAN_MESA_DEBUG=sync with INTEL_blackhole_render
...
We need to ignore the "sync" in this case, or we'll crash with
"incomplete job" since we never submitted the work. Fixes the Piglit
intel_blackhole-draw_gles2 when run in CI.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070 >
2021-10-05 21:13:52 +00:00
Alyssa Rosenzweig
12facf23b1
panfrost: Don't set CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER
...
We already set HALF_INTEGER, which is what the compiler actually does.
If we also set PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER, we get
incorrect lowering. Only set the CAP we respect.
On Bifrost, this convention is arbitrary. We should consider moving the
Bifrost lowering into NIR to optimize this better...
Fixes Piglit glsl-arb-fragment-coord-conventions.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070 >
2021-10-05 21:13:52 +00:00
Alyssa Rosenzweig
b88225378d
panfrost: Introduce PAN_MAX_VARYINGS define
...
The number of varying records we need to reserve in the worst case is
greater than the number of source-level varyings we advertise
(gl_Position, gl_PointSize...)
We advertise MAX_VARYINGS source level varyings, which means anywhere we
manipulate varyings we need up to (MAX_VARYINGS + max non-source level
varyings) records. Add a PAN_MAX_VARYINGS define for this and use it
throughout.
Fixes a buffer overflow in Piglit glsl-max-varyings, which now passes
instead of crashes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070 >
2021-10-05 21:13:52 +00:00
Alyssa Rosenzweig
9c8311b737
panfrost: Fix off-by-one in varying count assert
...
We want to assert that the number of varyings (the count) is at most the
the maximum count. This is <=, not <, with the assertion previously
failing for exactly the maximum.
Fixes: 2c2cf0ecfe ("panfrost: Streamline varying linking code")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070 >
2021-10-05 21:13:52 +00:00
Alyssa Rosenzweig
00b0529061
panfrost: Move special_varying to compiler definitions
...
The number of special varyings on midgard can influence how much space
we need to allocate for varyings in the compiler ABI. Move the enum so
we can get access it.
No functional change. This is cc stable purely so the following patches
can be backported.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070 >
2021-10-05 21:13:52 +00:00
Pavel Asyutchenko
7ffb152276
llvmpipe: fix crash when doing FB fetch + gl_FragDepth write in one shader
...
Reproducible by piglit test from this MR:
https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/576
Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12705 >
2021-10-05 20:45:38 +00:00
Emma Anholt
48499a8d44
turnip: Replace our format table with fd6_format_table.
...
Now we have a common format table with just a little bit of overriding in
turnip, which I hope we can decrease over time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:18 +00:00
Emma Anholt
3bc681d87f
turnip: Do format lookups from the fd6 format table and cross-check.
...
Intermediate step to make sure things stay the same as I transition us to
sharing the format table.
The YUV special casing is pretty not the prettiest, but I'm hoping to
continue working on planar RGB formats as pipe formats separately.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:18 +00:00
Emma Anholt
3d53b43dab
turnip: Switch tu_format internals to using pipe_format more.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:18 +00:00
Emma Anholt
bfe36ad3f1
turnip: Give D32_SFLOAT_S8_UINT a native format.
...
We won't actually use the native format here, as when sampling our image
we we just see the format for either the D or S aspect. This syncs us up
with freedreno's table, though.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:18 +00:00
Emma Anholt
70ecd3a119
freedreno/a6xx: Enable UBWC for RGBA5551 (and 1555) textures.
...
Turnip has it enabled, and it seems to be happy in the CTS.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
38f23b1108
freedreno/a6xx: Add support for A/XRGB1555 formats.
...
This switches the format we use by default for GLES's rgb5_a1, and means
that our formats supported more closely matches turnip.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
ebaeddcbb3
freedreno/a6xx: Rewrite the format table format/swap helpers.
...
We need to take a tiling mode to in order to support 1555 like turnip
does, and I like this naming better.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
1ce837d6f4
freedreno/a6xx: Make the format table const.
...
This data never changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
4d6f5cd572
freedreno/a6xx: Use fd6_pipe2tex() for the 2D src format.
...
The differences between the two are:
- tex supports more formats (fine, we've already decided on which formats
we can blit)
- FMT6_10_10_10_2_UNORM instead of FMT6_10_10_10_2_UNORM_DEST.
- FMT6_A8_UNORM for PIPE_FORMAT_A8_UNORM.
For 1555 support we get another difference between tex and color, and we
need 2/3 of the tex differences for blit srcs, so switch it over. This
also matches what turnip does (except it doesn't have A8 as a format).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
7952a17f7f
freedreno/a6xx: Put R8_G8_B8_420_UNORM in the format table.
...
turnip will use this format, even if we don't have the freedreno side
rigged up yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
e47b4ba629
util/format: Add an RGB planar format for YV12, like we have for NV12.
...
Turnip will use this for mapping the to the corresponding hardware format,
and we could also extend mesa/st to avoid adding extra samplers for
external image sampling of YV12 on freedreno.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
ab0462e05d
freedreno/a6xx+: Add support for the R8G8_R8B8 and G8R8_B8R8 formats.
...
This means that EGLimage imports of YUYV and UYVY can use a single sampler
instead of having to create RGBA8 and RG8 samplers mapping the same
texture. The swizzles are the same as turnip uses, and it makes the
piglit tests for these formats happy.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
a7459b5409
freedreno/a6xx: Add some more 16-bit rgb/rgba swaps to our format tables.
...
BGR565 is chosen for GL_RGB565 and BGRA4 for GL_RGBA4, so it doesn't
change GLES's behavior.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
4b36e7b1b5
freedreno/a6xx: Drop texturing support from other scaled formats.
...
GLES doesn't expose these texture formats, and we don't want to start
exposing them when turnip starts using our tables.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
20d02f347d
freedreno/a6xx: Add support for EXT_texture_sRGB_R8/RG8.
...
Noticed to be missing when comparing format tables between turnip and
freedreno. Passes dEQP-GLES31 fine.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
d275184ed2
freedreno/a6xx: disable vertex fetch support flag for b8g8r8a8_srgb.
...
We don't have an srgb decode flag on vertex fetch, r8g8b8a8_srgb isn't
supported either, and GL doesn't ask for vertex fetch for this anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
1573af4138
freedreno/a6xx: Add int/scaled/snorm vertex formats to match turnip.
...
Noticed because the vertex formats didn't match up between the two. GL
doesn't actually look for these vertex formats, though.
Having these marked as supporting texture or color could theoretically
change things I think.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Emma Anholt
bdddcc4d3f
freedreno/a6xx: Move the format table to common code.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Filip Gawin
a3f553beab
r300: fix UB caused by 1 << 31 and 2 << 30
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13158 >
2021-10-05 19:07:27 +00:00
Chia-I Wu
eed0fc4caf
vulkan/wsi/wayland: fix an invalid u_vector_init call
...
u_vector_init requires size to be power-of-two.
Fixes: 151b65b211 ("vulkan/wsi/wayland: generalize modifier handling")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13186 >
2021-10-05 17:42:41 +00:00
Danylo Piliaiev
d2543658ef
turnip: clamp per-tile scissors to max viewport size in binning pass
...
Tiles on the edge may cross maximum viewport size, we have to clamp
per-tile scissor to maximum allowed viewport dimensions.
Add MAX_VIEWPORT_SIZE constant along the way.
Fixes vkd3d test "test_draw_uav_only"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13197 >
2021-10-05 14:27:44 +00:00
Jason Ekstrand
492e182a8a
radv: Use VK_DEFINE_*HANDLE_CASTS instead of rolling our own
...
The core ones have some nifty stuff like asserts that it's a valid
vk_object_base and has the right type. We don't have real type safety
with Vulkan handles but this is as close as we can get. The core ones
also track when we've started handing out handles for logging purposes
which we want.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13100 >
2021-10-05 09:02:03 -05:00
Tapani Pälli
811bf72f9f
intel/blorp: fix a compile warning about uninitialized use
...
warning: ‘bind_offset’ may be used uninitialized in this function
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13190 >
2021-10-05 11:59:27 +00:00
Lionel Landwerlin
d0a3a11258
nir/lower_io: preserve all metadata when no progress
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13168 >
2021-10-05 11:23:23 +00:00
Samuel Pitoiset
fb2d031047
radv/llvm: fix exporting VS parameters
...
My mistake.
Fixes: 2aa705ec87 ("radv: determine the VS output parameters in the shader info pass")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13191 >
2021-10-05 12:37:57 +02:00
Lionel Landwerlin
5d7ab9ea6a
anv: remove redundant VertexURBEntryReadLength setting
...
We're setting the same field a dozen lines below to the exact same
value.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13169 >
2021-10-05 10:30:51 +00:00
Marcin Ślusarz
e26328582a
nir: preserve all metadata when nir_opt_vectorize doesn't make progress
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
54df09c8d4
nir: preserve all metadata when nir_propagate_invariant doesn't make progress
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
804c56f1a2
nir: preserve all metadata when nir_lower_int_to_float doesn't make progress
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
87ecdd4eff
glsl: preserve all metadata when lower_buffer_interface_derefs doesn't make progress
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
338955b53c
anv: preserve all metadata when anv_nir_lower_multiview doesn't make progress
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
6e0c38567f
anv: use nir_shader_instructions_pass in anv_nir_lower_ycbcr_textures
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
8c592e386a
anv: use nir_shader_instructions_pass in anv_nir_add_base_work_group_id
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
1faebd0936
intel/compiler: use nir_metadata_none instead of its value
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
71bec85db0
intel/compiler: use nir_shader_instructions_pass in brw_nir_opt_peephole_ffma
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
9e6acd801d
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_storage_image
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
10a33b046e
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_scoped_barriers
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
3d0332eb12
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_mem_access_bit_sizes
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
183987d438
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_conversions
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
5b8c993d50
intel/compiler: use nir_shader_instructions_pass in brw_nir_clamp_image_1d_2d_array_sizes
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Marcin Ślusarz
9e22e0838a
intel/compiler: use nir_shader_instructions_pass in brw_nir_demote_sample_qualifiers
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
- pass returns true ONLY when it makes progress ("progress" was initialized incorrectly)
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189 >
2021-10-05 10:02:54 +00:00
Samuel Pitoiset
ae4be2d7ae
radv: fix vk_object_base_init/finish for internal device memory objects
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13172 >
2021-10-05 07:45:48 +00:00
Samuel Pitoiset
87505442de
radv: fix writing combined image/sampler descriptor
...
This will crash with the common Vulkan handles if sampler is NULL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13172 >
2021-10-05 07:45:48 +00:00
Samuel Pitoiset
b0bd0aac6e
radv: fix vk_object_base_init/finish for push descriptors
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13172 >
2021-10-05 07:45:48 +00:00
Lionel Landwerlin
4e4560ab6f
intel/compiler: add missing line returns to logs
...
In the upcoming intel_clc tool, we're allowing to print these messages
out and some of them just don't look right.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13165 >
2021-10-05 07:31:52 +00:00
Lionel Landwerlin
710393b3aa
anv: enable UBO indexing
...
We added support but didn't expose it through the API.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: b704d03efd ("anv: Do UBO loads with global addresses for bindless")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5426
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13097 >
2021-10-05 07:16:49 +00:00
Dave Airlie
0a592db573
crocus/query: don't loop on ready status after gpu hang.
...
When a GPU hang occurs, the syncobj will eventually timeout,
if this is a wait, just set ready, so things will continue.
This matches 965 behaviour better.
Fixes: c282a082be ("crocus/query: poll the syncobj in the no wait situation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13188 >
2021-10-05 12:18:30 +10:00
Dave Airlie
f2bc6e400e
crocus/gen6: don't reemit the svbi when debugging
...
This messes up the counts, stops some tests failing when reemit
is enabled
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13188 >
2021-10-05 12:18:17 +10:00
Emma Anholt
85e428f1e0
freedreno/tools: Fix build failure when cffdump isn't built but tests are.
...
Can't test the tool if we don't build it. Move the other test definition
next to the tool, too.
Fixes: 82b5c95265 ("freedreno: Move crashdec/cffdec tests to be meson unit tests.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13183 >
2021-10-05 00:06:14 +00:00
Jason Ekstrand
2f55aace9c
vulkan/physical_device_features: Stop generating a header
...
It only has one entrypoint and nothing in it is based on code-gen. We
can put that one entrypoint in vk_physical_device.h instead.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13150 >
2021-10-04 22:42:32 +00:00
Jason Ekstrand
ec9619a83e
vulkan/physical_device_features: Drop some unnecessary dependencies
...
None of these are actually used. We parse the XML bare and don't need
any extension or entrypoint information.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13150 >
2021-10-04 22:42:32 +00:00
Emma Anholt
b86da01c54
ci/freedreno: Restart the run if cheza spontenously reboots.
...
Occasionally (once every couple weeks?) a cheza reboots mid run, around a
GPU fault. Detect that and do an internal retry instead of failing out
the job.
Closes : #5388
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13181 >
2021-10-04 22:15:27 +00:00
Emma Anholt
9d1d2d7e43
panfrost: Disable flaky piglit job for now.
...
It's been getting intermittent failures on marge since being enabled, turn
it back off until it can get stabilized.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13180 >
2021-10-04 21:43:27 +00:00
Samuel Pitoiset
01155e97f5
ci: enable building RADV in debian-release
...
To build RADV without LLVM.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13117 >
2021-10-04 21:11:35 +00:00
Rob Clark
cd38b3ec54
Revert "freedreno: Move the batch cache to the context."
...
This reverts commit b2349a4671 .
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5441
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159 >
2021-10-04 20:24:59 +00:00
Rob Clark
398a731af9
Revert "freedreno: Remove the submit lock locking."
...
This reverts commit 22486ffa51 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159 >
2021-10-04 20:24:59 +00:00
Rob Clark
52a2253071
Revert "freedreno: Use a BO bitset for faster checks for resource referenced."
...
This reverts commit 3ade94df86 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159 >
2021-10-04 20:24:59 +00:00
Rob Clark
fbf324ee6c
Revert "freedreno: Remove dead fd_batch_reset()."
...
This reverts commit 63cc1fe71f .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159 >
2021-10-04 20:24:59 +00:00
Rob Clark
93df18e889
Revert "freedreno: Fix autotune regression since batch-cache rework."
...
This reverts commit b8c4ad378d .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159 >
2021-10-04 20:24:59 +00:00
Rob Clark
53917ab403
zink: Disable TC syncs for get_device_reset_status()
...
zmike said it should work.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163 >
2021-10-04 19:45:28 +00:00
Rob Clark
5b7c81fd13
freedreno: Disable TC syncs for get_device_reset_status()
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163 >
2021-10-04 19:45:28 +00:00
Rob Clark
75808934f8
gallium/u_threaded: Get reset status without sync
...
GPU hangs are asynchronous already, there should not be an expectation
that this is synchronized with driver thread.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163 >
2021-10-04 19:45:28 +00:00
Caio Marcelo de Oliveira Filho
1a20cfb7d6
anv: Identify code paths specific to graphics primitive pipeline
...
In preparation for adding support for the graphics mesh pipeline,
identify all the paths that are specific the primitive pipeline.
This shouldn't change any behavior since the code currently only
supports the primitive pipeline.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047 >
2021-10-04 18:55:56 +00:00
Caio Marcelo de Oliveira Filho
a63aa9ad41
anv: Move together primitive pipeline emit calls
...
Just moving code and the packet order, no functional change expected.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047 >
2021-10-04 18:55:56 +00:00
Marcin Ślusarz
1f1ad5a9b4
anv: Use input assembly state only when pipeline has vertex stage
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047 >
2021-10-04 18:55:56 +00:00
Marcin Ślusarz
d79c518a32
anv: Set graphics pipeline active_stages earlier
...
So that we can use the active_stages in copy_non_dynamic_state() later.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047 >
2021-10-04 18:55:56 +00:00
Caio Marcelo de Oliveira Filho
bc2545fc57
anv: Validate vertex related states only when VS is present
...
Mesh pipeline doesn't use those states, so we can't assert them
unconditionally for a graphics pipeline.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047 >
2021-10-04 18:55:56 +00:00
Jesse Natalie
82c69c9a9d
compiler/clc: Preserve OCL kernel arg type metadata on LLVM13
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13177 >
2021-10-04 18:16:01 +00:00
Jesse Natalie
3a752256f5
compiler/clc: Null extensions should mean all supported, not all
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13177 >
2021-10-04 18:16:01 +00:00
Marcin Ślusarz
b8cafaa91d
lima: use nir_shader_instructions_pass in lima_nir_split_load_input
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13176 >
2021-10-04 15:54:06 +00:00
Adam Jackson
aa30e58600
wsi/x11: Fix a misunderstanding about how xcb_get_geometry works
...
The code here is well-intentioned, but the only way a GetGeometry
request can fail is if you name an invalid drawable. And if we did that,
either our internal state got corrupted, or - more likely - the user
destroyed the window. In either case there's nothing more we can do with
the surface, so report that it's been lost.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13104 >
2021-10-04 15:30:06 +00:00
Rob Clark
ac783acd74
freedreno: Handle PIPE_FORMAT_NONE buffers
...
Clover creates buffers with format=NONE.. which is not technically
incorrect. Just treat this as r8_unorm so we know width0 is the size
in bytes.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160 >
2021-10-04 15:10:07 +00:00
Rob Clark
9e74f458a8
freedreno: Handle cso==NULL in bind_sampler_states
...
This is a thing that comes up with clover.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160 >
2021-10-04 15:10:07 +00:00
Rob Clark
96b37b9546
freedreno/ir3: Remove used unused
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160 >
2021-10-04 15:10:07 +00:00
Rob Clark
748583d808
freedreno: Fix some indentation
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160 >
2021-10-04 15:10:07 +00:00
Rob Clark
6223f29a87
freedreno: Optimize no-op submits
...
In some cases we need to emit a no-op batch/submit, just to get a fence.
No need to emit all the boilerplate state-resture and flushing in this
case.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160 >
2021-10-04 15:10:07 +00:00
Rob Clark
383df59987
freedreno: Get shader variant msgs in perf debug output
...
We want FD_MESA_DEBUG=perf to also tell us about variants.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160 >
2021-10-04 15:10:07 +00:00
Icecream95
ad60fffd49
pan/mdg: Use the correct swizzle for condition moves
...
Fixes: 70072a20e0 ("pan/midgard: Refactor swizzles")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13173 >
2021-10-04 14:55:07 +00:00
Boris Brezillon
d34c1dc93d
panvk: Support clearing ZS attachments
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137 >
2021-10-04 14:34:55 +02:00
Boris Brezillon
c3ebd8ddac
panvk: Allow clear_attachment of RTs > 0
...
It's just a matter of skipping unused BLEND descriptors and emitting
the one we want to clear.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137 >
2021-10-04 14:34:55 +02:00
Boris Brezillon
555e6626c2
panvk: Pass the render target index to panvk_meta_clear_attachment()
...
The attachment index and render target don't necessarily match. We need
to explicitly pass the render target index to
panvk_meta_clear_attachment() so it can select the correct shader and
emit a valid RSD.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136 >
2021-10-04 12:17:07 +00:00
Boris Brezillon
3ba34f6633
panvk: Fix wls_size retrieval
...
Fix a typo in wls_size assignment leading to a wrong wls_size.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136 >
2021-10-04 12:17:07 +00:00
Boris Brezillon
4692baacfb
panvk: Don't use panfrost_get_default_swizzle() on v7+
...
This helper produces invalid component order values on v7. Use the
MALI_RGB_COMPONENT_ORDER_xxx definitions instead.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136 >
2021-10-04 12:17:07 +00:00
Boris Brezillon
8acc8f6a0e
panvk: Fix allocation of BOs bigger than the slab size
...
We can pick a BO from the pool if the BO size exceeds the pool size. In
that case, allocate a BO and save it in a separate array so we can free
it when the memory pool is reset or released.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136 >
2021-10-04 12:17:07 +00:00
Joshua Ashton
4e58d30d98
radv: Add force_emulate_rt perftest option
...
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974 >
2021-10-04 11:52:40 +00:00
Joshua Ashton
26826a7d60
radv: Enable raytracing extensions on older generations
...
We have shader-based bvh traversal for this on older generations now.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974 >
2021-10-04 11:52:40 +00:00
Joshua Ashton
548382de42
radv: Implement software emulation for intersect_ray
...
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974 >
2021-10-04 11:52:40 +00:00
Joshua Ashton
a0f51921a6
radv: Implement build_node_to_addr for GFX8 and below
...
Removes the nir_ prefix also given it no longer acts like a typical builder function.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974 >
2021-10-04 11:52:40 +00:00
Joshua Ashton
ff087dd601
radv: Do not pass result to insert_traversal_aabb_case
...
This is unused as it performs the tests itself.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974 >
2021-10-04 11:52:40 +00:00
Joshua Ashton
e30a714ad9
radv: Remove assert in radv_rt_bind_tables
...
Not necessary anymore.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974 >
2021-10-04 11:52:40 +00:00
Samuel Pitoiset
87c732bfee
radv: determine the ES type (VS or TES) for GS earlier
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170 >
2021-10-04 12:13:10 +02:00
Samuel Pitoiset
75e5795d41
radv: remove useless loads_dynamic_offsets when emitting push constants
...
It's always TRUE if loads_push_constants is TRUE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170 >
2021-10-04 12:13:10 +02:00
Samuel Pitoiset
f901294c0a
radv: remove redundant check of needs_multiview_view_index for PS
...
layer_input is always TRUE if needs_multiview_view_index is TRUE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170 >
2021-10-04 12:13:10 +02:00
Samuel Pitoiset
69e656dae4
radv: move use of NGG to the graphics pipeline key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099 >
2021-10-04 10:05:18 +00:00
Samuel Pitoiset
0fa431087c
radv: move forcing VRS rates to the graphics pipeline key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099 >
2021-10-04 10:05:18 +00:00
Samuel Pitoiset
5bacc668fa
radv: move forcing MRT output NaN fixup to the graphics pipeline key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099 >
2021-10-04 10:05:18 +00:00
Samuel Pitoiset
fb453d80a4
radv: move forcing invariant geometry to the graphics pipeline key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099 >
2021-10-04 10:05:18 +00:00
Samuel Pitoiset
421b5379df
radv: move forcing discard to demote to the graphics pipeline key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099 >
2021-10-04 10:05:18 +00:00
Samuel Pitoiset
38c34bf132
radv: constify radv_shader_info for radv_lower_{io_to_mem,ngg}()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134 >
2021-10-04 08:55:19 +00:00
Samuel Pitoiset
b52aaea630
radv: remove unnecessary ac_nir_ngg_config output struct
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134 >
2021-10-04 08:55:19 +00:00
Samuel Pitoiset
52e91f7640
radv: move ngg passthrough determination earlier
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134 >
2021-10-04 08:55:19 +00:00
Samuel Pitoiset
2ce78a30ff
move: move ngg lds bytes determination earlier
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134 >
2021-10-04 08:55:19 +00:00
Samuel Pitoiset
90858dd718
radv: move ngg early prim export determination earlier
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134 >
2021-10-04 08:55:19 +00:00
Rhys Perry
24501b5452
radv: move ngg culling determination earlier
...
Co-Authored-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134 >
2021-10-04 08:55:19 +00:00
Samuel Pitoiset
5896bf41ca
radv: do not declare an extra user SGPR for sample positions and PS
...
This is part of the scratch buffer.
No fossils-db change on Sienna.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13140 >
2021-10-04 08:30:38 +00:00
Pierre-Eric Pelloux-Prayer
dfa4a85ddf
radeonsi: don't clear G_028644_OFFSET
...
Before 11d1309d82 this field was updated even when G_028644_PT_SPRITE_TEX was 0.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423
Fixes: 11d1309d82 ("radeonsi: restructure si_get_ps_input_cntl for future refactoring")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13105 >
2021-10-04 08:04:37 +00:00
Samuel Pitoiset
19a71e79b8
radv: get the float controls execution mode from NIR for LLVM
...
No need to duplicate it. Though, I think it was already broken
for merged shaders, but it doesn't matter.
No CTS regressions anyways with LLVM.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12989 >
2021-10-04 07:42:19 +00:00
Samuel Pitoiset
55e6a68f69
radv: disable the DX10 diamond test for better line rasterization perf
...
Ported from RadeonSI. PAL also doesn't enable it for Vulkan.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13066 >
2021-10-04 07:21:51 +00:00
Andreas Baierl
1e9f18008f
lima/parser: add shader disassembly to dump
...
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13138 >
2021-10-04 08:37:50 +02:00
Lionel Landwerlin
445996379b
clc: let user specify the targetted SPIRV version
...
This version is given to the LLVM-SPIRV translator. On the SPIRV-Tools
side of things, we want to use the highest available version to be
sure to be able to parse back what was generated.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113 >
2021-10-03 19:32:54 +00:00
Lionel Landwerlin
72fd81d0ac
clc: print warnings/errors on their own line
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113 >
2021-10-03 19:32:54 +00:00
Lionel Landwerlin
3c8c817ae7
clc: add allowed extension for compile parameter
...
The LLVM-SPIRV translator can include a bunch of capabilities into the
generated SPIRV which is not what you always want. That include
internal Intel specific capabilities from the translator.
v2: Rename options
Fixup checks (Jesse)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113 >
2021-10-03 19:32:54 +00:00
Mike Blumenkrantz
9e3293bcd4
zink: ensure fences are released before reusing them
...
at this point it's guaranteed that the cmdbuf has completed since the
timeline id has passed, but vulkan hasn't technically "released" the fence
until it's been waited upon, so cut down on some validation spam by waiting
here like in get_batch_state()
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13144 >
2021-10-03 14:57:03 +00:00
Mike Blumenkrantz
477855fce4
zink: stop using VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
...
the pool is reset anyway so this is unnecessary
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13145 >
2021-10-03 10:43:39 -04:00
Bas Nieuwenhuizen
0dd0f6cf75
radv: Don't invalidate VCACHE after clear_htile_mask.
...
radv_src_access_flush sets all the required flags (which doesn't include VCACHE. The
flush after write is implicit. The invalidate happens for any user that needs it
with the radv_dst_access_flush).
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12274 >
2021-10-03 12:16:55 +00:00
Lionel Landwerlin
9667539b96
anv: honor INTEL_DEBUG=sync
...
Useful debug option for hangs.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13161 >
2021-10-03 11:01:18 +00:00
Bas Nieuwenhuizen
c6b8702eb4
radv: Fix Android build for common functions.
...
Fixes: 9fc16b66d0 ("radv: use common vkGetPhysicalDevice{Image}FormatProperties()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5328
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12764 >
2021-10-03 00:36:58 +00:00
Marek Olšák
edc8a4a037
ac/surface: enable DCC image stores for all displayable DCC on gfx10.3
...
Co-authored-by: Joshua Ashton <joshua@froggi.es >
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13153 >
2021-10-02 22:56:48 +00:00
Joshua Ashton
e76956b9e0
radeonsi: Use common DCC image store check
...
We need to keep RADV and RadeonSI on the same page about this due to modifiers.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13153 >
2021-10-02 22:56:48 +00:00
Joshua Ashton
fccdebd64d
radv: Use common DCC image store check
...
We need to keep RADV and RadeonSI on the same page about this due to modifiers.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13153 >
2021-10-02 22:56:48 +00:00
Joshua Ashton
e6fcf65578
ac/surface: Add helper for checking if a surface supports DCC Image stores
...
We need to keep RADV and RadeonSI on the same page about this due to modifiers.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13153 >
2021-10-02 22:56:48 +00:00
Kenneth Graunke
0a9e46e535
iris: Delete the MI_COPY_MEM_MEM resource_copy_region implementation.
...
The MI_COPY_MEM_MEM version of resource_copy_region has known bugs:
- It's failing to set valid_buffer_range correctly
- It's missing iris_emit_buffer_barrier_for() for the
source/destination, so there may be missing flushes.
- There are some bad interactions with the tile cache and VF using L3.
Even with those fixed, if you expand the "no more than 16 bytes"
restriction to allow copies up to 1024 bytes, then it starts failing
Piglit tests on Icelake.
We could probably fix this. However, I had originally only measured a
0.689096% +/- 0.473968% (n=4) speedup in Shadow of Mordor's OpenGL
port, which is already fairly small, especially before adding missing
flushes. Further, some of that likely came from not switching between
render and compute...which we'll soon be able to avoid thanks to BLOCS.
Folks were also worried that MI_COPY_MEM_MEM can't be pipelined, and
that stalling the command streamer may actually slow things down,
especially as the GPUs become more powerful. We aren't really sure
about this, but it's another concern.
So, let's just get rid of this optimization. It seemed like a good
idea at the time, but it's just causing issues for very little gain.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12863 >
2021-10-02 01:48:59 -07:00
Emma Anholt
b40d070ab9
freedreno: Move the headergen2 test to be meson unit tests.
...
Now all the freedreno build-time testing is just "meson test -C build"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Emma Anholt
82b5c95265
freedreno: Move crashdec/cffdec tests to be meson unit tests.
...
Now they run automatically in parallel with other unit testing, rather
than needing a separate script and environment to run them.
Instead of doing shell script filtering afterwards, I just added a little
flag to suppress printing the path name. Also dropped the "Parsing
<file>" in addition to "Reading <file>" in the tested script, since it's
redundant and baked the path name into the reference.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Emma Anholt
5209a0ae16
freedreno: Move afuc tests to meson unit tests.
...
Now they run automatically in parallel with other unit testing, rather
than needing a separate script and environment to run them.
Instead of doing shell script filtering afterwards, I just added a little
flag to suppress printing the path name.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Eric Anholt
7438ea55c4
freedreno: Reuse u_math.h instead of open coding uif().
...
Plus the old version had a comment with what conversion was being done
swapped!
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Eric Anholt
db95dfe252
freedreno: Reuse u_math.h instead of open coding ALIGN/ARRAY_SIZE.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Eric Anholt
21df8b3e08
freedreno: Fix UBSan failures in cffdec's (uint8_t)x << 24
...
Types <32 bit get promoted to int32_t when you do expressions on them
(thus why (u8)x << 8 works at all), but shifting into the top bit of the
signed int is undefined behavior.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Emma Anholt
d5a80781aa
freedreno/afuc: Avoid ubsan warns about shifting to the top bit of 'int'
...
I think maybe it's being promoted to int due to the mismatched bitfield
sizes of the uint32_t values being referenced here?
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Emma Anholt
ba9e994034
freedreno/rnndec: Avoid making 0-length variable length arrays.
...
ubsan hates it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Emma Anholt
bd8bfe43fa
freedreno/rnndec: Fix use of undefined value_orig in the !ti case.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360 >
2021-10-01 23:16:04 +00:00
Filip Gawin
b47017192b
r300: implement forgotten tgsi's cases of textures
...
Fixes: d0c398a8 ("r300g: Use radeon compiler for fragment programs")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13135 >
2021-10-01 22:56:51 +00:00
Emma Anholt
5116388e0b
turnip: Expose a device name similar to the blob.
...
We add "Turnip" so that users (and vulkan.gpuinfo.org) can distinguish us
without requiring VK_KHR_driver_properties. This will be a lot more
user-friendly than "FD618", though.
I made some little vk_asprintf helpers, because I figure other drivers
setting up deviceName's will want them too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13041 >
2021-10-01 22:32:10 +00:00
Emma Anholt
7e471541e0
turnip: Match the blob's format for vendorID and deviceID.
...
This should hopefully cause us the least trouble with apps tuning for
device performance.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13041 >
2021-10-01 22:32:10 +00:00
Sagar Ghuge
7ddb0c9f76
iris: Enable atomic operations on compressed surfaces
...
Let's not turn off compression for atomic operations since XeHPG
supports it.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12966 >
2021-10-01 22:16:22 +00:00
Mike Blumenkrantz
2f7ea2c493
anv: support EXT_primitive_topology_list_restart
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Tested-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12628 >
2021-10-01 21:49:26 +00:00
Marek Olšák
923c535ee8
ac/surface: don't overwrite DCC settings for imported buffers
...
Fixes: 0f6251b31f - ac/surface: use DCC compatible with image stores for < 4K resolutions
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13120 >
2021-10-01 16:15:40 -04:00
Vasily Khoruzhick
5db5ff58b7
lima: split_load_input: don't split unaligned vec2
...
Mali4x0 can't fetch unaligned vec2 (i.e. .yz), so don't split it.
Fixes: 6dd0ad66de ("lima/ppir: add NIR pass to split varying loads")
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13131 >
2021-10-01 18:11:54 +00:00
Tapani Pälli
c752bb459b
panvk: remove feature checks from device creation
...
This is already handled by vk_device_init(); drivers no longer
need to do it themselves.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867 >
2021-10-01 17:37:02 +00:00
Tapani Pälli
54325dd138
lavapipe: remove feature checks from device creation
...
This is already handled by vk_device_init(); drivers no longer
need to do it themselves.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867 >
2021-10-01 17:37:02 +00:00
Tapani Pälli
f056fb1e56
v3dv: remove feature checks from device creation
...
This is already handled by vk_device_init(); drivers no longer
need to do it themselves.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867 >
2021-10-01 17:37:02 +00:00
Tapani Pälli
40c798c6bc
turnip: remove feature checks from device creation
...
This is already handled by vk_device_init(); drivers no longer
need to do it themselves.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867 >
2021-10-01 17:37:02 +00:00
Tapani Pälli
814d6b626f
radv: remove feature checks from device creation
...
This is already handled by vk_device_init(); drivers no longer
need to do it themselves.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867 >
2021-10-01 17:37:02 +00:00
Tapani Pälli
69e82462a1
anv: remove feature checks from device creation
...
This is already handled by vk_device_init(); drivers no longer
need to do it themselves.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867 >
2021-10-01 17:37:02 +00:00
Tapani Pälli
2e5718c957
vulkan: provide common functions to check device features
...
v2: move checks to vk_device_init, ignore struct types from
provisional extensions + lots of cleanups/fixes (Jason Ekstrand)
v3: squash in following patch from Jason:
"vulkan: Restructure vk_physical_device_check_device_features()"
v4 (Jason): Fix a Windows build error
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867 >
2021-10-01 17:37:02 +00:00
Samuel Pitoiset
2aa705ec87
radv: determine the VS output parameters in the shader info pass
...
This can be determined earlier instead of duplicating code in both
compiler backends.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13119 >
2021-10-01 17:11:39 +00:00
Samuel Pitoiset
89f1117c62
radv: set export_clip_dists for the GS copy shader
...
This is needed for the next change to correctly compute the VS
output parameters from the shader info pass.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13119 >
2021-10-01 17:11:39 +00:00
Timur Kristóf
c53a1dff32
radv: Don't declare ngg_gs_state when there is no API GS.
...
This shader arg is only used when the pipeline has API GS,
so it is useless to declare it otherwise.
Also remove unused code from radv_declare_shader_args.
NGG is handled by the GS code path so these were never
actually used.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129 >
2021-10-01 15:46:12 +00:00
Timur Kristóf
6ca66808b5
aco: Fix determining whether any culling is enabled.
...
Use 0xB instead of 0x00FFFFFF - this allows to jump over the culling
code when no actual culling is enabled but the ngg_cull_face_is_ccw
flag is set.
Fixes: 182d9b1e60
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129 >
2021-10-01 15:46:12 +00:00
Timur Kristóf
c13a8d20f7
aco: Fix small primitive precision.
...
This is a mistake. It should use ngg_culling_settings
instead of ngg_gs_state.
Fixes: 182d9b1e60
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129 >
2021-10-01 15:46:12 +00:00
Marek Olšák
fb8f532ea1
radeonsi: implement draw_vertex_state for lower display list overhead
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
73f7142ace
radeonsi: separate VBO descriptor code into a new function (for future work)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
e78d7fe7d5
mesa: use pipe_vertex_state in vbo and st/mesa for lower display list overhead
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
f32cefdb87
st/mesa: make setup_arrays more reusable for future display list support
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
74cb74045f
st/mesa: add ST_PIPELINE_RENDER_NO_VARRAYS, for future display list support
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
7a2458f4bd
gallium/util: add util_vertex_state_cache for deduplicating the states
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
e8cad57aa7
gallium/trace: add pipe_vertex_state support
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
0842488859
gallium/u_threaded: implement draw_vertex_state
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
1c66de3239
gallium: add pipe_vertex_state and draw_vertex_state for display lists
...
The main motivation is to improve the score of viewperf13/snx.
This new interface is designed to be optimal for display lists as implemented
by the vbo module. It has much lower CPU overhead in the frontend, threaded
context, and the driver.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
d5218f0889
gallium/util: make pipe_vertex_buffer_reference safe for hashing dst
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
6e69acad82
util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium
...
to allow pipe_*_reference to be called in src/mesa/vbo.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
bec054ec63
util: add util_popcnt_inline_asm
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Bas Nieuwenhuizen
0b92d4ec98
radv: Add GPU serialization of acceleration structures.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
5a45e2e04d
radv: Add CPU serialization of acceleration structures.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
0bf77a3fd1
radv: Add GPU copying of acceleration structures.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
c7e0a8a6f7
radv: Add CPU copying of acceleration structures.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
76fcd50e14
radv: Add GPU copy/serialization/deserialization shader.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
6def6ba04e
radv: Add acceleration structure queries.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
817b4a9aca
radv: Add copy/serialization info to accel struct headers.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
c814e42c12
radv: Add an indirect dispatch struct to the header.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
237a979419
radv: Add an internal indirect dispatch command.
...
Avoiding the entire buffer dance.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Bas Nieuwenhuizen
8500e9e1f0
radv: Add DMA buffer update function for internal use.
...
Only split out the DMA part because that doesn't need the BO.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12840 >
2021-10-01 13:43:28 +00:00
Mike Blumenkrantz
5e9669650c
zink: break out surface info init to helper function
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13126 >
2021-10-01 13:27:50 +00:00
Mike Blumenkrantz
fed9243078
zink: make a local resource var in fb_clears_apply_internal
...
no functional changes
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13126 >
2021-10-01 13:27:50 +00:00
Tomeu Vizoso
0497d4aeef
panfrost/ci: Run Piglit's quick_gl tests on G52
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13063 >
2021-10-01 12:03:42 +00:00
Tomeu Vizoso
75212b3b34
ci: Rebuild kernel with Amlogic KMS support
...
So we can run Xorg for Piglit tests.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13063 >
2021-10-01 12:03:42 +00:00
Christian Gmeiner
8f118b5011
etnaviv: add etna_lookup_or_create_screen(..)
...
It is an improved version of etna_drm_screen_create_renderonly(..)
which also needs the gpu fd. Also switch etna_drm_screen_create(..)
and etna_drm_screen_create_renderonly(..) to use the new function.
This follows how other driver's winsys code looks like and fixes a
crash I when running piglit with PIGLIT_PLATFORM="gbm".
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904 >
2021-10-01 10:13:32 +00:00
Christian Gmeiner
5328fc6ca3
etnaviv: extend screen_create(..) with gpu_fd
...
Decouples gpu fd and renderonly object. This opens the door for
some simplifications.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904 >
2021-10-01 10:13:32 +00:00
Christian Gmeiner
f096441359
etnaviv: allow screen creation with NULL renderonly object
...
Prep change for winsys cleanups.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904 >
2021-10-01 10:13:32 +00:00
Christian Gmeiner
e18ee14f3b
etnaviv: move drm version readout to drm layer
...
It fits here better.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904 >
2021-10-01 10:13:32 +00:00
Christian Gmeiner
075649a38d
etnaviv: fix indentation
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904 >
2021-10-01 10:13:32 +00:00
Christian Gmeiner
f7168feb9b
etnaviv: fix leak of the screen hash table
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904 >
2021-10-01 10:13:32 +00:00
Christian Gmeiner
61ddec23c5
etnaviv: use better name for fd hash table
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904 >
2021-10-01 10:13:32 +00:00
Tapani Pälli
8cc4e0b0c4
anv: remove a format assert when setting up attachments
...
There are exceptions in spec where the framebuffer image format and
format given for render pass attachment may differ. This happens in
particular when subpass has resolve attachment that might resolve
only depth from a combined depth+stencil format. There the formats do
not need to match but be 'compatible' with each other.
As example using VK_FORMAT_D32_SFLOAT format is considered compatible
when actual framebuffer format is VK_FORMAT_D32_SFLOAT_S8_UINT.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13082 >
2021-10-01 09:59:32 +00:00
Tony Wasserka
fa655b6f70
aco/spill: Use std::unordered_map for spills_entry
...
fossil-db on Navi14:
Totals from 305 (0.20% of 150305) affected shaders:
CodeSize: 5498340 -> 5498328 (-0.00%)
Instrs: 1009992 -> 1009989 (-0.00%)
Latency: 33922644 -> 33923018 (+0.00%)
InvThroughput: 9302963 -> 9303151 (+0.00%)
VClause: 19004 -> 19001 (-0.02%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
3fad5efd15
aco/spill: Use unordered_map for spills_exit
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
7368f16fe8
aco/spill: Clarify use of long-lived references by adding const
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
a3ac3b231f
aco/spill: Reduce allocations in next_uses_per_block
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
a6bcda6a01
aco/spill: Change worklist to a single integer
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
e60a70dde0
aco/spill: Store remat list in an std::unordered_map instead of std::map
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
4a78a05247
aco/spill: Replace an std::map to booleans with std::set
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
112babc697
aco/spill: Reduce redundant std::map lookups
...
The previous code checked for element containment first and then performed
another map lookup upon element access. Instead, map::find can be used to
retrieve an iterator usable for element access with no extra lookup needed.
Furthermore, pure containment checks have been simplified using map::count.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
05163fd4f4
aco/spill: Avoid copying current_spills when not needed
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
6650799ea5
aco/spill: Prefer unordered_map over map for next use distances
...
This changes the iteration order of next use distances, so some "random"
changes to shader metrics are expected.
fossil-db for Navi14:
Totals from 1239 (0.82% of 150305) affected shaders:
SpillSGPRs: 10559 -> 10562 (+0.03%); split: -0.05%, +0.08%
SpillVGPRs: 1632 -> 1863 (+14.15%)
CodeSize: 19321468 -> 19304164 (-0.09%); split: -0.09%, +0.01%
Instrs: 3593957 -> 3591647 (-0.06%); split: -0.07%, +0.01%
Latency: 103120695 -> 102475647 (-0.63%); split: -0.63%, +0.01%
InvThroughput: 23897614 -> 23575320 (-1.35%); split: -1.36%, +0.02%
VClause: 66406 -> 66943 (+0.81%); split: -0.01%, +0.81%
SClause: 118559 -> 118548 (-0.01%)
Copies: 310871 -> 308950 (-0.62%); split: -0.69%, +0.08%
Branches: 123386 -> 123413 (+0.02%); split: -0.00%, +0.03%
These numbers mostly come from parallel-rdp ubershaders. Small changes are
also found in the rdr2 and rage2 shader metrics, whereas others are not
significantly affected.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
4453bce770
aco/spill: Replace vector<map> with vector<vector> for local_next_use
...
While adding/removing elements is faster with std::map, the cost of container
copies (and the involved memory allocations) vastly outweigh that benefit in
this usage pattern.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
92d7a6ab1c
aco/spill: Avoid destroying local next use maps over-eagerly
...
Recreating these maps in a later block requires allocating fresh memory.
Instead, by never shrinking the containing vector in the first place,
previously allocated map memory is now re-used.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
df6c395095
aco/spill: Persist memory allocations of local next use maps
...
The function local_next_uses allocated one next-use map per instruction in
the current block. Since the function is called once per block, this caused
an excessive amount of memory allocations to take place.
With this change, the memory for next-use maps is allocated only once and
then reused for later blocks.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
387b315ea0
aco/spill: Avoid copying next_use maps more often than needed
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
276da301e6
aco/spill: Replace map[] with map::insert
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
b183bdeabf
aco/spill: Remove unused container
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
0812d440c7
aco: Use std::vector for the underlying container of std::stack
...
By default, std::stack uses std::deque to allocate its elements, which has
poor cache efficiency. std::vector makes appending elements more expensive
(due to potential reallocations), but in the changed contexts the element
count should always be low anyway.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Tony Wasserka
f81eb2a827
aco/spill: Avoid unneeded copies when iterating over maps
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11925 >
2021-10-01 09:39:13 +00:00
Emmanuel Gil Peyrot
c238faf746
radv: Allow building when LLVM isn’t enabled
...
Now that ACO is considered feature-complete, it can be nice to avoid the
huge LLVM dependency when one only wants a Vulkan driver.
This patch allows radv to be built without LLVM. The two features which
get disabled are RADV_DEBUG=llvm and shader disassembly. The latter
is an issue for debugging, so I added a warning that this configuration
is unsupported.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Tony Wasserka
b70e551a51
aco/tests: Assert that the requested IR is actually provided
...
In particular, assembly will not be provided if no disassembler is available
for the given GPU architecture.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Tony Wasserka
3c1802accd
radv: Disable shader disassembly when no disassembler is available
...
ACO relies on LLVM to disassemble AMD shaders for ISAs newer than GFX7,
so disassembly needs to be skipped when LLVM is not enabled.
For vkGetPipelineExecutableInternalRepresentationsKHR and vkGetShaderInfoAMD,
the disassembly will not be reported anymore if it can't be generated.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Tony Wasserka
d5ac15c0e4
radv: Build code which depends on LLVM only when enabled
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Emmanuel Gil Peyrot
d0ec3582af
radv: Support shader compilation without LLVM dependencies
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Emmanuel Gil Peyrot
02ee0a0a7f
radv: Support device initialization without LLVM dependencies
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Tony Wasserka
a3e339853a
aco: Extend set of supported GPUs that can be disassembled with CLRX
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Tony Wasserka
ef48887a9e
aco: Separate LLVM/CLRX asm printers more cleanly
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Tony Wasserka
73e82f94c9
radv: Rename radv_shader_helper.h to radv_llvm_helper.h
...
This better reflects that the functions declared in this header are only
available with LLVM.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319 >
2021-10-01 10:40:18 +02:00
Martin Roukala (néé Peres)
7ef8f1fa46
radv/ci: mark some tests as flaky on gfx9
...
These tests have been flaky on vega10/renoir. We don't have time to look
into it just yet, so let's just mark them as such for now!
I am also including raven, as it likely has the same issue!
v2: add dEQP-VK.api.object_management.multithreaded_per_thread_resources.image_2d
v3:
- don't skip the test, mark them as flakes (Emma Anholt)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Signed-off-by: Martin Roukala (néé Peres) <martin.roukala@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13118 >
2021-10-01 08:21:39 +00:00
Marcin Ślusarz
1d1cd2ee77
anv: drop redundant unlikely's around INTEL_DEBUG
...
They are not needed since 4015e1876a .
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13115 >
2021-10-01 07:57:20 +00:00
Marcin Ślusarz
6229d40fbf
intel/compiler: drop redundant likely's around INTEL_DEBUG
...
They are not needed since 4015e1876a .
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13115 >
2021-10-01 07:57:20 +00:00
Marcin Ślusarz
f7f5062f09
crocus: drop redundant unlikely's around INTEL_DEBUG
...
They are not needed since 4015e1876a .
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13115 >
2021-10-01 07:57:20 +00:00
Samuel Pitoiset
5b684a7a7c
radv: fix vk_object_base_init/finish for internal buffers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13102 >
2021-10-01 07:26:37 +00:00
Samuel Pitoiset
f07e67272e
radv: fix vk_object_base_init/finish for internal image views
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13102 >
2021-10-01 07:26:37 +00:00
Samuel Pitoiset
16378837db
radv: fix vk_object_base_init/finish for the internal push descriptors
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13102 >
2021-10-01 07:26:37 +00:00
Samuel Pitoiset
3e89b20858
radv: fix vk_object_base_init/finish for internal buffer views
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13102 >
2021-10-01 07:26:37 +00:00
Samuel Pitoiset
1b3f0ccb38
radv: fix vk_object_base_init/finish for the internal pipeline cache
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13102 >
2021-10-01 07:26:37 +00:00
Samuel Pitoiset
07d2c152bc
radv: make sure to load the Primitive ID for VS+GS as NGG
...
When the VS doesn't export the Primitive ID but the FS needs it.
Fixes dEQP-VK.pipeline.framebuffer_attachment.no_attachments*.
Fixes: 7ad69e2f7e ("radv: stop loading invocation ID for NGG vertex shaders")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13116 >
2021-10-01 06:38:51 +00:00
Kenneth Graunke
ce2e2296ab
iris: Suballocate BO using the Gallium pb_slab mechanism
...
With all the preparation in place to handle suballocated BOs at
submission and export, we can now wire up the actual suballocator.
We use Gallium's pb_slab infrastructure for this, which is already
used for this purpose in the amdgpu winsys and now zink as well.
Unlike those drivers, we don't use pb_buffer (it doesn't do much) nor
pb_cache (we already have a buffer cache). Just pb_slab for now.
We can now suballocate BOs at power-of-two (or 3/4 power-of-two)
granularity, between 256B and 2MB. Beyond that, we use actual GEM
objects as before. This should save us some memory on current GPUs
where we previously had a minimum allocation granularity of 4K (page
size), but should save us a /ton/ of memory on future GPUs where the
minimum page size is 64K. Fewer actual GEM objects should also mean
shorter exec_object2 lists passed to the kernel, which could reduce
CPU overhead a bit. Using large allocations where the underlying
GEM objects correspond with the PTE fragment size may also allow the
kernel to use a more efficient page table layout, improving memory
access times.
This cuts nearly half of the memory usage in a Unity3D demo on a
GPU that uses 64K pages.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4722
Acked-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12623 >
2021-10-01 04:58:26 +00:00
Kenneth Graunke
b8ef3271c8
iris: Move suballocated resources to a dedicated allocation on export
...
We don't want to export suballocated resources to external consumers,
for a variety of reasons. First of all, it would be exporting random
other pieces of memory which we may not want those external consumers
to have access to. Secondly, external clients wouldn't be aware of
what buffers are packed together and busy-tracking implications there.
Nor should they be. And those are just the obvious reasons.
When we allocate a resource with the PIPE_BIND_SHARED flag, indicating
that it's going to be used externally, we avoid suballocation.
However, there are times when the client may suddenly decide to export
a texture or buffer, without any prior warning. Since we had no idea
this buffer would be exported, we suballocated it. Unfortunately, this
means we need to transition it to a dedicated allocation on the fly, by
allocating a new buffer and copying the contents over.
Making things worse, this often happens in DRI hooks that don't have an
associated context (which we need to say, run BLORP commands). We have
to create an temporary context for this purpose, perform our blit, then
destroy it. The radeonsi driver uses a permanent auxiliary context
stored in the screen for this purpose, but we can't do that because it
causes circular reference counting. radeonsi doesn't do the reference
counting that we do, but also doesn't use u_transfer_helper, so they
get lucky in avoiding stale resource->screen pointers. Other drivers
don't create an auxiliary context, so they avoid this problem for now.
For auxiliary data, rather than copying it over bit-for-bit, we simply
copy over the underlying data using iris_copy_region (GPU memcpy), and
take whatever the resulting aux state is from that operation. Assuming
the copy operation compresses, the result will be compressed.
v2: Stop using a screen->aux_context and just invent one on the fly to
avoid circular reference counting issues.
Acked-by: Paulo Zanoni <paulo.r.zanoni@intel.com > [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12623 >
2021-10-01 04:58:26 +00:00
Kenneth Graunke
38917a6055
iris: Change the validation list debug code to print the BO list instead
...
This code assumed that batch->exec_bos[i] matched validation_list[i],
which won't be true once we start suballocating BOs. This patch changes
it to print the full exec_bos[i] list instead of the validation list,
as that has the logical list of objects, names, addresses, placement,
whether they are suballocated, and so on.
It may be useful to look at the actual validation list as well; I'm not
sure how common that is. We may want to add additional debug prints in
the future.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12623 >
2021-10-01 04:58:26 +00:00
Kenneth Graunke
fb4e2ccc2b
iris: Introduce a BO_ALLOC_NO_SUBALLOC flag and set it in a few places
...
We don't want to suballocate some buffers, such as ones that we know
we're intending to export to other clients, or ones with special
semantics (such as the workaround BO not having proper synchronization).
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12623 >
2021-10-01 04:58:26 +00:00
Kenneth Graunke
5511e509cd
iris: Begin handling slab-allocated wrapper BOs in various places
...
The vast majority of cases need no handling at all, as they simply
read bo->address or similar fields, which works in either case.
Some other cases simply need to unwrap to look at the underlying BO.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12623 >
2021-10-01 04:58:26 +00:00
Kenneth Graunke
8a1fd43d61
iris: Handle multiple BOs backed by the same GEM object in execbuf code
...
With suballocation, our batch BO list may have multiple BOs that are
suballocated from the same GEM object. We still need to track each of
those buffers for cross-batch write tracking, cache tracking, and busy
tracking. However, we only want to include underlying GEM objects in
the actual validation list building. The validation list entry should
have EXEC_OBJECT_WRITE if any of the BOs are marked as writable.
We use a temporary array to map GEM handles to validation list entries
so we can quickly see if we've already emitted one and update the
EXEC_OBJECT_WRITE flag as needed.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12623 >
2021-10-01 04:58:26 +00:00
Kenneth Graunke
72a28706a4
iris: Move some iris_bo entries into a union
...
We would like to start performing slab allocation of resources, where
multiple resources can be backed by a single GEM object.
Originally, I had thought to move busy tracking, cache domain tracking,
and so on into resources themselves, instead of having them at the BO
level. Multiple resources would point at the same BO with an offset.
Unfortunately, this meant adjusting the batch BO pinning code to take
resources rather than BOs. That cascades into needing iris_address
for genxml packing to store resources, not BOs. Which means that places
which have use raw BOs would need to start creating resources instead.
Except some places, like aux BO handling, really don't make sense as
pipe resources and really would rather use raw BOs. So iris_address
would need to store both, which convolutes the genxml field. And,
having a BO and resource means that every place in the code needs to
handle that offset correctly. It sounds simple, but is a giant mess.
Instead, we take a different route: adjust iris_bo itself, so that BOs
are either be backed by a GEM object (as is the case today), or backed
by another underlying BO. "Real" BOs have bo->gem_handle != 0. "Slab
allocated" or "fake" or "wrapper" BOs have bo->gem_handle == 0. We move
fields into a union based on these cases. amdgpu takes this approach.
This sounds complex at first glance---in theory, every place that
interacts with BOs might need to handle the wrapper BO special case.
But in practice, they don't. For suballocated BOs, we can set the
wrapper's address field to the underlying BO's address plus any offset,
at which point it looks like any other BO. Most other properties are
easily queried; the main code that needs updating is execbuf handling
and bufmgr internals.
For now, we simply move the fields. Any code that accesses either
bo->real.* or bo->gem_handle will need updating in future patches to
actually handle the slab-allocated case.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12623 >
2021-10-01 04:58:26 +00:00
Simon Ser
ad50b47a14
gbm: assume USE_SCANOUT in create_with_modifiers
...
gbm_{bo,surface}_create_with_modifiers doesn't allow callers to
pass usage flags. Assume USE_SCANOUT since this is what most
callers want.
Bump the GBM ABI version so that other backends can discover when
the usage flags can be used.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: James Jones <jajones@nvidia.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3197 >
2021-10-01 00:02:36 +02:00
Simon Ser
268e12c605
gbm: add gbm_{bo,surface}_create_with_modifiers2
...
gbm_{bo,surface}_create_with_modifiers is missing the usage flags. Add a new
function which lets library users specify it.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: James Jones <jajones@nvidia.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3197 >
2021-10-01 00:02:32 +02:00
Simon Ser
76d64d2a3e
gbm: consistently use the same name for BO flags
...
We were sometimes using "usage", sometimes using "flags". Let's
just use "flags" everywhere (since the enum is named gbm_bo_flags).
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: James Jones <jajones@nvidia.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3197 >
2021-10-01 00:02:10 +02:00
Mike Blumenkrantz
85c38d192f
wsi/x11: fix uninit value by using zalloc for swapchain
...
==767499== Conditional jump or move depends on uninitialised value(s)
==767499== at 0xEB8E3ED: x11_image_finish (wsi_common_x11.c:1539)
==767499== by 0xEB8E768: x11_swapchain_destroy (wsi_common_x11.c:1640)
==767499== by 0xEB8A8FA: wsi_common_destroy_swapchain (wsi_common.c:505)
==767499== by 0xDE30BA1: anv_DestroySwapchainKHR (anv_wsi.c:242)
==767499== by 0x6817A21: copper_displaytarget_destroy (zink_copper.c:192)
==767499== by 0x6882BE6: zink_destroy_resource_object (zink_resource.c:95)
==767499== by 0x6882447: zink_resource_object_reference (zink_resource.h:198)
==767499== by 0x6882D33: zink_resource_destroy (zink_resource.c:123)
==767499== by 0x688AC97: pipe_resource_destroy (u_inlines.h:145)
==767499== by 0x688AD2E: pipe_resource_reference (u_inlines.h:162)
==767499== by 0x688BE1E: zink_destroy_surface (zink_surface.c:319)
==767499== by 0x688AE0A: zink_surface_reference (zink_surface.h:102)
==767499== by 0x688BE6D: zink_surface_destroy (zink_surface.c:328)
==767499== by 0x67F9CA2: pipe_surface_release (u_inlines.h:134)
==767499== by 0x67FB8AD: zink_context_destroy (zink_context.c:92)
==767499== by 0x5D47B65: st_destroy_context_priv (st_context.c:475)
==767499== by 0x5D49AF2: st_destroy_context (st_context.c:1193)
==767499== by 0x5D5C90F: st_context_destroy (st_manager.c:816)
==767499== by 0x5CC1FC9: dri_destroy_context (dri_context.c:248)
==767499== by 0x658DD63: driDestroyContext (dri_util.c:535)
==767499== by 0x5A30166: drisw_destroy_context (drisw_glx.c:417)
==767499== by 0x5A32484: glXDestroyContext (glxcmds.c:515)
==767499== by 0x5315AEB: glXDestroyContext (libglx.c:332)
==767499== by 0x4AA8E7D: glXDestroyContext (g_libglglxwrapper.c:384)
==767499== by 0x4D5A3F0: ??? (in /usr/lib64/libwaffle-1.so.0.6.1)
==767499== by 0x499DDD5: piglit_wfl_framework_teardown (piglit_wfl_framework.c:638)
==767499== by 0x499E4C5: piglit_winsys_framework_teardown (piglit_winsys_framework.c:238)
==767499== by 0x499F50C: destroy (piglit_x11_framework.c:212)
==767499== by 0x498C535: destroy (piglit-framework-gl.c:210)
==767499== by 0x4F48AF6: __run_exit_handlers (in /usr/lib64/libc-2.33.so)
==767499== by 0x4F48C9F: exit (in /usr/lib64/libc-2.33.so)
==767499== by 0x4AEFD71: piglit_report_result (piglit-util.c:245)
==767499== by 0x499F2CA: process_next_event (piglit_x11_framework.c:139)
==767499== by 0x499F365: enter_event_loop (piglit_x11_framework.c:153)
==767499== by 0x499DF88: run_test (piglit_winsys_framework.c:88)
==767499== by 0x498C5EF: piglit_gl_test_run (piglit-framework-gl.c:229)
==767499== by 0x4022B4: main (primitive-restart.c:45)
==767499== Uninitialised value was created by a heap allocation
==767499== at 0x484086F: malloc (vg_replace_malloc.c:380)
==767499== by 0xE964E85: vk_default_alloc (vk_alloc.c:26)
==767499== by 0xEB8B24B: vk_alloc (vk_alloc.h:43)
==767499== by 0xEB8EAF9: x11_surface_create_swapchain (wsi_common_x11.c:1723)
==767499== by 0xEB8A82A: wsi_common_create_swapchain (wsi_common.c:476)
==767499== by 0xDE30B47: anv_CreateSwapchainKHR (anv_wsi.c:225)
==767499== by 0xE96134F: vk_tramp_CreateSwapchainKHR (vk_dispatch_table.c:6592)
==767499== by 0xD7B88F0: ??? (in /usr/lib64/libvulkan.so.1.2.162)
==767499== by 0x6817796: copper_CreateSwapchain (zink_copper.c:123)
==767499== by 0x6817960: copper_displaytarget_create (zink_copper.c:170)
==767499== by 0x6884C65: resource_create (zink_resource.c:780)
==767499== by 0x6884EC5: zink_resource_create_drawable (zink_resource.c:829)
==767499== by 0x5CC0FE3: copper_allocate_textures (copper.c:199)
==767499== by 0x5CC28C2: dri_st_framebuffer_validate (dri_drawable.c:82)
==767499== by 0x5D5B69A: st_framebuffer_validate (st_manager.c:222)
==767499== by 0x5D5D32D: st_api_make_current (st_manager.c:1102)
==767499== by 0x5CC220B: dri_make_current (dri_context.c:306)
==767499== by 0x658DE23: driBindContext (dri_util.c:588)
==767499== by 0x5A3022A: drisw_bind_context (drisw_glx.c:435)
==767499== by 0x5A36CC2: MakeContextCurrent (glxcurrent.c:220)
==767499== by 0x5A36DF9: glXMakeCurrent (glxcurrent.c:253)
==767499== by 0x531849C: InternalMakeCurrentVendor (libglx.c:875)
==767499== by 0x53185C3: InternalMakeCurrentDispatch (libglx.c:930)
==767499== by 0x5318DE5: CommonMakeCurrent (libglx.c:1074)
==767499== by 0x5318ED5: glXMakeCurrent (libglx.c:1119)
==767499== by 0x4AA9CFA: glXMakeCurrent (g_libglglxwrapper.c:930)
==767499== by 0x4D5AA36: ??? (in /usr/lib64/libwaffle-1.so.0.6.1)
==767499== by 0x4D5E16E: waffle_make_current (in /usr/lib64/libwaffle-1.so.0.6.1)
==767499== by 0x499C8CD: wfl_checked_make_current (piglit-util-waffle.h:115)
==767499== by 0x499DA04: make_context_current_singlepass (piglit_wfl_framework.c:488)
==767499== by 0x499DC43: make_context_current (piglit_wfl_framework.c:565)
==767499== by 0x499DD88: piglit_wfl_framework_init (piglit_wfl_framework.c:628)
==767499== by 0x499E3FC: piglit_winsys_framework_init (piglit_winsys_framework.c:209)
==767499== by 0x499F581: piglit_x11_framework_create (piglit_x11_framework.c:229)
==767499== by 0x499E361: piglit_winsys_framework_factory (piglit_winsys_framework.c:175)
==767499== by 0x498CA60: piglit_gl_framework_factory (piglit_gl_framework.c:53)
==767499== by 0x498C587: piglit_gl_test_run (piglit-framework-gl.c:221)
==767499== by 0x4022B4: main (primitive-restart.c:45)
Fixes: b5c390c113 ("vulkan/wsi: add support for detecting mit-shm pixmaps.")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13124 >
2021-09-30 19:56:51 +00:00
Emma Anholt
c530510514
gallium/dri: Make YUV formats we're going to emulate external-only.
...
If we're going to have to bind them as separate planes with colorspace
conversion for sampling on the frontend, then we need to report that
they're only for external-image samplers, otherwise the lowering won't be
applied.
Fixes: 4e3a7dcf ("gallium: enable EGL_EXT_image_dma_buf_import_modifiers unconditionally")
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13038 >
2021-09-30 19:22:48 +00:00
Veerabadhran Gopalakrishnan
2c2b5fc65f
gallium/va: Remove VP9 header parsing for secure playback
...
Latest VCN FW is capable of parsing the VP9 uncompressed header.
Removing the parsing from gallium.
Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13106 >
2021-09-30 18:52:12 +00:00
Jordan Justen
51338a1177
anv/slice_hash: Don't allocate more than once with multiple queues
...
emit_slice_hashing_state gets called once per queue, meaning
device->slice_hash can get allocated multiple times. This can be
reproduced by setting the env-var ANV_QUEUE_OVERRIDE=gc=2.
Reworks:
* Only pack the struct once (s-b Lionel, Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13114 >
2021-09-30 18:21:51 +00:00
Emma Anholt
bfeb0983d3
ci/freedreno: Disable flaky a530 for now.
...
This morning saw at least 3 pipelines fail from a530 not responding and
not coming back after we tried to power cycle, and airlied was having some
similar trouble yesterday. Until I can figure out what's going wrong
(python script failing to set up serial after retry? relays worn out?
Power supply failing?), just disable the boards.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13123 >
2021-09-30 18:01:51 +00:00
Jordan Justen
6ce3bb1354
anv/blorp: Force compute blorp on compute-only queues
...
Reworks:
* Set BLORP_BATCH_USE_COMPUTE in anv_blorp_batch_init (s-b Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
136672154c
anv/blorp: Add anv_blorp_batch_init, anv_blorp_batch_finish
...
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
15a6018d06
anv/blorp: Select pipeline based on BLORP_BATCH_USE_COMPUTE
...
Reworks:
* Let blorp_clear handle DEBUG_BLOCS
* Old subject was: "Use compute blorp for vkCmdFillBuffer with
INTEL_DEBUG=blocs"
* Old subject was: "anv/blorp: Support params.cs_prog_data being set"
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
7599533658
anv/blorp: Make sure blorp type is supported by the queue
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
7a4f945351
anv: Prevent starting a render pass on compute queues
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
075db10a32
anv: Store anv_queue_family type in cmd-pool
...
v2 (Jason Ekstrand):
- Use an anv_queue_family pointer
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
06691131e9
intel/blorp: Support some image/buffer blit operations using compute
...
Reworks:
* Use BLORP_BATCH_USE_COMPUTE flag rather than compute param to
blorp_copy (s-b Jason)
* Squash "intel/blorp: Set shader_pipeline for compute"
* Squash "intel/blorp: Add blorp_copy_supports_compute function"
* Squash "intel: Support compute for image/buffer copy if INTEL_DEBUG=blocs
is set"
* Squash "intel/blorp: Support compute for some blit operations"
* Use nir_image_store (s-b Jason)
* Use nir_push_if (s-b Jason)
* Require gfx12 for ccs in blorp_copy_supports_compute (s-b Jason)
* Add nir_pop_if (s-b Ken)
* Fix aux_usage check on gfx12 blorp_copy_supports_compute (s-b Ken)
* Use blorp_set_cs_dims (s-b Jason)
* Use dim=2d with array=true for nir_image_store (s-b Jason, Francisco)
* Restructure gen checks in blorp_copy_supports_compute (s-b Ken)
* Use nir_load_global_invocation_id (s-b Jason)
* Fix inefficient calculation of store_pos (s-b Jason)
* Use bounds_if being NULL/non-NULL for nir_pop_if (s-b Jason)
* discard => bounds (s-b Ken)
* Re-add ISL_AUX_USAGE_CCS_E in *_supports_compute (s-b Sagar)
* Skip duplicated in_bounds calculation (s-b Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
71c4937833
intel/blorp/blit: Rename wm_prog_key and prog_key to key
...
Suggested-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
22ecb4a10f
intel/blorp: Support compute for slow clears
...
Reworks:
* Use BLORP_BATCH_USE_COMPUTE flag rather than compute param to
blorp_clear (s-b Jason)
* Use nir_load_global_invocation_id (s-b Jason)
* Use nir_push_if (s-b Jason)
* Use nir_image_store (s-b Jason)
* Require gfx12 for ccs in blorp_clear_supports_compute (s-b Jason)
* Add nir_pop_if (s-b Ken)
* Fix aux_usage check on gfx12 blorp_clear_supports_compute (s-b Ken)
* Use blorp_set_cs_dims (s-b Jason)
* Simplify rgb-as-red calculation (s-b Jason)
* Use dim=2d with array=true for nir_image_store (s-b Jason, Francisco)
* discard => bounds (s-b Ken)
* Re-add ISL_AUX_USAGE_CCS_E in *_supports_compute (s-b Sagar)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
2123d59693
intel/blorp: Convert blorp_clear color_write_disable to a bitmask
...
Reworks:
* Various cleanups adding BITFIELD_* (s-b Jason)
* Add /* color_write_disable */ comment (s-b Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
00ea664cb6
blorp/clear: Simplify rbg-as-red channel packing
...
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
44ba094b1d
blorp: Set view usage to ISL_SURF_USAGE_STORAGE_BIT for compute
...
Suggested-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
dd35b9fa34
intel/blorp: Use blorp_check_in_bounds for discards
...
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
c8c2c30f5d
intel/blorp: Add blorp_check_in_bounds()
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
1448e019d6
intel/blorp: Change discard terminology to bounds
...
Suggested-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
9e9481699d
intel/blorp: Add blorp_get_cs_local_y, blorp_set_cs_dims
...
Based the blorp_params, blorp_get_cs_local_y returns a recommended
local_y size for a compute shader.
blorp_set_cs_dims sets the compute program dims based on a given
local_y size.
Reworks:
* Add blorp_set_cs_dims (s-b Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
72e04a6248
intel/gfx7: Change GPGPU Mode to bool
...
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
90a39cac87
intel/blorp: Emit compute program based on BLORP_BATCH_USE_COMPUTE
...
Reworks:
* Don't pack params, just memcpy param struct (s-b Jason)
* Old subject: "intel/blorp: Emit compute program if
params.cs_prog_data is set"
* Various cleanups of push-const size/alignment (s-b Jason)
* Fix subslice count by moving to devinfo (s-b Ken)
* Simplify cw.InterfaceDescriptor code (s-b Ken)
* Drop some comments from i965 (s-b Ken)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jason Ekstrand
3e13c4ccf2
anv,iris,genxml: Use NumberOfBarriers on XeHP
...
Ref: bspec 55400
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
a4c9c242ed
blorp: Add blorp_alloc_general_state
...
Reworks:
* Add crocus
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
90feddf38a
intel/blorp: Split out surface setup from state emission
...
Render will use blorp_setup_binding_table and blorp_emit_btp, but
compute will only use blorp_setup_binding_table.
Rework:
* Use blorp_setup_binding_table, blorp_emit_btp (s-b Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
b704c9a75b
intel/blorp: Split out ps specific sampler state into a separate function
...
The compute path will use blorp_emit_sampler_state, whereas the render
path will use blorp_emit_sampler_state_ps.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
dbd4934441
intel/blorp: Add blorp_compile_cs
...
Reworks:
* Don't pack params (s-b Jason)
* Drop nir_remove_dead_variables (s-b Jason)
* Fix comment s/render target/destination image/ (s-b Ken)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
998142ea4a
intel/blorp: Add subgroup_id input for compute programs
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
51528aeb60
intel/compiler: Use INTEL_DEBUG=blorp to dump blorp compute shaders
...
Make INTEL_DEBUG=blorp dump the blorp compute shaders instead using
the general INTEL_DEBUG=cs which is now reserved for actual compute
programs.
Ref: 05933fb0f7 ("intel/compiler: Use INTEL_DEBUG=blorp to dump blorp shaders")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
bd103f9483
intel/blorp: Add brw_blorp_init_cs_prog_key
...
Reworks:
* Split out blorp_init_base_prog_key to share with fs/cs key init (s-b Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
794a23ddc7
intel/blorp: Add shader_pipeline to brw_blorp_base_key
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
5ace2e36cc
intel/blorp: Add compute support to BLORP_CREATE_NIR_INPUT
...
Reworks:
* Set driver_location (s-b Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Jordan Justen
a7533a5ad5
intel/blorp: Move most of BLORP_CREATE_NIR_INPUT into a function
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11564 >
2021-09-30 17:41:33 +00:00
Ed Baker
e99278fcf8
frontends/va: Fix test_va_api VAAPIDisplayAttribs tests
...
Set max_display_attribs to 0 instead of 1 to match
va[Query,Get,Set]DisplayAttributes implementations [1].
If max_display_attribs is greater than 0 libva-utils tests check
vaQueryDisplayAttributes() accordingly [2].
[1] https://gitlab.freedesktop.org/mesa/mesa/-/blob/2de348cdb01e45/src/gallium/frontends/va/display.c#L32
[2] https://github.com/intel/libva-utils/blob/master/test/test_va_api_display_attribs.cpp#L90
Signed-off-by: Ed Baker <edward.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12941 >
2021-09-30 17:28:44 +00:00
Gurchetan Singh
9a7d6a110e
virgl/drm: explicit context initialization
...
If the host supports explicit context initialization, try it.
If no capabilitiies associated with virgl are present, return
an error.
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Tested-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7712 >
2021-09-30 16:45:12 +00:00
Gurchetan Singh
293c57e12c
virgl/drm: query for context init ioctl and supported capset ids
...
Just add the params to the existing lists.
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Tested-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7712 >
2021-09-30 16:45:12 +00:00
Gurchetan Singh
bab8e77bb2
drm-uapi: virtgpu_drm.h: context init feature
...
This change allows creating contexts of depending on set of
context parameters. The meaning of each of the parameters
is listed below:
1) VIRTGPU_CONTEXT_PARAM_CAPSET_ID
This determines the type of a context based on the capability set
ID. For example, the current capsets:
VIRTIO_GPU_CAPSET_VIRGL
VIRTIO_GPU_CAPSET_VIRGL2
define a Gallium, TGSI based "virgl" context. We only need 1 capset
ID per context type, though virgl has two due a bug that has since
been fixed.
The use case is the "gfxstream" rendering library and "venus"
renderer.
gfxstream doesn't do Gallium/TGSI translation and mostly relies on
auto-generated API streaming. Certain users prefer gfxstream over
virgl for GLES on GLES emulation. {gfxstream vk}/{venus} are also
required for Vulkan emulation.
The goal is for guest userspace to choose the optimal context type
depending on the situation/hardware.
2) VIRTGPU_CONTEXT_PARAM_NUM_RINGS
This tells the number of independent command rings that the context
will use. This value may be zero and is inferred to be zero if
VIRTGPU_CONTEXT_PARAM_NUM_RINGS is not passed in. This is backwards
compatibility for virgl, which has one big giant command ring for all
commands.
The maxiumum number of rings is 32. In practice, multi-queue or
multi-ring submission is used for powerful dGPUs and virtio-gpu
may not be the best option in that case (see PCI passthrough or
rendernode forwarding).
3) VIRTGPU_CONTEXT_PARAM_POLL_RING_IDX_MASK
This is a mask of ring indices for which the DRM fd is pollable.
For example, if VIRTGPU_CONTEXT_PARAM_NUM_RINGS is 2, then the mask
may be:
[ring idx] | [1 << ring_idx] | final mask
-------------------------------------------
0 1 1
1 2 3
The "Sommelier" guest Wayland proxy uses this to poll for events
from the host compositor.
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Tested-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7712 >
2021-09-30 16:45:12 +00:00
Chia-I Wu
e57b80f283
radv: plug leaks in radv_device_init_accel_struct_build_state
...
Fixes: 0dad88b469 ("radv: Implement device-side BVH building.")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13110 >
2021-09-30 15:43:35 +00:00
Boris Brezillon
d0637489e8
panvk/ci: Enable blend tests
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:56:38 +02:00
Boris Brezillon
4f484e6d9b
panvk: Lower blend operations when needed
...
The gallium driver makes use of blend shaders, but panvk takes a
slightly different approach. Vulkan drivers are passed the blend
operation at pipeline creation time, which means they know it when
compiling the fragment shader and can lower the blend operation
directly in the fragment shader itself. Doing that simplifies the
pipeline creation since we don't have to deal with blend shaders
anymore.
This might come at a cost for translation layers like Zink though,
since it requires re-compiling the fragment shader every time the
blend operation changes, which we do anyway, since we don't have
a pipeline cache yet. Let's keep things simple for now and revise
things if/when we end up having performance issues.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:56:32 +02:00
Boris Brezillon
9db47ac96e
panvk: Fill the blend constants sysval
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:56:23 +02:00
Boris Brezillon
2f68c58767
pan/blend: Allow passing blend constants through a sysval
...
This is needed to allow lowering blend operations in fragment shaders
when the blend operation uses dynamic blend constants.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:54:42 +02:00
Boris Brezillon
7cd402c9c8
nir/lower_blend: Shrink blended result if needed
...
Make sure the new and old sources have the same number of components,
otherwise the NIR validation pass complains.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:54:42 +02:00
Boris Brezillon
3e07b8d4f8
nir/lower_blend: Make sure we're not passed scaled formats
...
SCALED formats are interpreted as floats, but not in the usual [0, 1]
or [-1, 1] range, meaning that the blend lowering logic can't directly
apply to those. Assert that the format being passed is not a scaled
format.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:54:42 +02:00
Boris Brezillon
15b4cab4d5
nir/lower_blend: Don't lower RTs whose format is set to NONE
...
The caller doesn't necessarily want to lower blend operations on all
render targets since some of them might be supported natively (panvk
will be in that case). Let's just skip RTs that have a format set to
PIPE_FORMAT_NONE to allow that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:54:42 +02:00
Boris Brezillon
637cd5ac00
nir/lower_blend: Pad src to a 4-component vector
...
nir_ssa_for_src() is not supposed to pad the src vector if
dst->num_components > src->num_components. Let's pad things explicitly
with nir_pad_vector().
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:54:42 +02:00
Boris Brezillon
641bed3103
nir: Make sure src->num_components < dst->num_components in nir_ssa_for_src()
...
The NIR validation complains if the swizzle accesses a component that's
not present in the source.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060 >
2021-09-30 16:54:42 +02:00
Icecream95
689870e7c4
panfrost: Add ASTC 3D texture format entries
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12814 >
2021-09-30 14:26:12 +00:00
Alyssa Rosenzweig
e26ffda2b9
panfrost: Encode 3D ASTC dimensions
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12814 >
2021-09-30 14:26:12 +00:00
Alyssa Rosenzweig
a1c6a15012
panfrost: Use ASTC 2D enums
...
Rather than manipulating the bits to do the mapping, use a dead simple
switch() with the enum definition.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12814 >
2021-09-30 14:26:12 +00:00
Alyssa Rosenzweig
3d28039b3e
panfrost: Assert ASTC/AFBC are not used on v4
...
These are not introduced until v5. The required enums do not exist on
v4. Assert this is so.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12814 >
2021-09-30 14:26:12 +00:00
Alyssa Rosenzweig
f4f0e30701
panfrost: Add ASTC stretch factor enums
...
ASTC textures all use a common ASTC format, with the ASTC block
dimension configured with auxiliary bits at the bottom of the payload
pointer. Add the corresponding enum for ASTC 2D and 3D.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12814 >
2021-09-30 14:26:12 +00:00
Vadym Shovkoplias
808b426f03
drirc: Set vs_position_always_precise for Assault Android Cactus
...
A couple of tesselation evaluation shaders lack some precise marks
on its outputs which can lead to different results after optimizations.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5376
Fixes: 09705747d7 ("nir/algebraic: Reassociate fadd into fmul in DPH-like pattern")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13027 >
2021-09-30 10:46:39 +00:00
Vadym Shovkoplias
36c241be01
driconf, glsl: Add a vs_position_always_precise option
...
This is basically the same workaround as in 9b577f2a88 (driconf, glsl: Add a
vs_position_always_invariant option) commit but for tesselation evaluation
shaders. Some applications do not mark outputs as precise in tesselation
evaluation shaders which can lead to different results in case some
optimizations were applied.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com >
Fixes: 09705747d7 ("nir/algebraic: Reassociate fadd into fmul in DPH-like pattern")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13027 >
2021-09-30 10:46:39 +00:00
Boris Brezillon
8276a8eb55
panfrost: Move genxml related files to a subdir
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12208 >
2021-09-30 10:30:19 +00:00
Boris Brezillon
b76420be1f
panfrost: Split command stream descriptor definitions per-gen
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12208 >
2021-09-30 10:30:19 +00:00
Boris Brezillon
95b37fd21e
panfrost: Add a common genxml file so we can share a few definitions
...
Start with the enums that were manually redefined in
pan_{texture,format}.h and the blend equation descriptors.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12208 >
2021-09-30 10:30:19 +00:00
Samuel Pitoiset
27bb80f688
radv: fix selecting the hash when RADV_FORCE_VRS is enabled
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13098 >
2021-09-30 10:12:43 +00:00
Samuel Pitoiset
0c88c5cdc4
radv: fix adjusting the frag coord when RADV_FORCE_VRS is enabled
...
force_vrs was always RADV_FORCE_VRS_NONE at that point and the
hw workaround was never applied.
Found by inspection.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13098 >
2021-09-30 10:12:43 +00:00
Samuel Pitoiset
dca04dae52
radv: remove the LLVM stat about the number of private VGPRs
...
This doesn't seem really useful.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12999 >
2021-09-30 09:51:17 +00:00
Daniel Schürmann
7b04c13a34
aco/ra: don't rewrite affinities for phi operands after register assignment
...
The effect of doing so is random and not meaningful.
Totals from 52 (0.03% of 150170) affected shaders: (GFX10.3)
CodeSize: 538768 -> 538784 (+0.00%); split: -0.04%, +0.04%
Instrs: 100661 -> 100707 (+0.05%); split: -0.01%, +0.06%
Latency: 1205950 -> 1205768 (-0.02%); split: -0.07%, +0.05%
InvThroughput: 200106 -> 200040 (-0.03%); split: -0.31%, +0.28%
Copies: 5717 -> 5754 (+0.65%); split: -0.17%, +0.82%
Branches: 3153 -> 3162 (+0.29%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
b7af10449b
aco/ra: create nested affinities for loop header phis
...
Totals from 875 (0.58% of 150170) affected shaders: (GFX10.3)
CodeSize: 6084528 -> 6066628 (-0.29%); split: -0.32%, +0.02%
Instrs: 1136497 -> 1133565 (-0.26%); split: -0.28%, +0.02%
Latency: 23355051 -> 22952592 (-1.72%); split: -1.83%, +0.10%
InvThroughput: 13028151 -> 12859628 (-1.29%); split: -1.38%, +0.09%
Copies: 85673 -> 82790 (-3.37%); split: -3.62%, +0.26%
Branches: 25049 -> 25098 (+0.20%); split: -0.08%, +0.28%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
d6bfc95732
aco/ra: create affinities between nested phis
...
Totals from 17143 (11.42% of 150170) affected shaders: (GFX10.3)
VGPRs: 1138112 -> 1138440 (+0.03%); split: -0.00%, +0.03%
CodeSize: 131235532 -> 131147080 (-0.07%); split: -0.14%, +0.07%
Instrs: 24848044 -> 24775419 (-0.29%); split: -0.32%, +0.02%
Latency: 599031816 -> 596005601 (-0.51%); split: -0.52%, +0.01%
InvThroughput: 152059329 -> 151054105 (-0.66%); split: -0.66%, +0.00%
VClause: 410951 -> 410958 (+0.00%); split: -0.01%, +0.01%
Copies: 1696885 -> 1621908 (-4.42%); split: -4.64%, +0.22%
Branches: 846710 -> 851052 (+0.51%); split: -0.29%, +0.80%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
a2ffdca26a
aco/ra: don't set affinities for ssa-repair phis
...
These have no effect anymore.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
ae5cbd8f3a
aco/ra: for phis try to find an operand-matching register earlier
...
Totals from 3557 (2.37% of 150170) affected shaders: (GFX10.3)
VGPRs: 257976 -> 257984 (+0.00%)
CodeSize: 34296232 -> 34270552 (-0.07%); split: -0.09%, +0.01%
Instrs: 6512289 -> 6506900 (-0.08%); split: -0.10%, +0.01%
Latency: 136376181 -> 136262553 (-0.08%); split: -0.10%, +0.02%
InvThroughput: 33042816 -> 32992849 (-0.15%); split: -0.18%, +0.03%
VClause: 104687 -> 104686 (-0.00%)
SClause: 238657 -> 238663 (+0.00%); split: -0.00%, +0.00%
Copies: 477690 -> 471058 (-1.39%); split: -1.52%, +0.13%
Branches: 223058 -> 224326 (+0.57%); split: -0.02%, +0.59%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
8995599c80
aco/ra: try more aggressive to assign phi defs the same register
...
Totals from 4158 (2.77% of 150170) affected shaders: (GFX10.3)
VGPRs: 312008 -> 312000 (-0.00%)
CodeSize: 42902064 -> 42892200 (-0.02%); split: -0.06%, +0.04%
Instrs: 8086443 -> 8084532 (-0.02%); split: -0.07%, +0.05%
Latency: 138551153 -> 138215222 (-0.24%); split: -0.28%, +0.03%
InvThroughput: 39676773 -> 39570850 (-0.27%); split: -0.29%, +0.02%
SClause: 306299 -> 306284 (-0.00%); split: -0.01%, +0.00%
Copies: 552481 -> 553353 (+0.16%); split: -0.75%, +0.91%
Branches: 284381 -> 282409 (-0.69%); split: -0.74%, +0.04%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
28fe49c35f
aco/ra: split register assignment for phis into separate function
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
302cb5c900
aco/ra: remove some redundant code
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
d7cb169819
aco/ra: refactor affinities into assignment struct
...
This lets us get rid of an unordered_map<>.
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Daniel Schürmann
5afcc17f50
aco/ra: fix intersects()
...
The previous implementation failed when a contained b.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836 >
2021-09-30 09:10:07 +00:00
Samuel Pitoiset
9ea0351660
radv: fix missing features for BDA
...
Only the KHR one is filled by the common code.
Fixes: ec2007d47e ("radv: Use the shared now-in-core feature/prop extension helper functions.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13035 >
2021-09-30 08:51:57 +00:00
Jason Ekstrand
d2264489ce
compiler/clc: grab opencl-c.h from the system path by default
...
By default we use the header installed opencl-c.h header. But in the
case Mesa is compiled for microsoft clon12 we keep the injected file.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156 >
2021-09-30 07:09:08 +00:00
Jason Ekstrand
8490766f53
compiler/clc: Clean ups
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156 >
2021-09-30 07:09:08 +00:00
Jason Ekstrand
1506ea2ecb
Move a bunch of the CLC stuff from src/microsoft to common code
...
The D3D12-specific stuff isn't useful to have in common code but all the
stuff to invoke clang really should be common.
v2: Rebase (Lionel)
v3: Define a new clc_libclc_new_dxil() entrypoint to create a clc
context with DXIL nir_options (Jesse)
v4: Fixup meson build (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156 >
2021-09-30 07:09:08 +00:00
Lionel Landwerlin
a9c49a0541
meson: extract libversion checks from clc & clover
...
The src/microsoft/clc/meson.build was assuming to be run only on
Windows. That's about to change.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156 >
2021-09-30 07:09:08 +00:00
Lionel Landwerlin
2bc4650b45
microsoft/clc: fix compiler warning on uninitiailzed variable use
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156 >
2021-09-30 07:09:08 +00:00
Lionel Landwerlin
1d7a5196b1
microsoft/clc: drop MSVC specific function
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156 >
2021-09-30 07:09:08 +00:00
Stéphane Marchesin
dd5bf189ef
virgl: Flush context before waiting on fences
...
The logic behind this change is intuitive: if we are waiting for
something, we should probably flush all pending rendering so that it
starts executing in the meantime. This prevents the GPU from sitting
idle for long periods of time while we are also blocked in the app.
With the gun3d trace:
Before: 79 fps After: 215 fps
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13096 >
2021-09-30 04:40:56 +00:00
Yiwei Zhang
7c22ece8e4
util: fix sign comparison
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13074 >
2021-09-30 04:19:27 +00:00
Jason Ekstrand
709e187003
st/texture: Fall back to single-slice uploads in st_CompressedTexSubImage
...
Currently, if we ever fail to create a re-interpreted uncompressed view
of the resource, we fall back to a SW path. On some Intel hardware,
this happens whenever LOD > 0. Instead, we should fall back to
attempting to upload one slice at a time and only fall back to SW as a
last resort.
v2 [by Ken]: Fix buf_offset calculation and loop over layers.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com > [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11737 >
2021-09-30 03:52:33 +00:00
Jason Ekstrand
b7ab625ea9
st/texture: Dedent surface setup in CompressedTexSubImage
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11737 >
2021-09-30 03:52:33 +00:00
Qiang Yu
e55e61758c
loader/dri3: fix swap out of order when changing swap interval
...
This fixes SPECVIEWPERF13 creo test case hang:
1. Client: send present pixmap request (serial=1) when swap_interval==1
and increase send_sbc=1
2. Server: pend the request before vblank arrives
3. Client: set swap_interval=0 (so set XCB_PRESENT_OPTION_ASYNC),
send another present pixmap request (serial=2), increase send_sbc=2
4. Server: handle the async request immediately and send complete event
(serial=2)
5. Client: handle the event and set recv_sbc=event->serial=2
6. Server: vblank arrives so handle pending request and send complete
event (serial=1)
7. Client: handle the event and set recv_sbc=event->serial=1
8. Client: someone call loader_dri3_swapbuffer_barrier() and waiting
on recv_sbc==send_sbc, but no one will set recv_sbc=2 again
So basically it's caused by swap happens out of order. This commit
fixes the problem by waiting on the pending sync swaps all done when
switching to async mode, so move 6&7 before 3.
Attach the xtrace when problem happens:
005:<:003e: 72: Present-Request(148,1): Pixmap window=0x03000002 pixmap=0x0300000b serial=1 valid=0x00000000 update=0x00000000 x_off=0 y_off=0 target_crtc=0x00000000 wait_fence=0x00000000 idle_fence=0x0300000c options=0 target_msc=4294967296 divisor=0 remainder=0 notifies=;
...
005:<:0041: 72: Present-Request(148,1): Pixmap window=0x03000002 pixmap=0x03000011 serial=2 valid=0x00000000 update=0x00000000 x_off=0 y_off=0 target_crtc=0x00000000 wait_fence=0x00000000 idle_fence=0x03000012 options=Async target_msc=0 divisor=0 remainder=0 notifies=;
005:>:0041: Event Generic(35) Present(148) IdleNotify(2) event=0x03000006 window=0x03000002 serial=2 pixmap=0x03000011 idle_fence=0x03000012
005:>:0041: Event Generic(35) Present(148) CompleteNotify(1) kind=Pixmap(0x00) mode=Copy(0x00) event=0x03000006 window=0x03000002 serial=2 ust=7505462213117739011 msc=3565046193979392
005:>:0041: Event Generic(35) Present(148) IdleNotify(2) event=0x03000006 window=0x03000002 serial=1 pixmap=0x0300000b idle_fence=0x0300000c
005:>:0041: Event Generic(35) Present(148) CompleteNotify(1) kind=Pixmap(0x00) mode=Copy(0x00) event=0x03000006 window=0x03000002 serial=1 ust=7505533793042694147 msc=3565050488946688
Cc: mesa-stable
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13019 >
2021-09-30 03:27:14 +00:00
Chia-I Wu
443bf16782
venus: keep layouts of descriptor sets alive
...
We might reorder vkCmdBindDescriptorSets after
vkDestroyDescriptorSetLayout due to batching, which is likely invalid.
Keep the layouts alive with the sets to defer
vkDestroyDescriptorSetLayout.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090 >
2021-09-30 03:16:19 +00:00
Chia-I Wu
e88c7191aa
venus: add vn_refcount to vn_descriptor_set_layout
...
The reference count does not go beyond 1 yet.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090 >
2021-09-30 03:16:19 +00:00
Chia-I Wu
5337fb1e06
venus: add a helper to destroy vn_descriptor_set
...
Add vn_descriptor_set_destroy.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090 >
2021-09-30 03:16:19 +00:00
Chia-I Wu
d7560a71a2
venus: convert bo and shmem to use vn_refcount
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090 >
2021-09-30 03:16:19 +00:00
Chia-I Wu
5cdbf75615
venus: add vn_refcount
...
Memory ordering is hard. Add vn_refcount to take care of the details.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090 >
2021-09-30 03:16:19 +00:00
Jason Ekstrand
1da70c7e93
v3dv: Use VK_DEFINE_*HANDLE_CASTS instead of rolling our own
...
The core ones have some nifty stuff like asserts that it's a valid
vk_object_base and has the right type. We don't have real type safety
with Vulkan handles but this is as close as we can get. The core ones
also track when we've started handing out handles for logging purposes
which we want.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13101 >
2021-09-29 23:27:52 +00:00
Jason Ekstrand
24637a6579
vulkan/shader_module: Fix the lifetime of temporary shader modules
...
The vk_shader_module_handle_from_nir() macro was constructing a
temporary vk_shader_module and passing it through
vk_shader_module_to_handle(). Since this is a function and not a macro,
it means that the lifetime of the temporary vk_shader_module will end
once the to_handle() function is called. Technically, this is a
use-after-free. I really don't know why no one has been bitten by this
yet....
Fixes: a41e98ddca "vk/util: add a util macro for initializing stack..."
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13101 >
2021-09-29 23:27:52 +00:00
Rob Clark
2b826582d8
isaspec: De-duplicate bitset encoding
...
bitset encoding tends to have a lot of duplication, for ex. many
instructions with the same encoding modulo the fixed pattern. Now that
encode_bitset is split out into it's own template, so that we can
capture the result, use a hash table to de-duplicate the bitset encoding
into "snippet" functions so that bitset cases with identical encoding
can re-use the same generated code.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Rob Clark
8726ed7221
isaspec: Split encode_bitset() into it's own template
...
In the next patch, we are going to want to be able to capture the result
of rendering the template as a py variable, which I don't think you can
do otherwise with a <%def>.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Rob Clark
72db4e51f3
isaspec: Fix comment
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Rob Clark
cd3ee83ca5
isaspec: Remove unused leftovers
...
These were never used, leftovers from an earlier iteration of isaspec
which used an RPN based thing for expressions.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049 >
2021-09-29 22:59:43 +00:00
Dylan Baker
878cc65c40
docs: update calendar and link releases notes for 21.2.3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13109 >
2021-09-29 22:53:32 +00:00
Dylan Baker
56510179b6
docs" Add SHA256 sum for mesa 21.2.3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13109 >
2021-09-29 22:53:32 +00:00
Dylan Baker
4423581ab3
docs: add release notes for 21.2.3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13109 >
2021-09-29 22:53:32 +00:00
Chia-I Wu
a3f2ffcc02
venus: copy VkPhysicalDeviceImageDrmFormatModifierInfoEXT
...
We should not drop VkPhysicalDeviceImageDrmFormatModifierInfoEXT when it
is provided.
Fixes dEQP-VK.drm_format_modifiers.export_import.*.
Fixes: efa185ed5c ("venus: rework external memory capability queries")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13094 >
2021-09-29 22:41:01 +00:00
Dave Airlie
b9aee98912
gallivm: use pmulhrsw to make aos sampling more accurate.
...
This uses pmulhrsw avx2 and ssse3 variants. It fixes the
precision of texture filtering calculations.
However it does leave these paths inaccurate on platforms
that don't support it.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13075 >
2021-09-29 21:55:23 +00:00
Rhys Perry
2f0a007976
radv: workaround incorrect image format with World War Z
...
The image format in a FSR-related shader is incorrect.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5407
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13084 >
2021-09-29 21:13:15 +00:00
Jason Ekstrand
0737b37dcd
intel/fs: Emit URB fences when we have LSC
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Tested-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092 >
2021-09-29 20:52:54 +00:00
Jason Ekstrand
e6a9501aa2
intel/fs: Add the URB fence message
...
When they re-arranged all the dataport stuff and added the LSC, doing
URB fencing through the dataport no longer makes sense. Instead, there
is now a fence message on the URB shared function.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Tested-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092 >
2021-09-29 20:52:54 +00:00
Jason Ekstrand
eb53d82d2d
intel/fs: Ignore SLM fences if shared is unused
...
Found this nugget while looking at the ACO driver. It seems sensible to
avoid SLM fences if there is no SLM. This also makes the check depend
on SLM usage rather than just shader stage which will be useful if we
ever implement task/mesh because task shaders also have SLM.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092 >
2021-09-29 20:52:54 +00:00
Jason Ekstrand
f726246297
intel/fs: Rework fence handling in brw_fs_nir.cpp
...
Start off making everything look like LSC where we have three types of
fences: TGM, UGM, and SLM. Then, emit the actual code in a generation-
aware way. There are three HW generation cases we care about:
XeHP+ (LSC), ICL-TGL, and IVB-SKL. Even though it looks like there's a
lot to deduplicate, it only increases the number of ubld.emit() calls
from 5 to 7 and entirely gets rid of the SFID juggling and other
weirdness we've introduced along the way to make those cases "general".
While we're here, also clean up the code for stalling after fences and
clearly document every case where we insert a stall.
There are only three known functional changes from this commit:
1. We now avoid the render cache fence on IVB if we don't need image
barriers.
2. On ICL+, we no longer unconditionally stall on barriers. We still
stall if we have more than one to help tie them together but
independent barriers are independent. Barrier instructions will
still operate in write-commit mode and still be scheduling barriers
but won't necessarily stall.
3. We now assert-fail for URB fences on LSC platforms. We'll be adding
in the new URB fence message for those platforms in a follow-on
commit.
It is a big enough refactor, however, that other minor changes may be
present.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092 >
2021-09-29 20:52:54 +00:00
Dave Airlie
690cc3bb80
llvmpipe: overhaul fs/cs variant keys to be simpler.
...
These currently always had one sampler state embedded, but got messy
when images was 1 and samplers was 0.
This should fix some undefined reads seen
Fixes: e639e311a1 ("llvmpipe/cs: overhaul cs variant key state.")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13012 >
2021-09-30 04:55:12 +10:00
Joshua Ashton
b9262960ff
radv: Define extern "C" linkage if C++
...
I am working on a project that uses radv_private.h from C++ code which needs this.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103 >
2021-09-29 17:42:17 +00:00
Joshua Ashton
35897a1ac7
radv: Rename radv_subpass_barrier function to radv_emit_subpass_barrier
...
Otherwise this shadows the name of the structure, which is problematic for C++ code due to constructors.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103 >
2021-09-29 17:42:17 +00:00
Joshua Ashton
adbe4022c6
vulkan/util: Cast vk_alloc pointers
...
Fixes errors when trying to use vk_alloc.h from C++ code.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103 >
2021-09-29 17:42:17 +00:00
Lionel Landwerlin
52c0e6e5b3
spirv: switch Groups capability to non AMD specific field
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13081 >
2021-09-29 15:40:20 +00:00
Timur Kristóf
5c35040da1
aco: Don't write m0 register for LDS instructions on GFX9+.
...
Fossil DB stats on Sienna Cichlid:
Totals from 2691 (2.09% of 128647) affected shaders:
VGPRs: 124392 -> 124376 (-0.01%)
CodeSize: 8192352 -> 8174620 (-0.22%); split: -0.22%, +0.00%
MaxWaves: 61516 -> 61524 (+0.01%)
Instrs: 1519774 -> 1514958 (-0.32%); split: -0.32%, +0.00%
Latency: 14767555 -> 14766145 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 3394282 -> 3394173 (-0.00%); split: -0.01%, +0.00%
VClause: 31985 -> 32002 (+0.05%); split: -0.02%, +0.07%
SClause: 47581 -> 47539 (-0.09%); split: -0.14%, +0.05%
Copies: 127533 -> 122709 (-3.78%); split: -3.80%, +0.02%
Branches: 39395 -> 39390 (-0.01%)
PreSGPRs: 84389 -> 82702 (-2.00%)
PreVGPRs: 87520 -> 87519 (-0.00%)
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 60930 (47.36% of 128647) affected shaders:
VGPRs: 2180712 -> 2180696 (-0.00%)
CodeSize: 169122736 -> 167474304 (-0.97%); split: -0.97%, +0.00%
MaxWaves: 1703698 -> 1703706 (+0.00%)
Instrs: 32301234 -> 31888743 (-1.28%); split: -1.28%, +0.00%
Latency: 152526083 -> 152367301 (-0.10%); split: -0.10%, +0.00%
InvThroughput: 25090218 -> 25089812 (-0.00%); split: -0.00%, +0.00%
VClause: 577302 -> 577319 (+0.00%); split: -0.00%, +0.00%
SClause: 801614 -> 801572 (-0.01%); split: -0.01%, +0.00%
Copies: 3399700 -> 2987201 (-12.13%); split: -12.13%, +0.00%
Branches: 1262859 -> 1262854 (-0.00%)
PreSGPRs: 2175752 -> 2141331 (-1.58%)
PreVGPRs: 1785088 -> 1785087 (-0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11224 >
2021-09-29 16:00:19 +02:00
mwezdeck
3e2a8178bf
mesa: validate texture format against GL/ES ctx
...
GL_ALPHA, GL_LUMINANCE and GL_LUMINANCE_ALPHA
texture formats are supported in:
1. GL Compatibility spec
2. GLES 1.0 - GLES 3.2 spec
However, these formats are not supported in:
1. GL Core spec
This patch changes a logic of validation
texture formats in calls like glTexImage2D.
If the context is CORE and these formats were
selected, then return "-1" and in upper layer
return GL_INVALID_ENUM.
If the context is not CORE, return appropriate
format.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13059 >
2021-09-29 12:42:21 +00:00
Samuel Pitoiset
e0efc1eafe
radv: remove radv_shader_variant_key completely
...
Die radv_shader_variant_key, die!
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085 >
2021-09-29 09:59:09 +00:00
Samuel Pitoiset
ac774b73fe
radv: stop using vs_common_out.{as_es/as_ls/as_ngg*} shader keys
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085 >
2021-09-29 09:59:09 +00:00
Samuel Pitoiset
9aaf51639a
radv: use the pipeline key more when possible
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085 >
2021-09-29 09:59:09 +00:00
Samuel Pitoiset
1eb428fa9f
radv: pass the pipeline key to the shader info pass
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085 >
2021-09-29 09:59:09 +00:00
Samuel Pitoiset
0753615d10
radv: remove vs_common_out:export_clip_dists
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085 >
2021-09-29 09:59:09 +00:00
Pierre-Eric Pelloux-Prayer
d17e752857
radeonsi: disable PIPE_CAP_PREFER_BACK_BUFFER_REUSE
...
With https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 ,
the DRI_PRIME dGPU -> iGPU copy will be done by the SDMA hw.
Since it's asynchronous, it's better to always use at least 2 back
buffers to get the next frame rendering started during the copy.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788 >
2021-09-29 08:14:57 +00:00
Pierre-Eric Pelloux-Prayer
09dc0fb2ee
loader/dri3: avoid reusing the same back buffer with DRI_PRIME
...
For DRI_PRIME setup where the dGPU -> iGPU copy can happen asynchronously,
we need to ensure that we're not continuously reusing the same back buffer.
The existing code relies on XCB_PRESENT_EVENT_IDLE_NOTIFY to decide if
a buffer is busy or idle. If this event is received before the hardware
is done using the buffer, then it will reuse the same buffer and introduce
a dependency between the copy and the next frame.
This commit mitigates this by trying to allocate a different back buffer
when called from dri3_get_buffer (not from dri3_find_back_alloc, because it
seems that it expects dri3_get_buffer - see 0cc4c7e33e ).
An alternative would be to query the busy-ness using is_resource_busy
but this complicates the code to achieve the same result.
One affected app is Unigine Superposition, and this change improves the
score by 0% - 5% depending on the settings.
This behavior is enabled if PIPE_CAP_PREFER_BACK_BUFFER_REUSE is 0.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788 >
2021-09-29 08:14:57 +00:00
Pierre-Eric Pelloux-Prayer
e67083caf4
gallium: add PIPE_CAP_PREFER_BACK_BUFFER_REUSE
...
This will be used in the next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788 >
2021-09-29 08:14:57 +00:00
Corentin Noël
d89ba3f2a9
virgl: Set GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION to 1
...
The resulting quads are actually already following the provoking vertex convention.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12851 >
2021-09-29 07:53:39 +00:00
Vinson Lee
77d2bdb0a2
pps: Avoid duplicate elements in with_datasources array.
...
Setting -Dperfetto=true and -Ddatasources=intel,panfrost to the
meson command line resulted in duplicate elements.
Fixes: 92180a4376 ("pps: Intel pps driver")
Fixes: 513d1baaea ("pps: Panfrost pps driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12379 >
2021-09-29 07:26:18 +00:00
Guilherme Gallo
fd71ccf4d7
ci: Uprev deqp-runner to 0.9.0
...
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13088 >
2021-09-29 05:47:55 +00:00
Marek Olšák
049c366378
radeonsi: don't set DX10_DIAMOND_TEST_ENA for better performance
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13093 >
2021-09-28 19:34:07 -04:00
Alejandro Piñeiro
1898ee5493
v3d/v3dv: add unlikely for any V3D_DEBUG check
...
We had some with unlikely, some without it. Let's just put unlikely to
all of them.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071 >
2021-09-28 22:30:29 +00:00
Alejandro Piñeiro
0e5601e6f3
broadcom/common: remove unused debug helper
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071 >
2021-09-28 22:30:29 +00:00
Dave Airlie
6db1434480
lavapipe: fixup image binding flags.
...
This removes a bunch of warnings in the debug logs on CI
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13091 >
2021-09-29 07:57:22 +10:00
Dave Airlie
3010c86094
lavapipe: cleanup image create function.
...
drop the wrapper as it's unused and make things static.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13091 >
2021-09-29 07:57:07 +10:00
Jason Ekstrand
0793b259b0
panvk: Switch to common GetDeviceQueue and DeviceWaitIdle
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:26 +00:00
Jason Ekstrand
06ac3b1bea
lavapipe: Switch to common GetDeviceQueue and DeviceWaitIdle
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:26 +00:00
Jason Ekstrand
f3040c6e05
lavapipe: Simplify DeviceWaitIdle
...
No reason to duplicate the guts of QueueWaitIdle inside DeviceWaitIdle.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:26 +00:00
Jason Ekstrand
01622bee5e
v3dv: Use the common GetDeviceQueue implementation
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:26 +00:00
Jason Ekstrand
c6210d5aa9
turnip: Switch to common GetDeviceQueues2 and DeviceWaitIdle
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:26 +00:00
Jason Ekstrand
7416c6f0a4
radv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:26 +00:00
Jason Ekstrand
cc9f34cdd6
anv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
0e4266260a
vulkan/device: Add a common DeviceWaitIdle implementation
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
3b535d28d2
vulkan/device: Add a common GetDeviceQueue2 implementation
...
If we store the queues in a linked list in the device as vk_queue_init
is called then we can handle enumeration in common code.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
0d80799ccd
panvk: Drop panvk_queue::flags/queue_family_index
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
713af72048
v3dv: Drop v3dv_queue::flags
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
8619c6df62
turnip: Drop tu_queue::flags/queue_family_index/queue_idx
...
They're now part of vk_queue.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
6c8b0b35a6
lavapipe: Drop lvp_queue::flags
...
It's now part of vk_queue
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
7a2868967d
radv: Drop radv_queue::flags/queue_family_index/queue_idx
...
They're now part of vk_queue.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
317c5ebf3e
anv: Drop anv_queue::flags
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
b2313b6884
vulkan: Add the pCreateInfo to vk_queue_init()
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
1815271f0a
panvk: Use vk_command_buffer
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
9846783001
panvk: Use vk_queue
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003 >
2021-09-28 21:08:25 +00:00
Jason Ekstrand
afb3d7a804
iris: Return 1 for PIPE_COMPUTE_CAP_IMAGES_SUPPORTED
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072 >
2021-09-28 20:54:29 +00:00
Jason Ekstrand
5f8e043fb6
iris: Handle states=NULL in iris_bind_sampler_states
...
Clover likes to do this to clear our a bunch of samplers without
actually passing an array of NULL pointers. It's easy enough to
handle in iris.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072 >
2021-09-28 20:54:29 +00:00
Yiwei Zhang
5a9f907d94
venus: properly check and fill ahb buffer properties
...
When it comes to AHB, pExternalBufferInfo->handleType is already
overridden to the renderer handle type. Thus the AHB buffer prop path is
not used. However, this is not caught by cts, vvl or apps because the
host renderer memory features so far satisfy the ahb requirement.
Fixes: ebf0e45506 ("venus: add ahb image and buffer properties query support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13076 >
2021-09-28 20:41:40 +00:00
Luis Felipe Strano Moraes
489d325757
docs: Add documentation regarding INTEL_MEASURE to envvars doc.
...
This was initially written by Mark Janes, and was part of MR 7354.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043 >
2021-09-28 20:09:03 +00:00
Luis Felipe Strano Moraes
884198cb26
docs: Clean up environment variable docs for Intel drivers.
...
- Change section name to be more general
- Remove INTEL_SCALAR_VS (dropped as part of release 20.3)
- Sort alphabetically
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043 >
2021-09-28 20:09:03 +00:00
Daniel Schürmann
40a93e271c
aco: clang-format
...
No changes, just formatting.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13087 >
2021-09-28 19:48:00 +00:00
Boris Brezillon
fbbe00c0b7
panfrost: Use an identity swizzle for RAW formats
...
When the render target format is raw, the swizzle is ignored. Let's
set it to identity to avoid misleading the pandecode reader into
thinking the swizzle is applied.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793 >
2021-09-28 18:59:46 +00:00
Boris Brezillon
ce8ea9e602
pan/lower_fb: Add support for rgb10a2 _SINT variants
...
It's just a matter of taking the sign bit into account in the
pack/unpack routines.
Needed for panvk rgb10a2_sint blits.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793 >
2021-09-28 18:59:46 +00:00
Boris Brezillon
15f6cd7f72
pan/lower_fb: Add support for B10G10R10A2_UINT variants
...
The components are re-ordered before packing/unpacking, so nothing to
do here except adding the missing case in the switch statements.
Needed for panvk bgr10a2_uint blits.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793 >
2021-09-28 18:59:46 +00:00
Boris Brezillon
7625cba2b7
pan/lower_fb: Re-order components when dealing with raw formats
...
The output swizzle defined in the render-target descriptor is ignored
when the format is RAW. In that case, we have to swap the components
when lowering FB stores/loads if we want to get the right color.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793 >
2021-09-28 18:59:46 +00:00
Boris Brezillon
a0867ef934
pan/lower_fb: Support SNORM8 unpacking
...
Needed for panvk blend lowering.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793 >
2021-09-28 18:59:46 +00:00
Boris Brezillon
f256ec2a88
pan/bi: Fix 1DArray image coordinate retrieval
...
In NIR image instructions, the array index always follows the last
image coordinate, meaning that array index is in coord.y for 1D
arrays. But the current panfrost ABI wants it in coord.z regardless of
the image dimension.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13078 >
2021-09-28 18:44:05 +00:00
Timur Kristóf
d3e0cf3d32
aco: Omit p_extract after ds_read with matching bit size.
...
Fossil DB stats on Sienna Cichlid:
Totals from 135 (0.10% of 128647) affected shaders:
CodeSize: 525184 -> 523704 (-0.28%)
Instrs: 92835 -> 92684 (-0.16%)
Latency: 311528 -> 311055 (-0.15%)
InvThroughput: 86572 -> 86455 (-0.14%)
Copies: 7666 -> 7650 (-0.21%)
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 58374 (45.38% of 128647) affected shaders:
CodeSize: 160322912 -> 159622564 (-0.44%)
Instrs: 30755822 -> 30639193 (-0.38%)
Latency: 136713768 -> 136690360 (-0.02%)
InvThroughput: 21739219 -> 21658151 (-0.37%)
Copies: 3297969 -> 3297953 (-0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560 >
2021-09-28 17:59:27 +00:00
Timur Kristóf
9478901824
aco: Implement integer conversions using p_extract.
...
Fossil DB stats on Sienna Cichlid:
Totals from 563 (0.44% of 128647) affected shaders:
SpillSGPRs: 1381 -> 1382 (+0.07%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize: 2474724 -> 2446612 (-1.14%); split: -1.15%, +0.02%
Scratch: 181248 -> 180224 (-0.56%)
Instrs: 440973 -> 435091 (-1.33%); split: -1.35%, +0.01%
Latency: 9123609 -> 8517830 (-6.64%); split: -6.66%, +0.02%
InvThroughput: 3685256 -> 3383293 (-8.19%); split: -8.22%, +0.02%
VClause: 8425 -> 8372 (-0.63%)
Copies: 66553 -> 66681 (+0.19%); split: -0.49%, +0.68%
Branches: 13824 -> 13825 (+0.01%); split: -0.01%, +0.01%
PreSGPRs: 21816 -> 21824 (+0.04%)
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 58802 (45.71% of 128647) affected shaders:
SpillSGPRs: 6541 -> 6542 (+0.02%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize: 162976608 -> 162244340 (-0.45%); split: -0.45%, +0.00%
Scratch: 181248 -> 180224 (-0.56%)
Instrs: 31163521 -> 31098078 (-0.21%); split: -0.21%, +0.00%
Latency: 146893569 -> 144920070 (-1.34%); split: -1.34%, +0.00%
InvThroughput: 25384324 -> 25035940 (-1.37%); split: -1.38%, +0.00%
VClause: 552310 -> 552257 (-0.01%)
Copies: 3356856 -> 3356984 (+0.00%); split: -0.01%, +0.01%
Branches: 1237314 -> 1237315 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 2185339 -> 2185347 (+0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560 >
2021-09-28 17:59:27 +00:00
Timur Kristóf
f14023666c
aco: Allow p_extract to have different definition and operand sizes.
...
Makes p_extract more flexible and prepares it to be usable
for other use cases.
No Fossil DB changes.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560 >
2021-09-28 17:59:27 +00:00
Marek Olšák
f00d3e2909
radeonsi: implement shader-based culling for lines
...
This helps some viewperf subtests.
Only view XY culling is done. Edgeflags are always disabled with lines.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
e7e0b90c94
ac/llvm: rename ac_cull_triangle -> ac_cull_primitive
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
0030bdf9a6
radeonsi: add gfx10 helpers for determining whether edgeflags are enabled
...
They will return false when culling lines.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
6058b7381e
radeonsi: always use the correct number of vertices in NGG shader code
...
This is always 3 now, but it will be 2 for lines.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
25026076ab
ac/llvm: pass cull options into cull_bbox directly
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
ccbd551192
radeonsi: disallow NGG fast launch on Navi1x because VGT_FLUSH makes it slower
...
This improves viewperf performance on Navi1x.
All Navi1x fast launch workarounds are removed and all fast launch
codepaths are disabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
b1cf504f78
radeonsi: fix clearing index_size for NGG fast launch
...
Cc: 21.1 21.2 <mesa-stable@lists.freedesktop.org >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
e40bd61588
radeonsi: strenthen the ngg->legacy hw workaround, fix fast launch hangs too
...
Cc: 20.1 20.2 <mesa-stable@lists.freedesktop.org >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
279cd5821c
ac/gpu_info: fix the comment for the NGG->legacy transition bug
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
1f445e76ae
radeonsi: don't check ngg_culling != 0 for fast launch because it's tautology
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
678b6cdc8b
radeonsi: clean prefer_mono for the blit VS
...
This was missed when I was reworking shader key updates.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
73b036306c
radeonsi: reduce NGG culling on/off transitions by keeping it enabled
...
When it's enabled, it stays enabled until the next shader change
or an incompatible primitive type, etc.
This improves performance for viewperf/snx.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
d7b0ddbfa8
radeonsi: use the optimal draw packet sequence for VGT_FLUSH
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
a927a2f527
radeonsi: set vs_uses_base_instance using C++ template arguments
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
ca37d4c925
radeonsi: decrease vertex count threshold for shader culling to 128
...
to match radv
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
465f249ec8
radeonsi: change the units of oversub_pc_factor to integer multiples of 1/4
...
to match radv
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
4cb008719c
radeonsi: fix a depth texturing performance regression on gfx6-7
...
Fixes: 0580d4c1 "radeonsi: enable HTILE with mipmapping on gfx9+"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5398
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Joshua Ashton
eb06e6e6cd
radv: Add noatocdithering option to RADV_DEBUG
...
Was useful in testing a difference between D3D and VK ATOC rendering earlier today, would be nice to check this more easily in future.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13069 >
2021-09-28 17:06:36 +00:00
Lionel Landwerlin
daa8a81d99
nir: fix opt_memcpy src/dst mixup
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: f6667cb0ce ("nir: Add a memcpy optimization pass")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13079 >
2021-09-28 16:36:08 +00:00
Boris Brezillon
694e14dd99
panvk/ci: Trigger bifrost jobs on vulkan changes
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
6fbad56654
panvk: Split var copies before lowering them
...
Otherwise we hit an assert() in the nir_lower_var_copies() path.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
6de4351f96
panvk: Handle VK_REMAINING_{MIP_LEVELS,ARRAY_LAYERS) when creating image views
...
Othewise last_{layer,level} are out of bounds.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
346c6ac221
panvk: Fix stencil clear assignment in panvk_cmd_fb_info_set_subpass()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
99adf33642
panvk: Fix size overflow in GetBufferMemoryRequirements()
...
align64() will overflow if buffer->size is bigger than UINT64_MAX - 63.
Fixes dEQP-VK.api.buffer.basic.size_max_uint64.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
02c46a28ef
panvk: Fix 1DArray image to buffer copy
...
The img2buf shaders expect the array index to be placed in coord.y when
copying a 1D array. Adjust the compute job instantiation to match this
behavior.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
e48d66afcb
panvk: Only prepare texture descriptors when the image is sampled
...
Not that input attachments will be lowered to textures, so we need to
create a texture descriptor in that case too.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
92768ee627
panvk: Don't expect subpasses to use all RTs
...
Some might use a subset, and that's fine, we just need to disable unused
RTs when beginning a subpass, which we do.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
96f006539f
panvk: Fix an overflow on cmdbuf->state.clear
...
We assume the cmdbuf->state.clear array will have one entry per
attachment, but clearValueCount might be smaller if some attachments
are not cleared.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
d43912b188
panvk: Handle input varyings without previous writes
...
Some input varyings might not be written by any of the active stages
preceding the stage reading the varying (e.g. gl_Layer should be set
to 0 when not written by vertex/geometry shaders). In this case, we can
insert a dummy varying attribute returning zero. This is actually what
the code intended to do, but 2 things were missing:
1. formats[NONE] is not mapping to the CONSTANT0 format
2. the offset and strides should always be set to 0 when using a
CONSTANT0 attribute
All of this is needed to have the input attachments working. Indeed, we
use the nir_lower_input_attachments() pass which lowers input attachment
loads to texel fetches, and the txf operation is passed the layer_id
in its 3rd coordinate.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
9c60de9b57
panvk: Avoid allocating sysvals UBOs when the pipeline has one
...
The static sysval UBO attached to the pipeline will be used anyway,
so let's not waste memory for sysvals if we can avoid it.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
ac89873125
panvk: Fix multisample image copies
...
panvk_meta_copy_img2img() was assuming single-sample images, but the
spec actually allows copying multisample images, as long as the source
and destination agree on the number of samples.
Let's extend the img2img copy logic to support that case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
961d03ce61
panvk: Fix panvk_pipeline_builder_upload_sysval()
...
Call panvk_sysval_upload_viewport_offset() instead of
panvk_sysval_upload_viewport_scale() in the PAN_SYSVAL_VIEWPORT_OFFSET
case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
20fe252664
panvk: Fix the pipeline binding logic
...
Right now, only one pipeline can be bound at any given time, instead of
one per bind-point. Fix the code so we can support compute operations.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
5360e6240d
panvk: Don't invalidate the vertex attributes when binding a new pipeline
...
This should be done when binding new vertex buffers.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
d008f9d35a
panvk: Use the local batch variable when we have one
...
s/cmdbuf->state.batch->/batch->/ when the batch variable exists.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
8fb22d28d8
panvk: Make panvk_cmd_open_batch() return the new batch
...
So we can get replace the
panvk_cmd_open_batch();
batch = cmdbuf->state.batch;
sequence by
batch = panvk_cmd_open_batch();
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
28bd417e3d
panvk: Extend panvk_cmd_close_batch() to handle current_batch == NULL
...
This way callers don't have to check it.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
915a41f55a
panvk: Fix TLS initialization for multi-draw batches
...
If we queue multiple draws to the same batch, the TLS size should be
adjusted to cover the maximum TLS size requirement, not just the one
of the pipeline bound when the batch is closed. This requires keeping
TLS info attached to the batch and updating it every time a draw is
issued.
While at it, get rid of the wg_count state: we'll let vkCmdDispatch()
calculate the total WLS size.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
e856386764
panvk: Fix the static scissor/viewport case
...
Even if we can build a static viewport descriptor, we will need the
static scissor/viewport data to fill the viewport sysvals.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Boris Brezillon
a5115faefa
panvk: Always allocate at least one BLEND descriptor for fragment shaders
...
Even there's no render target.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077 >
2021-09-28 14:03:40 +00:00
Samuel Pitoiset
bff052d6f5
radv: remove vs_common_out:export_prim_id
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13062 >
2021-09-28 13:42:52 +00:00
Samuel Pitoiset
4a6d119309
radv: remove unnecessary init of outinfo.export_prim_id for GS
...
When a geometry shader is present, not writing the gl_PrimitiveID is
undefined, so this is unnecessary. Note that this was never reached
on <= GFX8 because vs_common_out.export_prim_id from the GS key was
always FALSE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13062 >
2021-09-28 13:42:52 +00:00
Samuel Pitoiset
1e5b9b7410
radv: remove unnecessary radv_shader_info:{vs,tes}.export_prim_id
...
Use the VS outputinfo struct instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13062 >
2021-09-28 13:42:52 +00:00
Lionel Landwerlin
32358b0335
microsoft/clc: drop LLVM dependency to version < 12
...
Prior to LLVM 12, SmallVector requires 2 template arguments.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: c4755a7c32 ("microsoft/clc: Support SPIR intermediates in the compilation APIs")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13083 >
2021-09-28 13:29:56 +00:00
Samuel Pitoiset
19e5b4cf2e
radv: remove unnecessary vs_common_out.export_layer_id
...
Same as the viewport index, the driver will emit 0 for the PS input
in this case.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13061 >
2021-09-28 12:30:36 +00:00
Samuel Pitoiset
a35cfa77f6
radv: remove unnecessary vs_common_out.export_viewport_index
...
This was only used when the FS needs the viewport index if it's not
exported by the previous stage. Though, this is actually useless
because the driver will emit 0 for the PS input in this case.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13061 >
2021-09-28 12:30:36 +00:00
Pierre-Eric Pelloux-Prayer
7594d4ae2c
radeonsi/test: add sanity checks
...
Verify that DISPLAY is there and deqp-runner is at least 0.9.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
bf5cd4c48a
radeonsi/test: add Raven expected results
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
0afd9e272e
radeonsi/test: add --gpu to select the GPU to test
...
And specify DRI_PRIME + WAFFLE_GBM_DEVICE to avoid testing the wrong GPU.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
814e98c3a0
radeonsi/test: sanitize output_folder
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
ff8edcf903
radeonsi/test: allow to specify a baseline folder
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
1248c4728a
radeonsi/test: print default values in help
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Rhys Perry
59084f05fc
radv: don't require a GS copy shader to use the cache with NGG VS+GS
...
Fixes dEQP-VK.pipeline.cache.no_cache_control.readwrite_cache.pipeline_from_get_data.vertex_stage_geometry_stage_fragment_stage
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: 7e664a5383 ("radv: Don't generate GS copy shader when the pipeline has NGG.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12741 >
2021-09-28 10:56:00 +01:00
Samuel Pitoiset
2c21835963
radv: remove unused radv_nir_compiler_options fields
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13067 >
2021-09-28 08:25:28 +02:00
Samuel Pitoiset
82193fa58c
radv: cleanup uses of VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT
...
Use the pipeline key instead of this mess.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13067 >
2021-09-28 08:25:26 +02:00
Timothy Arceri
7188e7c87d
util/cache: test simple cache put and get between instances
...
To make sure we are not just using the in-memory cache index for
the single file cache, we test adding and retriving cache items
between two different cache instances.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12925 >
2021-09-28 01:12:33 +00:00
Ella-0
e043b97704
v3d: add R10G10B10X2_UNORM to format table
...
Fixes following piglit fails:
spec@ext_framebuffer_object@fbo-blending-formats
spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB10
Cc: mesa-stable
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13051 >
2021-09-28 00:20:39 +00:00
Roland Scheidegger
f2d76a576d
lavapipe: Fix crashes with transform feedback when using VK_WHOLE_SIZE
...
llvmpipe expects valid size parameter, and when just VK_WHOLE_SIZE is
passed very bad things can happen.
This was handled specially before, but got dropped when lavapipe was
converted to use the generated command queue.
Fixes: eb7eccc76f ("lavapipe: Use generated command queue code")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13036 >
2021-09-27 23:04:20 +00:00
Mike Blumenkrantz
e24ef5d914
anv: assert that legacy_scanout isn't used with explicit modifiers
...
these should be mutually exclusive
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12919 >
2021-09-27 17:36:44 -04:00
Caio Marcelo de Oliveira Filho
f1a7cc54f3
iris: Document push constants allocation
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13014 >
2021-09-27 20:51:29 +00:00
Caio Marcelo de Oliveira Filho
37f03e89f2
intel: Add and use max_constant_urb_size_kb
...
This knowledge was repeated in multiple places so move the values to
intel_device_info struct.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13014 >
2021-09-27 20:51:28 +00:00
Lionel Landwerlin
f349c8ab4b
spirv: don't bother initializing variables to Undef
...
If an OpVariable's initializer is undef, there is no need to
initialize the variable.
v2: Comment the code (Caio)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13030 >
2021-09-27 19:04:42 +00:00
Lionel Landwerlin
a17d24d901
spirv: workaround LLVM-SPIRV Undef variable initializers
...
The LLVM-SPIRV translator creates variables with initializers, but
most of those are actually undef initializers. We can just skip
composites that are entirely made of undefs, but for partially undefs,
we will still zero initialize.
v2: Rename wa_llvm_spirv_undef_initializer to wa_llvm_spirv_ignore_workgroup_initializer (Caio)
Limit workaround to OpenCL (Caio)
Make workaround clearer (Caio)
v3: Only apply workaround on workgroup storage (Caio)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13030 >
2021-09-27 19:04:42 +00:00
Lionel Landwerlin
a17928639d
spirv: avoid shadowing local variable
...
v2: rename s/eval/elem_val/ (Caio)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13030 >
2021-09-27 19:04:42 +00:00
Jesse Natalie
1f880a2ea8
clover: Rename module -> binary, because C++20 makes module a keyword
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12273 >
2021-09-27 18:50:09 +00:00
Jesse Natalie
6fb29e1de0
clover: Delete unused 'e' exception reference vars
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12273 >
2021-09-27 18:50:09 +00:00
Jesse Natalie
38e36df7cb
clover: std::result_of is deprecated in c++17 and removed in c++20
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12273 >
2021-09-27 18:50:09 +00:00
Emma Anholt
7371efdb3a
i915g: Use the non-vbuf code path by default to fix index overflows.
...
We were assertion failing on some large draws due to indices >16bits,
despite asking draw to limit the max indices. I haven't managed to track
it down, so flip us back to the older, non-index drawing path that doesn't
hit this bug until it can get fixed. Leave an I915_DEBUG=vbuf flag around
so we can look into this later.
This is a pretty big performance hit for vertex shaders. Using glmark2 -b
build:use-vbo=true:
i915g-vbuf: 211 fps
i915g-nonvbuf: 185 fps
i915c: 41 fps
Given how massively better i915g still is than i915c (llvmpipe VS instead
of the classic swrast interpreter), I think it's still worth it to get
i915g correct before we fix this perf regression.
Fixes : #4971
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13052 >
2021-09-27 18:36:10 +00:00
Emma Anholt
2aa8317e06
i915g: Unifdef VBUF_MAP_BUFFER.
...
You do want to stream the vertices out to the WC mapping, as the code has
been doing, rather than writing into malloc and doing a memcpy later and
wasting cache space.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13052 >
2021-09-27 18:36:10 +00:00
Emma Anholt
a364e8603d
i915g: Remove dead VBUF_USE_POOL code.
...
Not defined anywhere, and the members it's setting up don't exist.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13052 >
2021-09-27 18:36:10 +00:00
Emma Anholt
fcb6beceef
i915g: Improve debug output for the fresh-batch overflow case.
...
Much more useful info for dEQP-GLES2.functional.buffer.write.random.0 than
"i915_vbuf_render_draw_elements: Assertion `0' failed."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13052 >
2021-09-27 18:36:10 +00:00
Juan A. Suarez Romero
dffe012b09
ci/vc4: add piglit timeout
...
Acked-by: Emma Anholt <emma@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13065 >
2021-09-27 18:04:17 +00:00
Emma Anholt
c0142ddf3a
turnip: Disable VK_EXT_display_control.
...
The common code fails dEQP-VK.wsi.display_control.register_device_event
due to having a stub NOT_IMPLEMENTED return, and thus fails the CTS. This
is one of our last failures, so disable the extension until it can get
finished off, so we can unblock passing the CTS.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13010 >
2021-09-27 17:41:43 +00:00
Daniel Schürmann
4e7a777093
aco: try forming clauses even if reg_pressure exceeds
...
This patch allows to form clauses even if the register pressure
is at the limit with the effect that VMEM instructions are less
scattered after the first clause in a Block.
It respects the previous clause size to avoid excessive moving
of VMEM instructions.
VMEM_CLAUSE_MAX_GRAB_DIST is further reduced to compensate
some of the effects.
Totals from 28922 (19.26% of 150170) affected shaders: (GFX10.3)
VGPRs: 1546568 -> 1523072 (-1.52%); split: -1.52%, +0.00%
CodeSize: 117524892 -> 117510288 (-0.01%); split: -0.08%, +0.07%
MaxWaves: 605554 -> 611120 (+0.92%)
Instrs: 22292568 -> 22291927 (-0.00%); split: -0.10%, +0.09%
Latency: 488975399 -> 490230904 (+0.26%); split: -0.06%, +0.32%
InvThroughput: 117842300 -> 116521653 (-1.12%); split: -1.15%, +0.03%
VClause: 541550 -> 522464 (-3.52%); split: -9.73%, +6.20%
SClause: 718185 -> 718298 (+0.02%); split: -0.00%, +0.02%
Copies: 1420603 -> 1386949 (-2.37%); split: -2.64%, +0.27%
Branches: 559559 -> 559278 (-0.05%); split: -0.06%, +0.01%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10896 >
2021-09-27 14:29:16 +00:00
Daniel Schürmann
7e1faf9349
aco: make clause-forming depend on the number of moved instructions
...
This allows more aggressive clause-forming in presence of
larger def-use distances. To compensate for the effect,
VMEM_CLAUSE_MAX_GRAB_DIST was decreased.
Totals from 5788 (3.85% of 150170) affected shaders: (GFX10.3)
VGPRs: 483960 -> 475272 (-1.80%); split: -1.82%, +0.02%
CodeSize: 59661240 -> 59669084 (+0.01%); split: -0.01%, +0.02%
MaxWaves: 70408 -> 71450 (+1.48%); split: +1.51%, -0.03%
Instrs: 11222417 -> 11224479 (+0.02%); split: -0.01%, +0.03%
Latency: 349397104 -> 349298602 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 88584832 -> 87762262 (-0.93%); split: -0.93%, +0.00%
VClause: 168905 -> 177089 (+4.85%); split: -0.48%, +5.32%
SClause: 375795 -> 375767 (-0.01%); split: -0.01%, +0.01%
Copies: 840298 -> 840231 (-0.01%); split: -0.04%, +0.03%
Branches: 373265 -> 373278 (+0.00%); split: -0.00%, +0.00%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10896 >
2021-09-27 14:29:16 +00:00
Daniel Schürmann
903999c119
aco: stop scheduling if clause-forming fails
...
This avoids unintended reordering of VMEM instructions.
It is also highly unlikely that we find more independent
instructions before previous clause-related instructions.
Totals from 1921 (1.28% of 150170) affected shaders: (GFX10.3)
VGPRs: 103832 -> 103736 (-0.09%); split: -0.10%, +0.01%
CodeSize: 8695560 -> 8706000 (+0.12%); split: -0.03%, +0.15%
Instrs: 1643752 -> 1646349 (+0.16%); split: -0.04%, +0.20%
Latency: 26755527 -> 26614645 (-0.53%); split: -0.67%, +0.14%
InvThroughput: 7226604 -> 7204809 (-0.30%); split: -0.39%, +0.08%
VClause: 46536 -> 46201 (-0.72%); split: -0.81%, +0.09%
SClause: 47910 -> 47769 (-0.29%); split: -0.43%, +0.14%
Copies: 94647 -> 94558 (-0.09%); split: -0.26%, +0.17%
Branches: 36843 -> 36847 (+0.01%); split: -0.00%, +0.01%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10896 >
2021-09-27 14:29:16 +00:00
Adam Jackson
ecc6d78b05
glx: Don't strip off window/pixmap support from float fbconfigs
...
The X server doesn't get this wrong. It's not the client's job to
correct what the server says here. And if anyone ever implements HDR for
X11, you might in fact want to be able to use floats with a window.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002 >
2021-09-27 09:36:51 -04:00
Adam Jackson
71d8ac2bf8
glx: Clarify a debug message
...
In GLX a "tag" usually means a context tag, "fbconfig attribute" is a
bit more obvious.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002 >
2021-09-27 09:36:47 -04:00
Adam Jackson
aec9bf7319
glx: Move __glFreeAttributeState next to its one caller
...
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002 >
2021-09-27 09:36:44 -04:00
Adam Jackson
f33d61cecb
glx: Remove some unused declarations from glxclient.h
...
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13002 >
2021-09-27 09:36:13 -04:00
Daniel Schürmann
23452f9eb0
aco/ra: don't copy linear VGPRs within CF in get_reg_create_vector()
...
Fixes: 6ed18749de ('aco: allow live-range splits of linear vgprs in top-level blocks')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13058 >
2021-09-27 11:38:56 +00:00
Samuel Pitoiset
deede6b03d
radv: pass the pipeline key to the backend compilers
...
It exactly matches the shader keys now. Everything was copied from
the pipeline key to the shader keys.
There is still some work to completely remove radv_shader_variant_key.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032 >
2021-09-27 11:57:25 +02:00
Samuel Pitoiset
97c7cfe823
radv: rework layout of radv_pipeline_key
...
To match radv_shader_variant_key.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032 >
2021-09-27 11:57:22 +02:00
Samuel Pitoiset
124b003943
radv: store the CS subgroup size to radv_shader_info
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032 >
2021-09-27 11:57:20 +02:00
Samuel Pitoiset
c97147984b
radv: store the topology instead of the output primitive type in the key
...
To match the pipeline key.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13032 >
2021-09-27 11:57:17 +02:00
Tomeu Vizoso
112d526f77
panfrost/ci: Test panvk on Mali G52
...
Just run some selected tests for now because we miss a lot of
functionality, which would cause so many crashes that the runs
aren't practical.
Once the core functionality is implemented, we can switch to the master
case list with skips.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13016 >
2021-09-27 10:44:57 +02:00
Tomeu Vizoso
200f50f790
panfrost/ci: Move CI files to src/panfrost
...
In preparation for testing panvk.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13016 >
2021-09-27 10:44:49 +02:00
Boris Brezillon
4d9329ee90
panvk: Implement vkCmdBlitImage()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12961 >
2021-09-27 07:45:41 +00:00
Boris Brezillon
c49f221888
pan/blit: Fix 3D blittering
...
Fixes several problems in the pan_blit() logic:
1. We actually need the reciprocal of the depth scaling in z_scale (maybe
we should rename this field z_scale_rcp to make it clear)
2. When Z end < Z start we should remove one to the cur_layer/layer_offset
instead of doing it on the last_layer field, otherwise there's an
off-by-one error
3. The Z src offset should be adjusted to account for scaling. If we don't
do that we won't sample from the right layer when upscaling.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12961 >
2021-09-27 07:45:41 +00:00
Boris Brezillon
c7204ab7fc
pan/blit: Let the caller offset the start/end coords passed to the blitter
...
Since we have no guarantee that start < end, we can't really tell to
which one the offset applies to. Let the caller take care of that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12961 >
2021-09-27 07:45:41 +00:00
Andreas Baierl
187f786108
lima: Fix glFrontFace handling
...
Bit 12 of render->aux1 is GL_CCW/GL_CW. For GL_CCW (default of glFrontFace) we have
to set that bit active.
This is not what the blob does and what the original reverse engineering documentation
says. The blob sets this value inverted and does some bogus negation of the fragment
shaders gl_FrontFacing variable instead.
Anyway, doing it this way does not cause regressions but fixes
dEQP-GLES2.functional.shaders.builtin_variable.frontfacing and 4 piglit tests.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7690 >
2021-09-27 09:24:32 +02:00
Dave Airlie
03097f30fb
lavapipe: move to new shared features/properties
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953 >
2021-09-27 16:35:54 +10:00
Dave Airlie
08b54ebe98
lavapipe: enable vulkan 1.2 support.
...
The remaining extensions are optional features, just turn on vk 1.2
with them reporting as off.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953 >
2021-09-27 16:35:49 +10:00
Dave Airlie
6f6f7d2680
gallivm/nir: fix subgroup invocation read.
...
Again if you get passed an invoc but the exec mask has the
active lane somewhere other than at 0, then if we have an
invoc we should find the active lane and extract the value
from invoc rather than using the idx.
This fixes a bunch of VK 1.2 subgroup tests once 1.2 is enabled:
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_nonconst*
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953 >
2021-09-27 16:35:45 +10:00
Dave Airlie
c7907fe1a1
lavapipe: move to 1.2 features/properties structs.
...
This just adds all the wrappers in the right places hopefully
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953 >
2021-09-27 16:35:03 +10:00
Mike Blumenkrantz
a8e123cd1c
lavapipe: add support for KHR_shader_float_controls
...
These pass all the CTS tests, though not sure how useful they are.
[airlied: these may need some work in the future depending on app expectations]
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953 >
2021-09-27 16:34:34 +10:00
Mike Blumenkrantz
0e3fcc20d5
features: mark off bindless texture for zink
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Mike Blumenkrantz
6681ad6e17
zink: export PIPE_CAP_BINDLESS_TEXTURE
...
this is the 6th descriptor set being bound, so don't even advertise it
if 6 sets can't be bound
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Mike Blumenkrantz
bc202553e9
zink: implement bindless textures
...
this works by tracking 1024-member arrays of images and textures using idalloc
for indexing. each idalloc id is an index into the array that is returned as a handle,
and this handle is used to index into the array in shaders.
in the driver, VK_EXT_descriptor_indexing features are used to enable updates on the live
bindless descriptor set and leave unused members of the arrays unbound, which works as
long as no member is updated while it is in use. to avoid this, idalloc ids must cycle through
a batch once the image/texture handle is destroyed before being returned to the available pool
in shaders, bindless ops come in one of two types:
- i/o variables
- bindless instructions
for i/o, the image/texture variables have to be rewritten back to the integer
handles which represent them so that the successive shader stage utilizing them
can perform the indexing
for instructions, the src representing the image/texture has to be rewritten as a deref
into the bindless image/texture array
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Mike Blumenkrantz
04e9470bcf
zink: hook up VK_EXT_descriptor_indexing
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Mike Blumenkrantz
5d304e1ec9
zink: handle bindless images and samplers in ntv
...
these are going to come through as direct variable derefs, so it's simple
to handle the functionality by reusing the same codepath to generate image
types
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Mike Blumenkrantz
be25b70af2
zink: refactor some shader image code to make it reusable
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Mike Blumenkrantz
5c2df10f10
zink: don't add resource to pending barrier set if no barrier will be generated
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Mike Blumenkrantz
c0cd5cfc11
zink: split out bvci creation from object creation
...
make this reusable like the others
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:53 +00:00
Mike Blumenkrantz
4311842f83
zink: force lazy descriptor set rebinds if pipeline compatibility changes
...
if the pipeline layout changes, it's technically illegal to not rebind the descriptor
set even if it hasn't changed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12931 >
2021-09-26 21:23:42 -04:00
Mike Blumenkrantz
1cb8d11b6c
zink: remove duplicated struct member set
...
this should only happen in zink_descriptors_update_lazy_masked
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12931 >
2021-09-26 21:23:42 -04:00
Marek Olšák
a198c6b7dd
ac/surface: correct a comment about DCC image stores
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13013 >
2021-09-25 08:49:05 +00:00
Marek Olšák
0f6251b31f
ac/surface: use DCC compatible with image stores for < 4K resolutions
...
We don't have to use the special DCC settings for lower resolutions.
This will cause corruption if X and an windowed app use different Mesa
versions. The fix is to restart the X server. I expect to get false bug
reports due to this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13013 >
2021-09-25 08:49:05 +00:00
Marek Olšák
67bda8dc5f
radeonsi: remove the unused cs parameter from remaining packet functions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
0763bfdb95
radeonsi: remove the unused cs parameter from radeon_set_uconfig_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
f4ece6cf12
radeonsi: remove the unused cs parameter from radeon_set_sh_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
8b52fd28c3
radeonsi: remove the unused cs parameter from radeon_set_(config|context)_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
9f0cd15d6a
radeonsi: remove the unused cs parameter from radeon_emit_array
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
57bb89fdc5
radeonsi: remove the unused cs parameter from radeon_emit
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Mike Blumenkrantz
db99462de6
docs: mark off GL_EXT_multisampled_render_to_texture for zink
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
fbff2b6c65
zink: implement GL_EXT_multisampled_render_to_texture
...
this requires allocating and using a lazily-allocated msaa surface as a transient
attachment for the base render operation, resolving it
...except vulkan has no "replicate" renderpass attachment mechanism, so for now we're
just gonna allocate a transient surface and hang on to it. sorry tilers!
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
43fb9f4f47
zink: stop setting nr_samples for shader image surface creation
...
that's not what this should be used for
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
44da321982
zink: move fb attachment init to new function
...
this is going to get more complicated
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
a4dcacf18f
zink: remove fbfetch layout thingy from zs renderpass init
...
zs doesn't do fbfetch
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
6873af8de1
zink: reorder draw state updates
...
starting a renderpass can trigger recursion and other draws, so do all
state updates/binds after the renderpass has begun
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
c32bcb9a8c
zink: improve handling of buffer rebinds using tc info
...
tc rebind info can't distinguish between buffers bound multiple times
in a given bind point (e.g., for multiple vertex buffers), so ensure all
rebinds are processed and the global rebind isn't triggered if multiple rebinds
are processed for a given buffer
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
9dbf1ba21d
zink: add ZINK_BIND_TRANSIENT
...
this is used to create lazily allocated images for use as transient
renderpass attachments
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
de3931cda7
zink: add ZINK_HEAP_DEVICE_LOCAL_LAZY
...
this is for lazily allocated resources
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
584d705dd7
zink: repack zink_render_pass_state
...
saves a couple wasted bits
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Lionel Landwerlin
9d9e67d118
spirv: don't fail on CapabilitySubgroupDispatch if supported
...
Since only Anv uses the value, I'm only enabling this on anv.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 518693c3ec ("spirv: Handle the SubgroupSize execution mode")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13034 >
2021-09-24 20:23:14 +00:00
Mike Blumenkrantz
1d676fdee9
zink: split vk debug logging into separate functions
...
being able to breakpoint these easily is crucial to debugging, and it sucks to
always have to go back and check the line numbers, so now there's easily-rememberable
functions for it
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13042 >
2021-09-24 20:10:00 +00:00
Hoe Hao Cheng
3ee35b769a
zink/codegen: do not enable extensions based on vulkan version
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13004 >
2021-09-24 19:53:25 +00:00
Emma Anholt
0e997d42a2
turnip: Swizzle in 0, 1 for D24S8 STENCIL_ASPECT sampling.
...
This seems to be what is expected by the CTS, but I haven't found a
citation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13009 >
2021-09-24 19:26:57 +00:00
Mike Blumenkrantz
464f0ed74b
zink: enable timeline ext features
...
this is required by spec even though nobody cares
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13033 >
2021-09-24 19:12:50 +00:00
Rhys Perry
e43007af56
nir/opt_if: add opt_if_rewrite_uniform_uses
...
Turns:
if (a == (b=readfirstlane(a)))
use(a)
into:
if (a == (b=readfirstlane(a)))
use(b)
Improves divergence analysis and lets us scalarize use(a). Improves
Cyberpunk 2077 performance.
fossil-db (Sienna Cichlid, Cyberpunk 2077):
Totals from 57 (10.56% of 540) affected shaders:
VGPRs: 4904 -> 4040 (-17.62%)
CodeSize: 624360 -> 626828 (+0.40%); split: -0.06%, +0.46%
MaxWaves: 656 -> 824 (+25.61%)
Instrs: 119770 -> 119447 (-0.27%); split: -0.49%, +0.22%
Latency: 1950256 -> 1633110 (-16.26%); split: -16.26%, +0.00%
InvThroughput: 364852 -> 292089 (-19.94%)
VClause: 1512 -> 1008 (-33.33%)
SClause: 2693 -> 3196 (+18.68%)
Copies: 10050 -> 9955 (-0.95%); split: -3.34%, +2.40%
Branches: 3476 -> 3547 (+2.04%)
PreSGPRs: 4003 -> 5076 (+26.80%)
PreVGPRs: 4709 -> 3810 (-19.09%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12472 >
2021-09-24 18:41:18 +00:00
Rhys Perry
69f9a96af1
nir: add nir_src_components_read()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12472 >
2021-09-24 18:41:18 +00:00
Timur Kristóf
df653977bd
radv: Reduce NGG culling small draw threshold to 128.
...
Many modern games use draw calls with only a few vertices.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12859 >
2021-09-24 18:20:29 +00:00
Timur Kristóf
7ae5a93b7f
radv: Select PC oversubscription rate based on number of PS params.
...
Decide the oversubscription rate similarly to how RadeonSI does it:
Oversubscribe a smaller amount of PC (parameter cache) when there are
fewer params.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12859 >
2021-09-24 18:20:29 +00:00
Emma Anholt
61b7ca2a1f
turnip: Set the VK_DRIVER_ID to our new enum.
...
This hasn't been exposed yet, but would be with vulkan 1.2 or
VK_KHR_driver_properties
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13007 >
2021-09-24 17:55:10 +00:00
Emma Anholt
cc6954ec0b
vulkan: Update the XML and headers to 1.2.193
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13007 >
2021-09-24 17:55:10 +00:00
Timur Kristóf
09f89d15e4
ac/nir/nggc: Don't reuse uniform values from divergent control flow.
...
With NGG culling, the shaders are split into two parts:
the top part that computes just the position output,
and the bottom part which produces the other outputs.
To reduce redundancy between the two, I added some code
to reuse uniform variables between them. However, there is
an edge case I didn't think about: because of vertex repacking,
it is possible for the bottom part to process a different vertex.
Therefore it can take a different divergent code path
(though it must still take the same uniform code path).
Due to this, when a uniform value comes from divergent control
flow, this may be undefined in the bottom part.
This commit stops reusing uniform variables from
divergent control flow, to fix issues that arise from this.
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 1723 (1.34% of 128647) affected shaders:
VGPRs: 89312 -> 89184 (-0.14%); split: -0.15%, +0.01%
SpillSGPRs: 4575 -> 120 (-97.38%)
CodeSize: 10846424 -> 10873836 (+0.25%); split: -0.68%, +0.93%
MaxWaves: 34582 -> 34602 (+0.06%); split: +0.06%, -0.01%
Instrs: 2124471 -> 2128835 (+0.21%); split: -0.51%, +0.72%
Latency: 7274569 -> 7293899 (+0.27%); split: -0.22%, +0.48%
InvThroughput: 1637130 -> 1635490 (-0.10%); split: -0.17%, +0.07%
VClause: 25141 -> 25414 (+1.09%); split: -0.02%, +1.10%
SClause: 56367 -> 59503 (+5.56%); split: -1.36%, +6.93%
Copies: 230704 -> 219313 (-4.94%); split: -5.49%, +0.55%
Branches: 72781 -> 72681 (-0.14%); split: -0.21%, +0.07%
PreSGPRs: 118766 -> 100176 (-15.65%); split: -15.70%, +0.05%
PreVGPRs: 76876 -> 76833 (-0.06%)
Fixes: 0bb543bb60
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13001 >
2021-09-24 17:32:53 +00:00
Timur Kristóf
cb19ebe7ba
ac/nir/nggc: Refactor save_reusable_variables.
...
This makes the code more elegant and also fixes the mistake of
skipping the blocks that come before loops.
Fossil DB changes on Sienna Cichlid with NGGC on:
Totals from 1026 (0.80% of 128647) affected shaders:
SpillSGPRs: 3817 -> 4035 (+5.71%)
CodeSize: 5582856 -> 5538732 (-0.79%); split: -0.89%, +0.10%
Instrs: 1106907 -> 1100180 (-0.61%); split: -0.68%, +0.07%
Latency: 10084948 -> 10052197 (-0.32%); split: -0.37%, +0.05%
InvThroughput: 1567012 -> 1564949 (-0.13%); split: -0.16%, +0.03%
SClause: 39789 -> 39075 (-1.79%); split: -2.33%, +0.54%
Copies: 95184 -> 96456 (+1.34%); split: -0.19%, +1.53%
Branches: 44087 -> 44093 (+0.01%); split: -0.01%, +0.02%
PreSGPRs: 47584 -> 51009 (+7.20%); split: -0.61%, +7.80%
Fixes: 0bb543bb60
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13001 >
2021-09-24 17:32:53 +00:00
Samuel Pitoiset
70842e2206
radv/llvm: stop using vs_common_out.export_prim_id
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13028 >
2021-09-24 16:27:23 +00:00
Samuel Pitoiset
3cd482920a
radv,aco: stop using vs_common_out.export_clip_dists
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13028 >
2021-09-24 16:27:23 +00:00
Samuel Pitoiset
fa833f9ee5
radv: add export_clip_dists for VS and TES to radv_shader_info
...
To be able to remove radv_vs_out_key entirely.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13028 >
2021-09-24 16:27:23 +00:00
Timur Kristóf
b653164973
radv: Fix gs_vgpr_comp_cnt for NGG culling in vertex shaders.
...
Previously these shaders always took the path to gs_vgpr_comp_cnt=3,
but now they are 0 when they don't use primitive id.
Fixes: 7ad69e2f7e
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13031 >
2021-09-24 16:05:44 +00:00
Caio Marcelo de Oliveira Filho
240e60ba76
nir/lower_io_to_vector: Allow Task/Mesh to load from outputs
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12951 >
2021-09-24 14:35:15 +00:00
Samuel Pitoiset
069f2e27f0
radv/llvm: stop using vs_common_out.as_ngg_passthrough
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13025 >
2021-09-24 14:13:51 +00:00
Samuel Pitoiset
4c0bced1fb
radv: remove useless as_ngg_passthrough init when lowering NGG in NIR
...
Nothing reads the value after that, except LLVM but we don't lower it
in NIR (yet).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13025 >
2021-09-24 14:13:51 +00:00
Lionel Landwerlin
1c92d355c6
clc: use the defined version for the parser
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13018 >
2021-09-24 12:33:19 +00:00
Lionel Landwerlin
dce8870f64
microsoft/clc: small compile fix on Linux
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13018 >
2021-09-24 12:33:19 +00:00
Samuel Pitoiset
8d03e5a863
radv: stop using the shader keys for as_ls/as_es/as_ngg when possible
...
radv_shader_info should be initialized correctly at this point.
There is still few occurences earlier in the pipeline but they aren't
easy to remove right now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13023 >
2021-09-24 11:59:34 +00:00
Alyssa Rosenzweig
f100551bee
panfrost: Fix incorrect test condition
...
Oh, the irony. I linked to this file in a software design class as an
example of how unit testing works under the hood, since it's not using
any particular testing framework. In doing so I realized the test is
totally broken. It doesn't matter -- the tests passed before, pass now,
and the code being tested is correct. But let's still fix the
embarassing logic error for future Panfrost hackers.
Fixes: d42e53c77a ("panfrost: Unit test clear colour packing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13006 >
2021-09-24 11:46:29 +00:00
Rhys Perry
8cf37fc8a8
aco/tests: add idep_amdgfxregs_h
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: 9bf30c4a5c ("aco/tests: add tests for form_hard_clauses()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12017 >
2021-09-24 11:53:23 +01:00
Samuel Pitoiset
525dd54717
radv: remove unused radv_tcs_variant_key:primitive_mode
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13022 >
2021-09-24 11:36:01 +02:00
Alejandro Piñeiro
9e41c42ed4
broadcom/compiler: remove qpu_acc helper
...
It is really small, and used just twice, so we just call qpu_magic.
We also update how it is used:
* QFILE_NULL is an undef so we can just load anything. Previously we
were using accumulator 0, but there isn't any real reason to use
an accumulator for this. Using reg 0.
* QFILE_LOAD_IMM: it seems that we don't use at all right now, so
let's add an assert
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008 >
2021-09-24 08:46:06 +00:00
Alejandro Piñeiro
193898c8b0
broadcom/compiler: remove commented out vir_LOAD_IMM methods
...
It has been commented several years now. Let's remove it to reduce the
noise.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008 >
2021-09-24 08:46:06 +00:00
Samuel Pitoiset
7ad69e2f7e
radv: stop loading invocation ID for NGG vertex shaders
...
This is unnecessary and was copied from RadeonSI which needs it for
edge flags. RADV should never to read the invocation ID for VS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12997 >
2021-09-24 08:26:08 +00:00
Georg Lehmann
babc0b0748
radv: Remove dead min waves code.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13005 >
2021-09-24 07:03:22 +00:00
Dave Airlie
52acefc011
lavapipe/ci: drop some fails I fixed recently
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13011 >
2021-09-24 13:04:59 +10:00
Yevhenii Kolesnikov
dc354b8fda
anv: Switch to new debug message helpers
...
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318 >
2021-09-23 21:14:32 +00:00
Yevhenii Kolesnikov
d55d1fcda2
vulkan: Add convenience debug message helpers
...
Forwards the message to both VK_EXT_debug_utils and
VK_EXT_debug_report provided callbacks.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318 >
2021-09-23 21:14:32 +00:00
Yevhenii Kolesnikov
2db5536a46
vulkan: Add vk_asprintf and vk_vasprintf helpers
...
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318 >
2021-09-23 21:14:32 +00:00
Yevhenii Kolesnikov
98d22acca2
vulkan/enum_to_str: Add generator for VkObjectType to Vulkan Handle
...
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318 >
2021-09-23 21:14:32 +00:00
Yevhenii Kolesnikov
3b361b234a
vulkan: Implement VK_EXT_debug_utils
...
This implements all the necessary features of VK_EXT_debug_utils in
common code.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318 >
2021-09-23 21:14:32 +00:00
Dave Airlie
879defa3be
gallium/format: move two vertex formats into the proper place.
...
These two can be vertex formats with vulkan so lavapipe can
expose them.
Fixes
dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_vertex
Fixes: e002f5a086 ("gallium: change pipe_vertex_element::src_format to uint8_t")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12987 >
2021-09-24 06:44:37 +10:00
Emma Anholt
ec2007d47e
radv: Use the shared now-in-core feature/prop extension helper functions.
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967 >
2021-09-23 16:19:47 +00:00
Emma Anholt
263072ddaa
anv: Use the shared now-in-core feature/prop extension helper functions.
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967 >
2021-09-23 16:19:47 +00:00
Emma Anholt
2fb68f74c4
turnip: Use the shared now-in-core feature/prop extension helper functions.
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967 >
2021-09-23 16:19:47 +00:00
Emma Anholt
8a54903a48
vulkan: Support PHYSICAL_DEVICE_1_n_ features/properties in the helpers.
...
Since we have a filled out struct available, just memcpy it over so the
driver doesn't have to fill it out again.
Suggested by Jason, this is code that isn't copy-and-paste from anv.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967 >
2021-09-23 16:19:47 +00:00
Emma Anholt
19ff5019b7
vulkan: Add helpers for filling exts for core features and properties.
...
This is boilerplate that drivers have to replicate, so make a nice helper.
The feature/property macro lists are are copy and pasted from anv, though
the helper functions has been split between 1.1 and 1.2 (and thus the macros
refactored).
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967 >
2021-09-23 16:19:47 +00:00
Yevhenii Kolesnikov
9d40877f72
lavapipe: Use a common vk_queue structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
c9dbd3c06e
v3dv: Use a common vk_queue structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
37d32dcce3
turnip: Use a common vk_queue structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
e2b59e3408
radv: Use a common vk_queue structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
1b085ff03a
anv: Use a common vk_queue structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
cff01303b5
vulkan: Add a common vk_queue structure
...
This can be used e.g. for storing debug labels for the common
implementation of VK_EXT_debug_utils.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
8bf94337eb
lavapipe: Use a common vk_command_buffer structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
14f0e3c2d3
v3dv: Use a common vk_command_buffer structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
1d2a4abf01
turnip: Use a common vk_command_buffer structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
c05434cd6d
radv: Use a common vk_command_buffer structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
c9189f4813
anv: Use a common vk_command_buffer structure
...
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:46 +00:00
Yevhenii Kolesnikov
ef9c371f60
vulkan: Add a common vk_command_buffer structure
...
This can be used e.g. for storing debug labels for the common
implementation of VK_EXT_debug_utils.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000 >
2021-09-23 15:57:45 +00:00
Timur Kristóf
611d583e64
radv/llvm: Don't read edge flags anymore.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12998 >
2021-09-23 16:58:15 +02:00
Timur Kristóf
a7f2faea46
ac/nir: Emit edge flag instructions conditionally.
...
They are not needed by RADV but will be needed by RadeonSI.
Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 56917 (44.24% of 128647) affected shaders:
VGPRs: 1982664 -> 1975936 (-0.34%); split: -0.43%, +0.09%
CodeSize: 152790880 -> 149510316 (-2.15%); split: -2.15%, +0.00%
MaxWaves: 1617984 -> 1621900 (+0.24%)
Instrs: 29272825 -> 28907038 (-1.25%); split: -1.26%, +0.01%
Latency: 128744182 -> 127565678 (-0.92%); split: -1.14%, +0.22%
InvThroughput: 20125915 -> 19805168 (-1.59%); split: -1.63%, +0.03%
VClause: 521312 -> 519804 (-0.29%); split: -0.77%, +0.48%
SClause: 688861 -> 688897 (+0.01%); split: -0.04%, +0.05%
Copies: 3205421 -> 3177799 (-0.86%); split: -1.68%, +0.82%
Branches: 1181457 -> 1183147 (+0.14%); split: -0.03%, +0.17%
PreVGPRs: 1626681 -> 1595406 (-1.92%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12998 >
2021-09-23 16:57:56 +02:00
Timur Kristóf
cb05c85abd
radv: Disable HW generated edge flags for NGG shaders.
...
Vulkan doesn't support user edge flags, and also doesn't have
any decomposed primitives where drawing internal edges should
be disallowed. Hence, we don't need this.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12998 >
2021-09-23 15:52:26 +02:00
Jesse Natalie
7aa060ec38
microsoft/clc: Add a test for specializing via SPIRV-Tools
...
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
068c6b5a37
microsoft/clc: Add API to independently specialize SPIR-V
...
We need the ability to specialize unlinked SPIR-V, so use SPIR-V tools
to specialize prior to linking.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
c50bbf1f28
microsoft/clc: Support passing specialization consts to spirv_to_nir
...
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
a699844ffb
microsoft/clc: Parse SPIR-V specialization consts into metadata
...
We need to be able to validate at the API that set specialization consts
have a valid ID and the value is the correct size.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
c4755a7c32
microsoft/clc: Support SPIR intermediates in the compilation APIs
...
We can now export SPIR (mainly just for testing) or import SPIR and
convert to SPIR-V.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
91e08312d8
microsoft/clc: Split clc_object and rename entrypoints
...
clc_object was overloaded, containing SPIR-V binary and metadata,
and it would only sometimes contain metadata (after linking). Split
it into a more generic clc_binary class which holds some type of data
(the kind depends on where it came from), and clc_metadata which can
be independently parsed on compiled or linked data.
Rename a couple entrypoints to be more explicit about what they're
actually transforming (c_to_spirv, link_spirv, spirv_to_dxil).
Add a logger to SPIR-V binary parsing so it can report errors on app-
provided SPIR-V.
Re-order helper function parameters to be more consistent (out params last).
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
c3666eec7e
microsoft/clc: Stop heap-allocating tiny fixed-size transparent structs
...
The caller can allocate these however they want. They don't need
independent allocations. Removes some unnecessary failure handling.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
27467700e9
microsoft/clc: Clean up clc_context
...
1. Rename it to libclc to match what it is
2. Make it opaque externally
3. Remove it from non-essential entrypoints (compile/link)
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Jesse Natalie
24b096035f
microsoft/clc: Rename compiler DLL to clon12compiler
...
I no longer think there's value in trying to share code on disk here between
CL and GL at runtime, especially since we're now just building GL without LLVM
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322 >
2021-09-23 13:06:41 +00:00
Mike Blumenkrantz
876cb75599
zink: check for pending memory barrier before trying to flush it
...
this function is surprisingly heavy to call unnecessarily
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12932 >
2021-09-23 12:12:42 +00:00
Mike Blumenkrantz
dcdb000a7c
zink: clean up texture_barrier hook a little
...
this looked dumb
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12932 >
2021-09-23 12:12:42 +00:00
Tapani Pälli
205b684725
mesa: GL_ARB_ES3_2_compatibility GL compat profile support
...
Patch removes 'desktop=false' from aliased function, otherwise
glPrimitiveBoundingBox[ARB] cannot be retrieved via GetProcAddress.
This was seen with new OpenGL 4.5 tests that utilize
GL_ARB_ES3_2_compatibility and bounding box API.
v2: fixes to display list support (Ilia Mirkin)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12846 >
2021-09-23 11:10:23 +00:00
Joshua Ashton
8564a4c584
radv: Push box traversal results onto stack in correct order
...
Currently, it's pushing from lowest distance to highest distance, so when these are popped off the stack, we start at the highest distance to lowest.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12960 >
2021-09-23 09:08:52 +00:00
Kenneth Graunke
641a12aa29
intel: Finish off the last scraps of bacon
...
The bacon is long past its expiration date and has got to go.
Composting it in the flower-beds was probably inadvisable.
So we shall throw it away.
(Originally, I imported libdrm_intel into i965, but to avoid symbol
conflicts, renamed drm_intel_* to drm_bacon_* as it was the same number
of letters and we needed an arbitrary name. After slicing-and-dicing
away most of the fat, er, code, we renamed it to brw_bufmgr...except
for apparently this comment, which then got replicated to both iris
and crocus. Originally it served to indicate what file contained these
functions, but bufmgr.h having prototypes for bufmgr.c is obvious, so
just delete the silly comment. No bacon for you!)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12985 >
2021-09-23 08:04:59 +00:00
Dave Airlie
b7bfba5983
lavapipe: don't access pColorBlendState when not legal
...
This state isn't valid unless some conditions are met.
Fixes VK-GL-CTS
dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics
Fixes: 578190c0fe ("lavapipe: implement VK_EXT_color_write_enable")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12984 >
2021-09-23 07:50:21 +00:00
Dave Airlie
6413b2b6a2
lavapipe: fix vertex attributes/descriptor binding
...
Yo' dawg, I heard you like bindings in your bindings.
When you have VertexAttribs with a binding, it's not an index into
the VertexBindings, you have to match it to the VertexBinding
with the same binding value.
This fixes
dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.vertex_input_multiple_bindings
and some others.
Fixes: 5951d2abac ("lavapipe: implement EXT_vertex_input_dynamic_state")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12983 >
2021-09-23 07:10:02 +00:00
Samuel Pitoiset
cd64535aff
radv: remove useless shader variant key copies for VS+TCS
...
It's unnecessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12976 >
2021-09-23 06:50:40 +00:00
Danylo Piliaiev
978a5ec5d2
turnip: Move to common DEFINE_HANDLE_CASTS casting macro
...
We create some VK objects internally, so we have to set type
for them.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12957 >
2021-09-22 20:37:50 +00:00
Lepton Wu
1a33dca3ae
virgl: Add an option to disable coherent
...
This breaks almost every android apps when running with crosvm+minigbm.
Add an option so we can disable it.
Signed-off-by: Lepton Wu <lepton@chromium.org >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12968 >
2021-09-22 20:17:51 +00:00
Yiwei Zhang
c1e2dfb365
venus: amend supported extensions list
...
Below were missed in the last update:
VK_KHR_incremental_present
VK_KHR_swapchain_mutable_format
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12980 >
2021-09-22 19:34:48 +00:00
Mike Blumenkrantz
363ffdaf79
zink: don't use legacy scanout with modifiers
...
legacy_scanout is for adding implicit modifiers when modifiers aren't provided,
so it can't be used with explicit modifiers
also jekstrand said no.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12930 >
2021-09-22 19:20:07 +00:00
Emma Anholt
30a9bbe8f6
ci/vc4,i915g: Add links to VK-GL-CTS issues for some of our xfails.
...
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12962 >
2021-09-22 10:54:50 -07:00
Emma Anholt
e470d9fae5
mesa: Fix missing CopyTexImage formats for OES_required_internalformat.
...
All our GLES2-only divers were failing these KHR tests because we were
missing new OES_required_internalformat internalformats for CopyTexImage.
Cc: mesa-stable
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12962 >
2021-09-22 10:54:40 -07:00
Yiwei Zhang
705b62d559
docs: update vn extension list
...
VK_KHR_external_fence_fd
VK_KHR_external_memory_fd
VK_KHR_external_semaphore_fd
VK_KHR_swapchain
VK_EXT_external_memory_dma_buf
VK_EXT_image_drm_format_modifier
VK_EXT_queue_family_foreign
VK_ANDROID_external_memory_android_hardware_buffer
VK_ANDROID_native_buffer
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12969 >
2021-09-22 17:18:38 +00:00
Mike Blumenkrantz
400da4900e
zink: fix ci skips
...
these are run from a lot of test groups, so block all of them
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12977 >
2021-09-22 09:59:29 -04:00
Icecream95
0c2f7a16bf
pan/mdg: Remove use of global variables in disassembler
...
Fixes incorrect disassembly and crashes when disassembling from
multiple threads at once.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12975 >
2021-09-22 12:01:43 +00:00
Boris Brezillon
d47a8789f9
pan/decode: Fix DCD size in Pre frame decoding
...
DCD size on Bifrost is supposed to be 32 words wide, but this change
will only happen after the per-gen XML split. We have to manually append
the DRAW_PADDING for now.
Fixes: de13fdc251 ("panfrost: Prepare pandecode to per-gen XML")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12970 >
2021-09-22 11:43:10 +00:00
Jordan Justen
d4174f5f05
iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13
...
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12908
Cc: mesa-stable
Fixes: e435511b58 ("intel/dev: Add device info for ADL GT2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12973 >
2021-09-22 02:32:05 -07:00
Jordan Justen
c746bf4c5c
intel/dev: Add display_ver and set adl-p to 13
...
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12908
Cc: mesa-stable
Fixes: e435511b58 ("intel/dev: Add device info for ADL GT2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12973 >
2021-09-22 02:32:05 -07:00
Mike Blumenkrantz
039ed2de94
zink: always use type size for query result copy stride
...
0 should be legal here since this is only copying 1 result at a time,
but some drivers can't withstand the awesome power of zero strides, so
just be safe and pass the type size
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12933 >
2021-09-21 23:34:49 +00:00
Emma Anholt
13384b9626
mesa: Prioritize checking for GLES2's uniform transpose error.
...
The negative API tests ask to transpose a non-matrix uniform, and expect
the transpose error rather than the non-matrix error. This may be a test
bug about ambiguous results, but since every other driver is presumably
doing this too, just follow along.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12924 >
2021-09-21 23:06:42 +00:00
Emma Anholt
5a39938b00
mesa: Throw an error for compressed glGenerateMipmap on GLES2 contexts.
...
This error is gone from GLES3.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12924 >
2021-09-21 23:06:42 +00:00
Emma Anholt
8a3e94c619
turnip: Move physical device 1.2 properties to a helper function.
...
Again, while we don't do 1.2 yet (and we have some properties to fill out
to do so), this prevents value duplication when we do.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944 >
2021-09-21 22:43:43 +00:00
Emma Anholt
c0c5c0d557
tu: Support VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES.
...
We had missed this struct previously, causing a CTS fail.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944 >
2021-09-21 22:43:43 +00:00
Emma Anholt
fa5cc38f5b
tu: Move VK 1.1 core properties to a helper function and use macros for exts.
...
This struct is exposed in VK 1.2, and using the macros means we don't have
to duplicate the values.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944 >
2021-09-21 22:43:43 +00:00
Eric Anholt
24a539e94c
tu: Add GetPhysicalDeviceFeatures2() support for more VK 1.2 core features.
...
You can get them from the big blob of features, or through
extension-specific structs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944 >
2021-09-21 22:43:43 +00:00
Eric Anholt
ab5e77d854
tu: Deduplicate extension/core feature flags.
...
Copied this pattern from the anv driver. Now it's harder to desynchronize
your features.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944 >
2021-09-21 22:43:43 +00:00
Eric Anholt
14eb5ca3cd
tu: Move core features definitions to a helper function.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944 >
2021-09-21 22:43:43 +00:00
Caio Marcelo de Oliveira Filho
895cfca641
spirv: Identify non-temporal memory access
...
Map it to the existing ACCESS_STREAM_CACHE_POLICY access mode.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12945 >
2021-09-21 21:55:54 +00:00
Caio Marcelo de Oliveira Filho
47f7b262e1
anv: Refactor subgroup_size_type rules into a single function
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12946 >
2021-09-21 21:35:20 +00:00
Caio Marcelo de Oliveira Filho
9add809e7f
anv: Simplify subgroup_size_type rules for compute shaders
...
The populate_base_prog_key will set VARYING depending if the pipeline
flag is used. Later, when full subgroups flag is set, it will flip to
UNIFORM -- which for compute shaders is effectively the same, so don't
bother setting it again.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12946 >
2021-09-21 21:35:20 +00:00
Christian Gmeiner
ca0f892191
compiler/isaspec: add alignment support
...
This helps to get a really nice and aligend disasm output.
Just use :align=X to define where in the line the field
should be printed.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
eae96d0c4c
compiler/isaspec: keep track of written data
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
f0104a6c72
compiler/isaspec: add print(..) helper
...
To support field alignment we need to keep track of how much
data we have printed to our out FILE. This is a prep commit.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
bc2e806b0f
freedreno/isa: move isaspec to a new home
...
This commit moves isaspec out of freedreno into a more
generic new home - src/compiler/isaspec.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
6801c300a8
freedreno/isa: add shbang and make executable
...
In a later change we will use mesons find_program(..) and this
only works if python files are executable and have a shbang.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
b63becc430
freedreno/isa: update documentation
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
dbb9d3d0e3
freedreno/isa: encode: switch bitmask_t to BITSET_WORD's
...
This commit changes the underlying basetype of bitmask_t to a
BITSET_WORD based one.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
9dc2ef7200
freedreno/isa: decode: switch bitmask_t to BITSET_WORD's
...
This commit changes the underlying basetype of bitmask_t to a
BITSET_WORD based one.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
430dc08755
freedreno/isa: add split_bits(..) methods
...
Will be used to split a value into needed number of 32 bit words.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
1a8048954d
freedreno/isa: generate marcos used for printf(..)
...
Generate correct BITSET_FORMAT and BITSET_VALUE macros based
on the maximum needed ISA bits.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
a6b82d1c8c
freedreno/isa: add store_instruction(..)
...
Makes it possible to store an encoded instruction in a
generic ISA specific way.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
a5bbd08775
freedreno/isa: add BITMASK_WORDS define
...
This new define will be used by a more generic deocde(..)
and encode(..) functions.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
ea42a3bee5
freedreno/isa: add bitmask to/from uint64_t helper
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
35877cd7b8
freedreno/isa: add bitmask_t to encode.py
...
Prep work for the next change.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
3c634e956b
freedreno/isa: generate isaspec-decode.h
...
Generate a 'glue' header file to be able to support different
ISAs.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
59e6258e4f
freedreno/isa: generate ir3-isa.h
...
This header contains the bitmask_t struct typedef that will be
used by the isaspec.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
3d6a3b3c7c
freedreno/isa: store max size for needed bitset
...
We will use this information later to create a correctly
sized BITSET.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
d29a6e2db5
freedreno/isa: add defines for fprintf(..) usage
...
In the long run they will be replaces with some generated
defines. If we do this early it keeps the diffs of the next
changes small.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
6c3befdd70
freedreno/isa: add next_instruction(..)
...
In during the next commits we will change to a generated
version of next_instruction(..) based on the actual isa.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
c3b14ade55
freedreno/isa: simplify custom_target
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
3b52d64474
freedreno/isa: add leading zero's
...
Changes the output format slightly but its needed when we
want to switch to more generic version of isaspec.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
54ea23da51
util/tests: add set bit range test
...
This simple test validates that it is possible to set bits
across word bounary.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
b3b03e33c9
util/bitset: add BITSET_SET_RANGE(..)
...
This version works across word boundary.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
3d65cea6ee
util/bitset: s/BITSET_SET_RANGE/BITSET_SET_RANGE_INSIDE_WORD
...
Prep work for the next commit.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
3d3a4b9b01
util/tests: add bitset SHL tests
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
6171bc2243
util/bitset: add left shift
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
0c243b3f98
util/tests: add bitset SHR tests
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
7b62fb4558
util/bitset: add right shift
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
79067c4744
util/tests: add bitwise AND, OR and NOT tests
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
cfa8828c62
util/bitset: add bitwise AND, OR and NOT
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Christian Gmeiner
f8ea9fa0f8
util/tests: rename bitset test names
...
Imho they are quite hard to read with the added '_'.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321 >
2021-09-21 20:25:31 +00:00
Alyssa Rosenzweig
e39929663b
docs/panfrost: Add web chat link
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Suggested-by: Git Lab <gh6h56j85ihg@protonmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12380 >
2021-09-21 19:06:22 +00:00
Alyssa Rosenzweig
5506b38032
docs/panfrost: We're conformant now!
...
See https://www.khronos.org/conformance/adopters/conformant-products/opengles#submission_949
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12965 >
2021-09-21 19:01:45 +00:00
Jason Ekstrand
35ac184de0
intel/fs: Handle required subgroup sizes specified in the SPIR-V
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12959 >
2021-09-21 18:34:59 +00:00
Jason Ekstrand
518693c3ec
spirv: Handle the SubgroupSize execution mode
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12959 >
2021-09-21 18:34:59 +00:00
Charmaine Lee
e5dc900226
svga: fix render target views leak
...
Use create_backed_surface_view helper function to create/reuse
alternate surface view when the to-be-bound surface view was created
in a different context. This fixes render target views leak running gazebo.
Cc: mesa-stable
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12952 >
2021-09-21 18:02:17 +00:00
Dylan Baker
c1d479b9ad
docs: update calendar and link releases notes for 21.2.2
...
I've also adjusted the calender to account for missed releases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12963 >
2021-09-21 17:57:08 +00:00
Dylan Baker
773f2fbf6b
docs/relnotes/21.2.2: Add SHA256 sum
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12963 >
2021-09-21 17:57:08 +00:00
Dylan Baker
0689f57dd9
docs: add release notes for 21.2.2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12963 >
2021-09-21 17:57:08 +00:00
Emma Anholt
590ac4789d
freedreno/a5xx+: Set the IJ_LINEAR_* request bits if we need the regs.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12949 >
2021-09-21 17:11:42 +00:00
Emma Anholt
3f99916433
freedreno/a5xx+: Rename GRAS_CNTL/RB_RENDER_CONTROL0 IJ_LINEAR_* bits.
...
This is what they actually enable.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12949 >
2021-09-21 17:11:42 +00:00
Boris Brezillon
d3511e8af2
panvk: Implement vkCmdUpdateBuffer()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:42 +02:00
Boris Brezillon
a560890284
panvk: Implement vkCmdFillBuffer()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:32 +02:00
Boris Brezillon
b37eb5854c
panvk: Implement vkCmdCopyBuffer()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:27 +02:00
Boris Brezillon
f73ae1a6b5
panvk: Implement vkCmdCopyImageToBuffer()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:23 +02:00
Boris Brezillon
4ce85cd25a
panvk: Implement vkCmdCopyBufferToImage()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:19 +02:00
Boris Brezillon
5b9cbd39ec
panvk: Implement vkCmdCopyImage()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:15 +02:00
Boris Brezillon
a0cbe50566
panvk: Implement vkCmdClear{DepthStencil,Color}Image()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:10 +02:00
Boris Brezillon
5d4c405257
panvk: Issue a fragment job if at least one target is cleared
...
This way clear meta helpers don't have to allocate fragment job
themselves.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:04 +02:00
Boris Brezillon
2cdcaf08a1
panvk: Stop dereferencing the subpass in panvk_cmd_close_batch()
...
So we can call this function from the meta helpers which won't bind
a subpass to the cmd state.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:01:00 +02:00
Boris Brezillon
b882c3b677
panvk: Add a panvk_cmd_prepare_tiler_context() helper
...
So we can create tiler contexts from meta helpers.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:55 +02:00
Boris Brezillon
285197df28
panvk: Make panvk_cmd_alloc_tls_desc() more generic
...
panvk_cmd_alloc_tls_desc() will soon be called from meta helpers which
don't bind a pipeline to the cmdbuf state. Let's pass the gfx/compute
info directly.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:50 +02:00
Boris Brezillon
e7af84899e
panvk: Don't check the bind_point in panvk_cmd_prepare_fragment_job()
...
We are about to call panvk_cmd_close_batch() from meta helpers, and
those don't bind a pipeline, so let's drop the check in
panvk_cmd_prepare_fragment_job().
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:46 +02:00
Boris Brezillon
821eb2a73b
panvk: Don't use the subpass to calculate the FB descriptor size
...
This way we will be able to re-use panvk_cmd_alloc_fb_desc() for
meta stuff.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:40 +02:00
Boris Brezillon
fa51d99035
panvk: Get rid of panvk_emit_fragment_job()
...
Now that we have a valid pan_fb_info attached to the state, we can
use pan_emit_fragment_job() directly.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:33 +02:00
Boris Brezillon
82046eed4a
panvk: Move blit/resolve stubs to a separate file
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:28 +02:00
Boris Brezillon
08dfdd9639
panvk: Move copy stubs to a separate file
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:22 +02:00
Tomeu Vizoso
45fcaf67f0
panvk: Move CmdClear* impl to a separate file
...
In preparation for adding implementations of more meta commands, add
panvk_meta_clear.c.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:17 +02:00
Boris Brezillon
b0eaaf90f3
panvk: Merge identical BO entries before submitting a job
...
This should ideally be filtered when BOs are attached to a batch, but
let's do it in the submit path until then.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:12 +02:00
Boris Brezillon
165c26b9e1
panvk: Preload FB attachments when required
...
There are at least three situations where we need to preload FBs:
1. The attachment is flagged VK_ATTACHMENT_LOAD_OP_LOAD and has not been
accessed in previous subpasses
2. The batch is implicitly split (e.g. too many jobs queued to the
batch, wait/set events queued, ...)
3. The attachment has been written by a previous subpass
With those changes, we can get rid of panvk_emit_fb() and call
pan_emit_fbd() directly (fb_info is initialized when starting a subpass
and updated when an implicit split happens).
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:07 +02:00
Boris Brezillon
3166f4ebea
panvk: Initialize the blend shader logic
...
The blitter logic rely on blend shaders when formats are not blendable.
We need to initialize the blend shader logic before we can use the
blitter.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 15:00:01 +02:00
Boris Brezillon
ba2874563e
pan/blit: Extend pan_preload_fb() to return emitted jobs
...
The vulkan driver needs to patch job headers when re-issuing batches.
Extend pan_preload_fb() so it can return the emitted tiler jobs.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 14:59:50 +02:00
Boris Brezillon
9f4dab0f2d
pan/blit: Fix a NULL dereference in the preload path
...
The ZS view can be NULL if a stencil-only buffer is attached to the FB.
Fixes: 1de393fec5 ("panfrost: Fix ZS reloading on Bifrost v6")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 14:59:44 +02:00
Boris Brezillon
2dd13257c8
pan/bi: Allow passing RT conversion descriptors to fragment shaders
...
The Vulkan copy shaders sometimes need to partially write a texel and
issue a load on the FRAGOUT variable in that case, but they do know
the format of the tile buffer in advance in that case. Let's not add an
RT_CONVERSION sysval if we can avoid it.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 14:59:38 +02:00
Boris Brezillon
04d6c593d0
pan/bi: Relax check on 8bit swizzles
...
Allow extracting components Y, Z or W from an 8bit vector.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095 >
2021-09-21 14:58:54 +02:00
Samuel Pitoiset
af740f2c35
radv: do not store meta shaders to the default shader disk cache
...
Meta shaders are already stored in a different shader cache file.
Storing them in two places wastes disk space and they are never
loaded from the default shader disk cache anyways.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12937 >
2021-09-21 12:21:41 +00:00
Michel Zou
b0d7e8905b
wgl: fix 32 bits mingw exports
...
closes #5349
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12940 >
2021-09-21 12:00:06 +00:00
Samuel Pitoiset
f6d5cb2339
radv: do not use a different disk cache key for LLVM
...
The driver already adds a pipeline hash for LLVM which is redundant.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12938 >
2021-09-21 11:34:42 +00:00
Jordan Justen
99f9075063
Revert "intel/dev: Add display_ver and set adl-p to 13"
...
This reverts commit c81acd365e .
2021-09-21 03:39:31 -07:00
Jordan Justen
0741a2c3c2
Revert "iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13"
...
This reverts commit 4961f4c50f .
2021-09-21 03:39:27 -07:00
Jordan Justen
4961f4c50f
iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13
...
Cc: mesa-stable
Fixes: e435511b58 ("intel/dev: Add device info for ADL GT2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12908 >
2021-09-21 02:50:41 -07:00
Jordan Justen
c81acd365e
intel/dev: Add display_ver and set adl-p to 13
...
Cc: mesa-stable
Fixes: e435511b58 ("intel/dev: Add device info for ADL GT2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12908 >
2021-09-21 02:49:04 -07:00
Connor Abbott
b1fe85e38c
freedreno, turnip: Set TPL1_DBG_ECO_CNTL better
...
Match the blob better here. Note that the value of 0x1000000 for a650
comes from the Vulkan blob, and it's required to fix cubic filtering
even though the GLES driver doesn't set it (and doesn't support cubic
filtering).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5261
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12929 >
2021-09-21 09:08:20 +00:00
Connor Abbott
9ec0580095
freedreno/a6xx: Name TPL1_DBG_ECO_CNTL
...
This is a guess, but an informed guess, since every other block with a
known DBG_ECO_CNTL register has it at the very beginning immediately
followed by ADDR_MODE_CNTL.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12929 >
2021-09-21 09:08:20 +00:00
Andreas Baierl
3c19ab4a7b
lima: Remove depth near/far workaround
...
because this is fixed now.
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12804 >
2021-09-21 08:54:53 +00:00
Andreas Baierl
d1798ad1b5
lima: Expose GL_EXT_clip_control
...
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12804 >
2021-09-21 08:54:53 +00:00
Pierre-Eric Pelloux-Prayer
7405b7fbcd
radeonsi/test: use -t for deqp tests
...
deqp-runner added support for this.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
ac9ab028ce
radeonsi/test: don't require a folder name
...
Generate a temp one if the user didn't supply one.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
9db70eb577
radeonsi/sqtt: add si_se_is_disabled
...
Based on radv_se_is_disabled.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
a25a6abbd7
radeonsi/sqtt: export wave size and scratch size
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
a574d0541a
radeonsi/test: update expected results
...
These tests were fixed in piglit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
97663bac2e
radeonsi/test: fix typo in the test script
...
glcts results were copied over deqp results.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Samuel Pitoiset
b9cf327787
radv: remove useless assertions in the SQTT path
...
The driver aborts when the chip class is older than GFX8.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12854 >
2021-09-21 09:08:48 +02:00
Samuel Pitoiset
8846f65c4f
radv: make the SQTT BO a resident buffer
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12854 >
2021-09-21 09:08:47 +02:00
Samuel Pitoiset
c80ac276bf
radv: replicate THREAD_TRACE_CTRL config when stopping SQTT
...
This seems missed and it might be important.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12854 >
2021-09-21 09:08:45 +02:00
Bas Nieuwenhuizen
f1095260a4
radv: Experimentally enable RT extensions.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
ca2d96db51
radv: Add caching for RT pipelines.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
a22a4162d9
radv: Add support for setting a dynamic stack size.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
063d0c90c8
radv: Combine all the parts together with a main loop for an RT pipeline.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
85580faa4b
radv: Add ray traversal loop.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
c3d82a9622
radv: Add pass to lower anyhit shader into an intersection shader.
...
So we avoid having yet another shader calling loop. Such a thing
is not needed since neither shader types do recursion.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
ae5bea3125
radv: Add helper to parse raytracing stages.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
207ce6d658
radv: Add helper to inline shaders into the main shader.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
dcb02dbe73
radv: Add main loop variables.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
701803e340
radv: Add scaffolding for RT pipeline compilation incl libraries.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
f087b457e5
radv: Make some pipeline functions non-static.
...
Want to put the rt stuff in its own file. radv_pipeline.c is pretty
large already.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
8312b2232b
radv: Add raytracing pipeline properties.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
0f090a51b3
radv: Add group info to pipeline.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
080400e43c
radv: Add pipeline type.
...
I want to keep pointers that need to be freed in the union and need
to figure out the type a destruction time. This seems more reliable
than checking the shader array in case we destroy mid-creation (i.e.
on failure).
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
f5362742b9
radv: Add RT cache flushes.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
8ca54b4d38
radv: Support nir_intrinsic_load_global_constant.
...
SPIR-V parsing can result in some direct constant usage for shader
records. Lower this early to a global based intrinsic so that it
doesn't interfere with the later 32-bit offset based constants
for scratch usage.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
0d8bd8518d
nir: Support ray launch size in divergence analysis.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
c299968988
aco: Add support for ray launch size.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
1ca4fd31e6
radv: Add support for ray launch size.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
56b06c09b4
nir: Add AMD rt intrinsics.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
148ea4375c
radv: Implement NULL accel struct descriptor write.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
2070d36cf3
radv: Do more meta shader lowering.
...
Need this to clean up our generated RT pipeline.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
b1074fd51d
radv: Refactor some nir_channels usage to use nir_channel.
...
cleanup, nir_channels wasn't needed as these were only accessing a
single channel.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
817553c052
aco: Implement call scope.
...
Since we do no repacking yet, just use invocation.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
b6be96a2bd
radv: Modify load_sbt_amd intrinsic to get the descriptor.
...
That way we can get the address to the entry, which is needed for
some nir builtins because extra data in the entry can be used as
shader input.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
2abf44cf18
radv: Add bvh node definitions to a header.
...
So that we can avoid some magic numbers in the pipeline creation.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
a99ccd353b
radv: Add optimized CPU BVH builds.
...
This trivial sorting helps speed up bad cases (like in CTS significantly).
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
848d175c76
radv: Add more acceleration structure formats.
...
These are required ...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
506757ea86
radv: Add accel struct build support for the object-to-world matrix.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
3e059dc1e0
radv: Fix arrayOfPointers for instances in accel struct build.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Bas Nieuwenhuizen
58ec4f3069
radv: Fix CPU AABB build.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Martin Krastev
4807d777c0
meson: introduce option vmware-mks-stats controlling the instrumentations of gallium svga driver
...
The new boolean option controls the instrumentations of gallium svga driver for mksGuestStats.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
(cherry picked from commit 57760b7fe4eeb80acc8d6cd8bf6ec609a11a11dc)
(cherry picked from commit 12aed00f08bd95afd605cab34c833e81a4957dbd)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12873 >
2021-09-21 00:07:40 +00:00
Martin Krastev
4feb9c3c47
svga: enable DRM mks-stats via hooking to the corresponding DRM ioctls
...
SVGA DRM stat calls were situated but did not actually register with the mks-stats
mechanism due to absence of corresponding ioctls. The employed new ioctls in vmwgfx
are DRM_VMW_MKSSTAT_ADD and DRM_VMW_MKSSTAT_REMOVE, subject to version check.
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
(cherry picked from commit be47c077cc927c27a8c36342b47697aa81719677)
(cherry picked from commit 0388afc67b830f6ab916d0839c33eb1d91d6353f)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12873 >
2021-09-21 00:07:39 +00:00
Mike Blumenkrantz
b61e9345c1
build: fix nine compilation with only zink enabled as a gallium driver
...
fixes #5360
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12943 >
2021-09-20 22:47:38 +00:00
Mike Blumenkrantz
aff177a0ad
zink: fix regex syntax from previous ci commit
...
argh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12948 >
2021-09-20 18:33:32 -04:00
Mike Blumenkrantz
49b5e5be5a
zink: disable miplevel tests in ci completely for now
...
I still can't repro, and I'm running these regularly on multiple platforms,
so they're not going to get any worse for the time being
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12947 >
2021-09-20 22:20:48 +00:00
Philipp Zabel
b1b6d9e9a1
etnaviv: add mov for direct depth store output from load input
...
If the fragment shader writes fragment depth from an ALU instruction,
the register allocator makes sure that the instruction is pointed to the
correct register and write mask (t0.__z_).
If there is no instruction emitted because the source is an input
load intrinsic, or if the source instruction does not support swizzle
and write mask, we have to add a mov instruction for this to work.
Fixes piglit test spec@glsl-1.10 @execution@glsl-1.10-fragdepth .
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12891 >
2021-09-20 21:19:09 +00:00
Emma Anholt
ae01d856de
nir_to_tgsi: Remove the abs on fcsel's bool src.
...
While the nir fcsel opcode specifies src0 != 0.0, as the comment says,
it's only ever used on bools-as-floats, so we know that src0 is
non-negative. This saves an instruction per CMP on i915.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12921 >
2021-09-20 20:20:54 +00:00
Emma Anholt
4b0975a8e1
ci/freedreno: Update restricted trace sha1s.
...
Rendering changed slightly recently, but the diffs look fine.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12939 >
2021-09-20 19:55:55 +00:00
Emma Anholt
306a039472
ci/baremetal: Retry if our network device spontaneously fails.
...
Seen in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/13824132 . It's
unlikely that graphics would kill the network, so just assume it's not our
fault and keep going.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12939 >
2021-09-20 19:55:55 +00:00
Emma Anholt
9017bb0837
ci/freedreno: Add some cubearray piglit flakes on a630 I noticed.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12939 >
2021-09-20 19:55:55 +00:00
Emma Anholt
feb971fdee
freedreno: Assert to check for the previous regression.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12942 >
2021-09-20 19:34:57 +00:00
Emma Anholt
b8c4ad378d
freedreno: Fix autotune regression since batch-cache rework.
...
I freed the key that autotune needed a little early.
Fixes: b2349a4671 ("freedreno: Move the batch cache to the context.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12942 >
2021-09-20 19:34:57 +00:00
Rob Clark
27dd22cb62
turnip: Fix a6xx gen4 compute shaders
...
Port of 74d1052537 freedreno/a6xx: ("Fix a6xx gen4 compute shaders")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5354
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12856 >
2021-09-20 19:13:25 +00:00
Rob Clark
4e05338d99
turnip: Rast updates for a6xx gen4
...
Port of 219e12b7f3 ("freedreno/a6xx: Rast updates for a6xx gen3")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12856 >
2021-09-20 19:13:25 +00:00
Rob Clark
6ac1d8dc4c
turnip: Fix unitialized cs->device
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12856 >
2021-09-20 19:13:25 +00:00
Rob Clark
68d4d09b56
freedreno: Add info->a6xx.has_shading_rate
...
@flto noticed these registers seem to be related to GL_QCOM_shading_rate
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12856 >
2021-09-20 19:13:25 +00:00
Danylo Piliaiev
4839f442e9
turnip: consider multiview_mask when clearing depth-stencil attachment
...
Otherwise only first layer is being cleared.
Would fix several VK_EXT_multi_draw tests:
dEQP-VK.draw.multi_draw.overlapping.normal.max_draws.*.vert_only.multiview.no_offset
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12913 >
2021-09-20 18:41:23 +00:00
Timur Kristóf
872d21820f
nir: Exclude non-generic patch variables from get_variable_io_mask.
...
These are I/O variables which are not going to be removed anyway.
However, get_variable_io_mask handles their location incorrectly.
Found using the GCC undefined behavior sanitizer.
Fixes the following error:
runtime error:
shift exponent 4294967258 is too large
for 64-bit type 'long unsigned int'
Closes : #5319
Fixes: cf5f8f55c3
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12719 >
2021-09-20 18:08:16 +00:00
Timur Kristóf
13e467a147
ac/nir: Fix match_mask to work correctly for VS outputs.
...
match_mask checks the intrinsic type and decides whether it's
per-patch or not. VS don't have per-patch outputs,
so this causes wrong behaviour there.
Found using the GCC undefined behavior sanitizer.
Fixes the following error:
runtime error:
shift exponent 18446744073709551584 is too large
for 64-bit type 'long unsigned int'
Closes : #5319
Fixes: bf966d1c1d
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12719 >
2021-09-20 18:08:16 +00:00
Emma Anholt
4474c46f5f
mesa/st: Allow loops in GLSL when NIR is enabled, even if the HW can't.
...
The jump lowering enabled by EmitNoLoops breaks GLSL's loop unrolling on
various obviously unrollable loops, resulting in a lot of deqp-gles2 and
piglit failures. NIR will help unroll whatever GLSL doesn't, so we can
trust the driver to apply that after GLSL's unrolling, so no need to ask
GLSL to lower all loops.
Fixes : #4979
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12917 >
2021-09-20 17:41:24 +00:00
Emma Anholt
346a2950bb
ci/i915g: Clarify failure happening in fbo-fragcoord2.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12917 >
2021-09-20 17:41:24 +00:00
Philipp Zabel
4968313fe5
etnaviv: fix dirty bit check for baselod emission
...
Since baselod is stored in sampler state, not sampler view, we should
check the ETNA_DIRTY_SAMPLERS bit instead of ETNA_DIRTY_SAMPLER_VIEWS.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12916 >
2021-09-20 17:03:14 +00:00
Zachary Michaels
fc5ea6a054
X11: Ensure that VK_SUBOPTIMAL_KHR propagates to user code
...
Commit 0245b825 switched from returning the error code VK_ERROR_OUT_OF_DATE_KHR
to returning the success code VK_SUBOPTIMAL_KHR. Prior to that commit, the error
code caused all code paths to fail immediately, but the success code does not.
Currently the success code is not recorded in some scenarios, resulting in a
result of VK_SUCCESS instead. This breaks applications that rely on the
result (per the spec) to trigger resizes.
This commit ensures that the proper VK_SUBOPTIMAL_KHR success code is set as a
sticky status (as comments indicate was intended), ensuring that it is
propagated to user code.
Fixes #5331
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12782 >
2021-09-20 16:43:10 +00:00
Samuel Pitoiset
0be0ad102e
radv: keep depth/stencil images compressed for TRANSFER_DST on compute
...
Only if the image is TC-compat HTILE because it can be decompressed
on compute for partial copies.
This should remove few depth/stencil decompressions for RAGE2 and Red
Dead Redemption 2 because they declare all images as concurrent but
never use the compute queue for them.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452 >
2021-09-20 15:17:42 +00:00
Samuel Pitoiset
2b805b8a6c
radv: add support for copying compressed depth/stencil images on compute
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452 >
2021-09-20 15:17:42 +00:00
Samuel Pitoiset
0ac8731b6c
radv: implement depth/stencil expand on compute
...
This works as long as the image is TC-compatible HTILE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452 >
2021-09-20 15:17:42 +00:00
Samuel Pitoiset
966b780992
radv: rename radv_decompress_depth_stencil()
...
To radv_expand_depth_stencil() for consistency.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452 >
2021-09-20 15:17:42 +00:00
Boris Brezillon
4bc10578a5
panfrost/ci: Skip the indirect_draw+XFB tests
...
We lack a dependency between the vertex job filling the indirect draw
buffers and the indirect draw compute job reading from these buffers,
leading to unreliable results (the tests pass if the vertex job is
done before the compute job starts, and fail otherwise). Let's disable
those tests until we sort it out.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12589 >
2021-09-20 14:58:02 +00:00
Boris Brezillon
3c2d7cb0d6
panfrost: Fix collision in the indirect draw shader table
...
Min/max index search shaders are different for the !primitive_restart
and primitive_restart. We need to add entries for the primitive restart
cases otherwise we might retrieve a wrong shader from the cache.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12589 >
2021-09-20 14:58:02 +00:00
Boris Brezillon
43760a7b2f
panfrost: Fix indirect draws when vertex or instance count is 0
...
In that case we should just skip the vertex/tiler jobs as done in the
direct draw path.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12589 >
2021-09-20 14:58:02 +00:00
Italo Nicola
7682a5de04
panfrost: fix null deref when no color buffer is attached
...
Do not dereference color buffer #0 in the SFBD code path if no color buffer is
attached, as with depth-only attachments. Fixes a crash running glmark2 -b
shadow on Mali T720.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Fixes: c746747cb8 ("panfrost: fix GL_EXT_multisampled_render_to_texture regression")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12927 >
2021-09-20 14:42:39 +00:00
Boris Brezillon
bdb37c862f
panfrost: Prepare shader helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:18:56 +02:00
Boris Brezillon
0d57a76458
panfrost: Prepare texture helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:18:56 +02:00
Boris Brezillon
a865a4a789
panfrost: Prepare pan_encoder.h to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:18:50 +02:00
Boris Brezillon
f36fd4ac4c
panfrost: Prepare scoreboard helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:12:33 +02:00
Boris Brezillon
de13fdc251
panfrost: Prepare pandecode to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:11:30 +02:00
Boris Brezillon
502b942944
panfrost: Move panfrost_major_version() to gen_macros.h
...
So we can use this function in decode_common.c when transitioning to
per-gen XML. While at it rename the function pan_arch().
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:10:10 +02:00
Boris Brezillon
5af3516f9e
panfrost: Prepare pan_cs helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:10:00 +02:00
Boris Brezillon
e145a5fdd4
panfrost: Prepare blend helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:09:19 +02:00
Boris Brezillon
f68c9a575b
panfrost: Prepare blitter helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12935 >
2021-09-20 15:08:31 +02:00
Boris Brezillon
8805509fff
panfrost: RGB332_UNORM is not a valid texture format on v6+
...
Cc: mesa-stable
Fixes: c6bdd976e6 ("panfrost: Split out v6/v7 format tables")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12508 >
2021-09-20 11:21:29 +00:00
Boris Brezillon
b1172540f3
panfrost: Drop the R and T flags on SCALED formats
...
Sampling from SCALED textures / rendering to SCALED FBOs is a bit tricky
(requires extra int <-> float conversions in a few places).
mesa/st only use SCALED formats as vertex formats, and those formats
are optional in Vulkan, so let's drop the RENDER/TEXTURE flags to keep
things simple.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12508 >
2021-09-20 11:21:29 +00:00
Boris Brezillon
bab84c62d5
panfrost: RGB10_A2_SNORM is not a valid texture format on v6+
...
Cc: mesa-stable
Fixes: c6bdd976e6 ("panfrost: Split out v6/v7 format tables")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12508 >
2021-09-20 11:21:29 +00:00
Boris Brezillon
8651dfbeb4
panfrost: Fix the Z32_S8X24 and X32_S8X24 definitions
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12508 >
2021-09-20 11:21:29 +00:00
Boris Brezillon
eed57ada6e
panfrost: Patch Z32_S8X24 format when creating a sampler view
...
The gallium driver always stores Z32_S8X24 textures on 2 different
planes. Let's fix the create_sampler_view() logic so we can support
single-planar Z32_S8X24 in the vulkan driver.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12508 >
2021-09-20 11:21:29 +00:00
Timur Kristóf
75dbb40439
ac/nir: Remove byte permute from prefix sum of the repack sequence.
...
The byte-permute instruction v_perm_b32 is not exposed by older
LLVM releases (only available on LLVM 13 and later), therefore a new
sequence is needed which we can use with these LLVM versions too.
The prefix sum is replaced by two alternatives:
1. For GPUs that support v_dot, we shift 0x01 to the wanted byte
positions and then use v_dot to sum the results.
2. For older GPUs (Navi 10), we simply shift out the unwanted bytes
and use v_sad_u8 to produce the sum.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12786 >
2021-09-20 12:39:03 +02:00
Timur Kristóf
966cff9cfa
aco/isel: Fix emit_vop2_instruction to apply 16/24-bit flags properly.
...
Previously it used a builder function but didn't use the return
value from that function, so the flags were not applied.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12786 >
2021-09-20 12:39:03 +02:00
Timur Kristóf
f2e41eda9e
aco: Add ability to optimize v_lshl + v_sub into v_mad_i32_i24.
...
Also change combine_add_lshl to use check_vop3_operands instead
of its own checks of the operands.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12786 >
2021-09-20 12:39:03 +02:00
Tapani Pälli
1a6c01a61b
mesa: fix timestamp enum with EXT_disjoint_timer_query
...
Extension implementation missed GL_TIMESTAMP_EXT for Get* functions,
commit 5d58fea660 added GetInteger64vEXT support but obviously we need
to support the enum as well ...
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5361
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12890 >
2021-09-20 07:31:00 +03:00
Eric Engestrom
90c6eec0c1
bin/khronos-update.py: add upstream for vulkan_directfb.h & vulkan_screen.h
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12877 >
2021-09-19 11:00:32 +01:00
Eric Engestrom
8e0b0ce3eb
bin/khronos-update.py: update the branch name (s/master/main/)
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12877 >
2021-09-19 11:00:22 +01:00
Qiang Yu
6f9f350622
radeonsi: fix ps SI_PARAM_LINE_STIPPLE_TEX arg
...
This arg size should be 1 instead of 3. It does not affect functionality
because we does not enable it in SPI_PS_INPUT_ADDR. But it does affect
the VGPR number that LLVM produce when LLVM still count with all PS
function arguments.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12922 >
2021-09-19 01:24:21 +00:00
Rob Clark
2a0a9b189a
freedreno/computerator/a4xx: Fix enum mismatch warning
...
Fixes: fb5deb2b4a ("a4xx/computerator: add initial backend")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923 >
2021-09-18 20:24:49 +00:00
Rob Clark
b308ccf4fb
freedreno/ir3: Fix generation check
...
Fixes: fb5deb2b4a ("a4xx/computerator: add initial backend")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923 >
2021-09-18 20:24:49 +00:00
Rob Clark
24326f25b9
freedreno/ir3: Cleanup liveness lifetime
...
I'm going to want to use this in other passes, so lets let the
allocation hang off the pass's context. Also, while we're at it,
fix the error path leak in ir3_ra().
Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923 >
2021-09-18 20:24:49 +00:00
Rob Clark
344683c932
freedreno/ir3: Fix sched debug msgs
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923 >
2021-09-18 20:24:49 +00:00
Daniel Stone
0e15d5af81
fdno/resource: Rewrite layout selection for allocation
...
The previous code had a number of errors, the most glaring of which was
forcing linear when it was one of the possible layouts requested.
When modifiers are being used, a list of _acceptable_ modifiers is
supplied; it's up to the driver to then make a decision as to which it
thinks is most optimal.
Normally we would select between linear/tiled/UBWC in ascending order of
preference according to what's possible, however we can't use a tiled
layout with explicit modifiers as there is no modifier token defined for
it.
Rewrite the layout-selection mechanism to always try to do the most
optimal thing. If the use flags force us to, or we have a shared
resource without explicit modifiers, we use linear. Failing that, we use
UBWC wherever possible; if this is not possible, we use tiled for
internal resources only or linear for shared resources.
v2 (Rob): respect FD_FORMAT_MOD_QCOM_TILED; do not print perf warning on
user choice of disabling UBWC;
v3: fix several issues breaking CI tests: revert removal of using
MOD_INVALID in various places, and assume implicit modifiers if present;
do not attempt to set UBWC flags when screen->tile_mode(prsc) falls back
to LINEAR (e.g. for small mip-maps levels); use TILED for implicit
modifier case with non-shared resources
v4: fix unintended demotion of UBWC, i.e. only check QCOM_COMPRESSED
modifier and demote UBWC to less optimal format when using explicit
modifiers
Signed-off-by: Daniel Stone <daniels@collabora.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Signed-off-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12595 >
2021-09-18 17:37:05 +00:00
Christian Gmeiner
f8a37832df
lima: fix leak of the screen hash table
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12902 >
2021-09-18 16:47:49 +00:00
Alyssa Rosenzweig
e7e762635d
docs/panfrost: Remove obsolete note on Android.mk
...
Android.mk was removed, so remove a reference to it from Panfrost
documentation. We should document building for Android, but it'll be
through meson. This note as-is adds more confusion than note.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12914 >
2021-09-18 16:28:06 +00:00
Filip Gawin
6b5e9352ef
aco: cleanup assignment of unique_ptrs
...
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12903 >
2021-09-18 11:09:24 +00:00
Joshua Ashton
592aa9375c
radv: Expose modifiers that support DCC image stores with STORAGE_IMAGE_BIT
...
Some games, ie. Doom Eternal, present from compute following compute post-fx and would benefit from having DCC image stores available.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862 >
2021-09-18 00:01:01 +00:00
Joshua Ashton
92ade3df05
ac/surface: Add ac_modifier_supports_dcc_image_stores helper
...
Helper function to check if a modifier supports DCC image stores.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862 >
2021-09-18 00:01:01 +00:00
Joshua Ashton
fd08758bb1
ac/surface: Add modifiers capable of DCC image stores
...
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862 >
2021-09-18 00:01:01 +00:00
Ian Romanick
897bb9a222
iris: Add finalize_nir
...
Improves performance of SynMark OglDrvShComp by +241.879%±1.01366% (n=5)
on a random KBL desktop that I have. That seems to put it at about the
same performance as i965, but I did not test that in a statistically
sound way.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858 >
2021-09-17 16:36:08 -07:00
Ian Romanick
b042c71ac1
iris: Move iris_set_max_shader_compiler_threads and iris_is_parallel_shader_compilation_finished
...
There's going to be at least one more shader function set in
pipe_screen, so it makes more sense to do it in iris_program.c.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858 >
2021-09-17 16:36:08 -07:00
Ian Romanick
aaf2e6a9f5
iris: Eliminate iris_uncompiled_shader::needs_edge_flag
...
Use the flag that was set by nir_lower_passthrough_edgeflags. The
lowering passes will soon be moved to a finalize_nir hook, so there
won't be any choice. Ideally we'd like to eliminate iris_fix_edge_flags
completely, and this is a first step.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858 >
2021-09-17 16:36:08 -07:00
Ian Romanick
d7ba52cce9
nir/edgeflags: Add a flag to indicate the edge flag input is needed
...
Most modern hardware needs the edge flag added as a hidden vertex input
and needs code added to the vertex shader to copy the input to an
output. Intel hardware is a little different. Gfx4 and Gfx5 hardware
works in the previously described mannter. Gfx6+ hardware needs the
edge flag as a specific vertex shader input, and that input is magically
processed by fixed-function hardware without need for extra shader code.
This flag signals only that the vertex shader input is needed. It would
be nice if we could decouple adding the vertex shader input from
generating the copy-to-output code, but that has proven to be
challenging. Not having that code causes other passes to want to
eliminate that shader input.
v2: Convert conditional to assertion. This pass is only called for
vertex shaders. Suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858 >
2021-09-17 16:36:08 -07:00
Ian Romanick
3281ccf4b1
iris: Calculate uses_atomic_load_store after all lowering
...
The lowering passes will soon be moved to another function, so there
won't be any choice.
As a side benefit, this allows eliminating the uses_atomic_load_store
**pointer** parameter from brw_nir_lower_storage_image. For some reason
crocus was passing false instead of NULL.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858 >
2021-09-17 16:36:08 -07:00
Ian Romanick
e33055874b
iris: crocus: Use shader_info::is_arb_asm flag
...
...instead of looking for "ARB" in the name of the shader. This matches
the behavior of i965. Using "ARB" was added in a1ebac3750 ("iris:
Implement ALT mode for ARB_{vertex,fragment}_shader"), but there's no
explanation of why that method was used.
v2: Just use shader_info::is_arb_asm everywhere instead of
iris_uncompiled_shader::use_alt_mode. Suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858 >
2021-09-17 16:36:08 -07:00
Rob Clark
bf74d58f21
freedreno/a6xx: Pre-bake SO-disable stateobj
...
No need to re-create this every time we transition from stream-out
enabled to disabled.
Creation of streamout_disable_stateobj is deferred until we create
a program state using streamout to avoid creating it unnecessarily
and because fd6_prog_init() is called before ctx->pipe is created.
(Changing that ordering is complicated by the fact that u_blitter
copies pctx->bind_fs_state(), and friends.)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12918 >
2021-09-17 20:03:40 +00:00
Mike Blumenkrantz
60f12ac127
zink: don't leak drm fd on drmPrimeFDToHandle failure
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12911 >
2021-09-17 19:33:43 +00:00
Rob Clark
8c6e789c24
freedreno: Add perf warning for WC readback
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
7e088d3621
freedreno: Used cached coherent for staging resources
...
These are really only accessed by the GPU once, so CPU access speed is
more important. Especially for PIPE_MAP_READ.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
926ffea994
freedreno/drm: Use cached-coherent for control bo
...
Userspace frequently reads the elapsed fence, but the GPU only writes it
once per submit. So this should be another useful place for cached-
coherent.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
f5879012ca
freedreno/drm: Use cached-coherent cmdstream buffers
...
Some more extreme examples, like gl_driver2_off, can be bottlenecked on
writes to cmdstream. OTOH the CP is pretty pipelined in how it slurps
in memory, so the penalty of using coherent buffers should not be so
much.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
076196ae08
freedreno/drm: Add cached-coherent bo support
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
21fcb2657f
freedreno/drm: Don't return shared/control bo's to cache
...
They can never be allocated from the cache, as fd_bo_state() would
return FD_BO_STATE_UNKNOWN
Fixes: 7dabd62464 ("freedreno/drm: Userspace fences")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
429986d5aa
freedreno/drm: Consider allocation flags in bo-cache
...
It hasn't really mattered until now, as we keep a separate cache for
cmdstream (which is FD_BO_GPU_READONLY), and the only other flag so
far is FD_BO_SCANOUT (which the bo cache probably messes up, but it
does not matter on most hw, and on hw where it does the scanout buffer
will be imported (and therefore won't end up in the bo cache).
But when we add cached-coherent (or if we wanted to use GPU_READONLY
more) it starts to matter.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
83085a8f39
freedreno/drm: Rename bo->flags to bo->reloc_flags
...
Next patch adds alloc_flags, lets rename bo->flags first to make it
clear *which* flags these are.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Rob Clark
f8d2587960
freedreno/drm: Garbage collect unused bo_cache
...
The ring_cache that is actually used is in fd_device.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176 >
2021-09-17 18:24:34 +00:00
Christian Gmeiner
dce3c6b436
ci/bare-metal: add etnaviv
...
Add deqp gles2 CI run for GC2000.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852 >
2021-09-17 17:54:39 +00:00
Christian Gmeiner
739ef184cc
ci/bare-metal: add support for eth008 power relay
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852 >
2021-09-17 17:54:39 +00:00
Christian Gmeiner
736c159f54
ci/bare-metal: add telnet based serial
...
Makes it possible to use e.g. a ser2net server in the lan.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852 >
2021-09-17 17:54:39 +00:00
Christian Gmeiner
bdf991ff67
ci: update kernel
...
Switch to v5.13-rc5-for-mesa-ci-2bb5d9ffd79c branch, which includes
etnaviv MMU patches.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852 >
2021-09-17 17:54:39 +00:00
Christian Gmeiner
172f5db20d
ci: include etnaviv support in ARMHF container.
...
Build the kernel with CONFIG_DRM_ETNAVIV=y and include
imx6q-cubox-i.dtb.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852 >
2021-09-17 17:54:39 +00:00
Rhys Perry
a1af902531
nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants
...
This allows for more MAD/FMA instructions to be created.
fossil-db (Sienna Cichlid):
Totals from 50134 (33.46% of 149839) affected shaders:
VGPRs: 2436536 -> 2436000 (-0.02%); split: -0.05%, +0.03%
SpillSGPRs: 13136 -> 13135 (-0.01%); split: -0.02%, +0.02%
CodeSize: 206621424 -> 206278292 (-0.17%); split: -0.23%, +0.07%
MaxWaves: 1116804 -> 1117448 (+0.06%); split: +0.07%, -0.01%
Instrs: 38977460 -> 38862886 (-0.29%); split: -0.33%, +0.04%
Latency: 832425389 -> 827432260 (-0.60%); split: -0.63%, +0.03%
InvThroughput: 184193457 -> 183563350 (-0.34%); split: -0.37%, +0.03%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7458 >
2021-09-17 17:28:26 +00:00
Emma Anholt
63cc1fe71f
freedreno: Remove dead fd_batch_reset().
...
Unused since 58f5605124 ("freedreno: Handle full blit discards by
invalidating the resource.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
3ade94df86
freedreno: Use a BO bitset for faster checks for resource referenced.
...
When moving the batch cache to the context, I added hash table lookups
from batch to rsc for "is this resource in use" because we could no longer
store data in the rsc bo under the batch cache's lock.
We can save that cost by tracking a bitfield of resources referenced by
the batch, which gives us very cheap checks in the draw path at a minor
cost in memory. We can just use the GEM BO handle, since it's a nice
small integer already (we can't use the TC buffer ID, because the frontend
changes that, and we're in the driver thread).
This required moving the !pending() assert up in resource shadowing, since
the BO swap meant we were checking pending on the wrong resource.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
22486ffa51
freedreno: Remove the submit lock locking.
...
I think the whole submit lock thing should be possible to remove now, but
just getting rid of the lock since we're no longer sharing batches between
ctxes means another several percent draw overhead improvement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
b2349a4671
freedreno: Move the batch cache to the context.
...
Our draw call rate was significantly limited by the atomics we had to do
to manage access to the batch cache.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
c3d6493122
freedreno: Use TC's flag for whether get_query is in the driver thread.
...
In moving batch cache to the context, the check for whether there's
pending work being done to this resources ends up accessing the context,
so we can't do it outside of the fd_context_access_begin(). This flag
lets us do the driver-thread asserts before we've decided whether we need
to flush.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
cbbe3e7641
freedreno: Precompute resource pointer hash values.
...
It was around half a percent of the CPU in the fd-bc-ctx branch, and adds
4b to our 472b struct.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Rhys Perry
f24f62f4ad
aco/nops: fix handle_raw_hazard_internal when visiting the current block
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720 >
2021-09-17 16:43:00 +00:00
Rhys Perry
a8cc911aaf
aco/nops: add State
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720 >
2021-09-17 16:43:00 +00:00
Rhys Perry
bdf7eed045
aco/nops: create handle_raw_hazard_instr helper
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720 >
2021-09-17 16:43:00 +00:00
Rhys Perry
bd07118b56
aco/nops: use up-to-date mask_size
...
fossil-db (Pitcairn):
Totals from 6 (0.00% of 129702) affected shaders:
CodeSize: 8760 -> 8736 (-0.27%)
Instrs: 1714 -> 1708 (-0.35%)
Latency: 12325 -> 12302 (-0.19%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720 >
2021-09-17 16:43:00 +00:00
Connor Abbott
dfe432d829
ir3: Make trig replacement expression exact
...
This prevents other optimizations from associating the inner multiply,
which can add inaccuracies that can lead to discontinuities around the
boundary of the ffract. We should use exactly the sequence that the blob
uses to avoid problems.
Since fadd + fmul cannot be combined to ffma when exact is specified, we
have to use ffma ourselves.
Fixes artifacts in PixMark Volplosion with !7458 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12912 >
2021-09-17 15:45:29 +00:00
Rhys Perry
6ed18749de
aco: allow live-range splits of linear vgprs in top-level blocks
...
Fixes dEQP-VK.ssbo.phys.layout.random.8bit.all_per_block_buffers.46 on
GFX8.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
8d50385bbd
aco: implement linear vgpr copies
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
b1e4794f0f
aco/tests: add regalloc.scratch_sgpr.create_vector
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
f41200d289
aco/tests: fix finish_ra_test()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
207b2cd434
aco: find scratch reg for sub-dword psuedo instructions which read sgprs
...
If there's a sgpr operand before a sub-dword operand, a scratch register
will not be found on GFX6/7.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
f2a48f4eae
aco: find a scratch register for sub-dword copies on GFX7 if scc is empty
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
da74e0f012
aco: rewrite print_reg_class()
...
Make it work for any regclass, and print linear VGPRs differently from
logical ones.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
e2b77e6cd4
aco: add and use RegClass::resize helper
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
783609a849
aco: add RegClass::is_linear_vgpr helper
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
dfa8ef723b
radv: fix pipeline caching with robust buffer access
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12900 >
2021-09-17 13:49:46 +00:00
Mike Blumenkrantz
5eb59a03ec
util/tc: rename tc_replace_buffer_storage_func::num_rebinds and document
...
this parameter is only a hint, as tc provides no method for tracking cases
when a buffer is bound multiple times to the same site (e.g., multiple vertex
buffer slots will be counted as 1 bind), so rename to "minimum" to be more clear
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12898 >
2021-09-17 12:32:29 +00:00
Mike Blumenkrantz
85305b2d61
features: fix listing for GL_ARB_parallel_shader_compile
...
this isn't actually all drivers
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12909 >
2021-09-17 12:27:15 +00:00
Samuel Pitoiset
c952655693
ac/rgp, radv: report wave size for shaders
...
Fills the "Wave mode" in "Pipelines" for GPUs that supports Wave32.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12896 >
2021-09-17 08:05:36 +00:00
Samuel Pitoiset
d29c381c64
ac/rgp, radv: report scratch memory size for shaders
...
Fills the "Scatch Mem" with "Yes/No" in "Pipelines", this requires
instruction timing to be enabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12896 >
2021-09-17 08:05:36 +00:00
Pierre-Eric Pelloux-Prayer
57c63d7204
Revert "ci/v3d: add piglit flake"
...
This reverts commit 7d5aea9edf .
The test isn't flaky: now that the regression is fixed we can
remove it from the flakes list.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12849 >
2021-09-17 09:42:19 +02:00
Pierre-Eric Pelloux-Prayer
4c0b8254a2
vbo/dlist: reallocate the vertex buffer on vertex upgrade
...
upgrade_vertex copies save->copied.nr vertices to the vertex buffer,
so we need to make sure it has enough space to accomodate them.
This commit also drops the usage of COPY_CLEAN_4V_TYPE_AS_UNION in
this function because it always writes 4-components for all attributes,
but our buffer might be smaller. Instead, only write the needed
components.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5353
Fixes: cc57156dce ("vbo/dlist: rework vertex_store management")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12849 >
2021-09-17 09:42:19 +02:00
Filip Gawin
beb7ed2b89
r300: assert that array in translate_vertex_program is initialized
...
Problematic usage is in case RC_OPCODE_ENDLOOP, at line
ret_addr = loops[--loop_depth];
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12880 >
2021-09-17 07:19:24 +00:00
Timothy Arceri
81c8c7d998
util/cache: run basic cache tests on the single file cache
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12745 >
2021-09-17 01:25:46 +00:00
Marek Vasut
6da2727174
freedreno: Handle timeout == PIPE_TIMEOUT_INFINITE and rollover
...
The fd_fence_finish() may be passed a special timeout value PIPE_TIMEOUT_INFINITE.
This gets propagated all the way to get_abs_timeout(), where it gets converted to
a huge timeout value and passed down to the kernel. At least on iMX53, the kernel
may complain about this value being too large and emit a backtrace. The relevant
piece of information there is the following:
schedule_timeout: wrong timeout value bf94984b
Per suggestion by Rob Clark, fix this in get_abs_timeout() by picking the same
rollover implementation present in etnaviv. This fixes one part of the problem
where the tv_nsec becomes larger than NSEC_PER_SEC, which is invalid.
However, the PIPE_TIMEOUT_INFINITE is sufficiently large to make tv_secs larger
than KTIME_SEC_MAX, which makes kernel-side ktime_set() return KTIME_MAX and
that in turn triggers the above "wrong timeout value N" message. Fix this by
setting the timeout to large enough value in case of PIPE_TIMEOUT_INFINITE.
While the timeout is not truly infinite, the timeout is long enough as anything
longer than a few seconds means the GPU got hung.
The "util/timespec.h" is added so we can use NSEC_PER_SEC instead of ad-hoc
constant 1000000000 . The "pipe/p_defines.h" is needed for PIPE_TIMEOUT_INFINITE.
This problem can be reliably triggered on iMX53 using Qt5 with EGLFS support,
using the qtbase examples, as follows:
/usr/share/examples/opengl/qopenglwidget/qopenglwidget -platform eglfs
Fixes: f3cc0d2747 ("freedreno: import libdrm_freedreno + redesign submit")
Signed-off-by: Marek Vasut <marex@denx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12886 >
2021-09-17 00:46:57 +00:00
Mike Blumenkrantz
eb3fa25150
zink: zero VkImageCreateInfo::queueFamilyIndexCount on creation
...
this explodes gfxreconstruct
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12905 >
2021-09-17 00:24:49 +00:00
Emma Anholt
e2ba454180
ci/freedreno: Drop minetest from a3xx trace testing.
...
It's been flaking approximately weekly since the end of June.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12906 >
2021-09-16 22:46:48 +00:00
Neha Bhende
f2b08decf7
auxiliary/indices: convert primitive type PIPE_PRIM_PATCHES
...
Few tessellation related piglit test are crashing. This patch
fixes unhandled case
Tested with piglit
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
(cherry picked from commit 0e1c962cc105a9330caf22266e1962b049c13454)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12882 >
2021-09-16 21:45:43 +00:00
Dave Airlie
86399c1b1f
lavapipe: enable KHR_spirv_1_4
...
One test fails but I think it's a missing barrier in the test
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12888 >
2021-09-17 05:38:29 +10:00
Marijn Suijten
07e1233c61
freedreno: Enable Adreno 508, 509 and 512
...
These GPUs attained kernel support in:
https://git.kernel.org/torvalds/c/1d832ab30ce64abe30571bc12931a296a8a27c4d
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12874 >
2021-09-16 18:51:40 +00:00
Nanley Chery
69242f188c
iris: Finish aux import in iris_resource_from_handle
...
This allows us to delete iris_resource_unfinished_aux_import, which
incorrectly assumed that a CCS-enabled resource needs an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
8510d17ff4
iris: Add and use get_num_planes
...
This function counts the number of objects in a pipe_resource linked list.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
a16d6bc179
iris: Don't add a clear color BO for MC_CCS
...
It's unusable because ISL_AUX_USAGE_MC doesn't support fast clears.
Instead of performing this change in the if-ladder, replace the
if-ladder with a switch statement to make it clear what's going on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
c7a61bbf13
iris: Allow NULL aux BOs in aux-state functions
...
XeHP can use CCS_E without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
d32a4cdab9
iris: Simplify an iris_use_pinned_bo call
...
Avoid using a helper function to get the resource BO. This fits in
better with the previous iris_use_pinned_bo calls.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
89319a0dfd
iris: Split clear color and aux BO checks
...
CCS_E-enabled resources on XeHP have a clear color without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
d25515fbf1
iris: Support NULL aux BOs in fill_surface_state
...
XeHP can use CCS_E without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
08edf0f7fc
iris: Delete iris_resource_get_clear_color
...
This helper simply is a wrapper to the clear color fields in the
iris_resource struct. We choose to delete it for two reasons:
1) It incorrectly asserts that the resource argument has an aux BO.
This doesn't hold for CCS_E on XeHP.
2) The majority of functions ignore the helper anyway and access these
fields directly.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Jesse Natalie
107c200537
CI/windows: Build shared-glapi, EGL, gles2
...
Acked-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Jesse Natalie
ccb5cf8b4b
meson: Set /Zc:__cplusplus for MSVC
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Jesse Natalie
e7a1eebbb2
egl: Update Windows .def to include missing exports
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Jesse Natalie
29e3094d1e
symbols-check: Fix symbol demangling for Windows
...
Only strip leading underscores if there's also a trailing @
Fixes shared-glapi symbol check for x64
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Mike Blumenkrantz
ed794207b5
zink: pass all modifiers through to image creation
...
let the driver figure these out after zink guarantees that at least one of them
will work
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857 >
2021-09-16 12:36:20 -04:00
Mike Blumenkrantz
4e6d78c3b0
zink: pre-filter multi-plane modifiers
...
only single plane modifiers are supported now
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857 >
2021-09-16 12:36:20 -04:00
Mike Blumenkrantz
cfe0bf5a4a
zink: unbreak dmabuf handling
...
this does need kms handling to do literally anything.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857 >
2021-09-16 12:36:20 -04:00
Mike Blumenkrantz
b0318216fa
zink: store drm fd to screen
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857 >
2021-09-16 12:36:19 -04:00
Jason Ekstrand
6c7d23e6ca
nir: Stop sweeping indirects
...
They're no longer ralloc'd.
Fixes: 879a569884 "nir: Switch from ralloc to malloc for NIR instructions."
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12884 >
2021-09-16 11:28:36 +00:00
Jason Ekstrand
d1eae6f36b
nir: Properly clean up nir_src/dest indirects
...
Now that they're no longer ralloc'd, we have to be much more careful
about indirects. We have to make sure every time a source or
destination is overwritten, its indirect (if any) is freed. We also
have to choose a memory ownership convention for the rewrite functions.
Assuming that they will be called with the source from some other
instruction, we choose to always make a copy of the indirect (if any).
It's the responsibility of the caller to ensure its copy of the indirect
is freed.
Unfortunately, all this extra logic is going to make
nir_instr_rewrite/move_src/dest more expensive because they now have
all the logic of nir_src/dest_copy instead of a simple struct
assignment. Fortunately, the vast majority of rewrite calls are done by
nir_ssa_def_rewrite_uses which is an SSA-only fast-path.
Fixes: 879a569884 "nir: Switch from ralloc to malloc for NIR instructions."
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12884 >
2021-09-16 11:28:36 +00:00
Timur Kristóf
92e1981a80
radv: Remove PSIZ output when it isn't needed.
...
PSIZ output is only needed when:
1. There is a next stage and it reads it.
2. Primitive topology is point list, in the last vertex pipeline stage.
Zink always adds this output in its vertex (and other) shaders,
because it helps Zink avoid recompiling shader variants.
However, this has a performance impact for RADV because
it needs a scalar memory load. That becomes noticeable
at high primitive rates.
The Fossil stats are unremarkable because our DB doesn't include any
shaders from Zink or D9VK, but there are a few affected shaders.
Note that there may be an increase in LDS use in some GS. This is
because with PSIZ removed the ES per-vertex LDS size is smaller, so
we can squeeze more GS threads in the same workgroup.
Fossil DB stats on Sienna Cichlid:
Totals from 14 (0.01% of 128647) affected shaders:
CodeSize: 119884 -> 119732 (-0.13%)
LDS: 235008 -> 228864 (-2.61%); split: -2.83%, +0.22%
Instrs: 23076 -> 23048 (-0.12%)
Latency: 71667 -> 71625 (-0.06%)
InvThroughput: 19155 -> 18870 (-1.49%)
Copies: 1586 -> 1572 (-0.88%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10725 >
2021-09-16 11:06:05 +00:00
Dave Airlie
a2c30c1488
docs: update docs for new llvmpipe/lavapipe features
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
c1de9eff01
lavapipe: enable KHR_shader_subgroup_extended_types
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
143167f2a0
gallivm/nir: handle subgroup reduction across all types
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
3a27e406ed
lavapipe: enable KHR_shader_float16_int8
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
f814a2449e
llvmpipe: enable FP16 and update CL + traces piglit results.
...
The fails will be addressed later.
This adds a fail in GLSL compiler that is due to a workaround
that fails when fp16 constants are lowered
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
0d3b285360
gallivm: use llvm intrinsics for 16-bit round/trunc/roundeven
...
Otherwise the inf translations don't seem to work, and the VK CTS
fails
Fixes VK CTS dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic*
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
2277386565
gallivm: increase tgsi nesting call stack size
...
Some VK CTS tests are topping this out around 76, increase it to 80 for now.
Fixes:
dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.*44*
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
c118888f92
gallivm/nir: pass the correct float builder to ddx/y
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
bceae73b3f
gallivm/nir: call pow with correct flt builder
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
836b0ace10
gallivm/nir: handle 16-bit exp/lod using intrinsics.
...
This just passes the 16-bit float versions to the llvm intrinsics
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
3e773501d9
llvmpipe: lower_flrp16
...
fixes a bunch of spir-v 16-bit tests
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
6decb1b896
gallivm: add 16-bit sin/cos via llvm intrinsic
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
af49f9697a
gallivvm/nir: handle non-32bit mask scatter stores
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
0d4f17fe1f
gallivm/nir: fix f2b32
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
0776628d1d
gallivm/nir: handle conversion to 16-bit texel fetch
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Dave Airlie
c396067366
gallivm: add initial support for 16-bit float builder.
...
This is an initial patch that is needed for OpenCL and Vulkan
support for proper 16-bit floats.
This doesn't enable the cap bit yet
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816 >
2021-09-16 04:15:41 +00:00
Mike Blumenkrantz
0418b98569
zink: cap max shader variants with inlined uniforms
...
avoid making a new shader for every frame forever
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
1aa0b2777d
zink: simplify shader variant update loop
...
a single continue makes this much easier to read
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
fb9e9401c9
zink: split out inlined uniform shader variants into separate cache
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
ad32e41efe
zink: remove default_variants storage in program struct
...
these should naturally be the first entry in the list when it matters
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
334576569e
zink: replace shader module hash table with a list
...
this should be significantly more performant for the majority of cases
since it's rare that shaders have multiple variants outside of unit tests,
so now there can just be a list of shaders being iterated instead where the
first entry is the last used
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
c995d7bad8
zink: move shader cache to gfx program struct
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
834cc07e5b
zink: stop using hash table for compute programs
...
this is pointless since there's no variants yet
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
19e99e46db
zink: store shader key to shader module
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
8e78a6f67d
zink: move uniform size calc for shader keys into keybox
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
19fbdb9064
zink: move shader keys to be persistent on pipeline state
...
save a cycle or two zeroing and populating this on every recalc
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
80604fee4a
zink: move xfb updates to just before draw
...
it's illegal to bind the pipeline after xfb has begun
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
ff5991e86a
zink: simplify flagging last vertex stage for updating
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
e515d9791e
zink: only update gfx pipeline cache after creating a real pipeline
...
async pipelines may not require updates here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
7438d670dd
zink: remove some ctx references from shader/pipeline compile
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:32 -04:00
Mike Blumenkrantz
c587152eba
zink: remove ctx references from shader compile path
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:31 -04:00
Mike Blumenkrantz
ab4d8ed1e9
zink: make tcs shader generation take screen param
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:31 -04:00
Mike Blumenkrantz
da10f13de9
zink: move pending prim type to gfx pipeline struct
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842 >
2021-09-15 23:52:31 -04:00
Dave Airlie
259e26e5e3
llvmpipe/cs: rework coroutine context handling (v2)
...
Get comfy.
llvmpipe coroutines have a stack frame. This is created by hooking
in malloc and coro.alloc and coro.size intrinsics.
LLVM has an CoroElide pass that is meant to allow that stack frame
to be done as an alloca in the caller instead of using the malloc path.
The CoroElide pass relies on the coroutine being inlined (fixed that).
The CoroElide pass relies on there being a direct connect between
coro.destroy(i8 *arg) and arg = coro.begin(id). However due to the
way the compute shaders are launched, there is no way to ensure that
link. Fixing the CoroElide pass seems quite difficult, I considered
having a force CoroElide always flag to make it dtrt, however I'm not
sure how ugly that would end up.
My first attempt tried to preallocate the stacks at a fixed size,
this turned out to be naive as the stack frame size was not sized
like I expected. Instead the first coro to run allocs enough for
everyone, so avoid the massive amounts of small allocations.
This remove coro malloc from a lot of profiles and shaves another 30s
or so from OpenCL ./conversions/test_conversions uchar_uin
(from 4.40m to just under 4m on my ryzen 7 1800x)
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:34 +10:00
Dave Airlie
8d3e97344c
llvmpipe: shorten hold time on the screen mutex
...
There is no requirement to hold this mutex over the wait. I doubt
it matters much in practice.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:29 +10:00
Dave Airlie
4ccee031e9
gallivm/coro: use a phi instead of alloca
...
this just matches what the docs recommend
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:27 +10:00
Dave Airlie
69109e0b19
llvmpipe/cs: rework thread pool for avoid mtx locking
...
This helps reduced the mtx lock/unlock overheads for the threadpool
if the work evenly distributes across the number of threads.
The CL CTS conversions tests really hit this, and this takes maybe 10-20s
off a 5min test run.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432 >
2021-09-16 13:21:06 +10:00
Mike Blumenkrantz
53aade0ef0
zink: fix enabled vertex buffer mask calculation
...
the mask can't entirely be calculated based on the integer parameters,
as it's possible for some of the "bind" slots to actually be unbinds,
so remove bits as necessary to fix this
also add some debug asserts to ensure I don't break this again for the
tenth time
Fixes: 6dd02a5139 ("zink: stop using util_set_vertex_buffers_mask()")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12871 >
2021-09-16 01:43:40 +00:00
Icecream95
09bb8602f3
pan/bi: Don't set dependencies for +BLEND in blend shaders
...
The dependency wait should already have been done in the fragment
shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12461 >
2021-09-15 22:42:03 +00:00
Dave Airlie
d9a784520a
lavapipe: enable dynamic index ubo/ssbo
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689 >
2021-09-16 08:05:59 +10:00
Dave Airlie
fc0bf57632
gallivm/ssbo: cast ssbo index to int type.
...
Since these can be loaded from ubos or other places now.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689 >
2021-09-16 08:05:56 +10:00
Dave Airlie
1ccac4abff
gallivm/ssbo: fix up dynamic indexed ssbo load/stores/atomics
...
Although the index has to be dynamically uniform, if we don't ever
execute a few lanes then we'll have 0, so it important to read the
ssbo index from the first active lane.
Just loop over them all.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689 >
2021-09-16 08:05:51 +10:00
Eric Engestrom
2585d2d6fb
docs: shorten "last release" note to fit on the website without horizontal scrolling
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12798 >
2021-09-15 22:24:26 +01:00
Eric Engestrom
810184e27e
docs: add plan for 21.3.x release cycle
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12397 >
2021-09-15 20:47:26 +00:00
Jesse Natalie
3415bf0268
egl: Add a basic Windows driver
...
This is enough to run wglgears ported to EGL (desktop GL)
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
06e95693fb
egl: Detect Windows platform using GDI
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
58389dd55f
egl: Don't try to dereference native displays unless there's a detectable platform
...
Not all native displays are pointers to dereferenceable memory, e.g.
DCs on Windows. Don't bother dereferencing if no platforms are available
that can be detected that way.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
eb7d150743
egl: Use the .def file for Windows
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
e775b07c17
egl: Add wgl/gallium dependencies for Windows platform
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
e76db0f165
meson, egl: Support building for the Windows platform
...
Add a stub EGL driver for Windows
Fix compiler issues in egl/main
Ensure Windows build produces libEGL.dll
Default EGL to enabled for Windows when building a Gallium driver
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
b8a23fa893
meson: Include EGL after gallium
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
9716209761
wgl: Add stw_* DLL exports for EGL support
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
0574265256
wgl: Swap buffers via pointer instead of HDC
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
90d2b93731
wgl: Add a stw_dev getter
...
Data imports need to be marked __declspec(dllimport), so
just export a function instead of data.
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
bb706ca93a
wgl: Use HWND instead of HDC as primary framebuffer handle
...
EGL's native window is an HWND, so this removes the need to
GetDC from the creation path there.
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
ddedf59625
wgl: Add an explicit iPixelFormat for context creation
...
If it's 0, then it's looked up from the framebuffer for the specified HDC
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
9c875b040c
wgl: Un-inline helpers which use stw_own_mutex
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
7d96e19b92
wgl: Add iPixelFormat to stw_pixelformat_info
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
49d83de072
wgl: Split DrvReleaseContext to support unbind via pointer
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
c4806ae03c
wgl: Make contexts current with framebuffers instead of HDCs
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
be9f9886fe
wgl: Allow creating framebuffers that aren't in the global window list
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
8b9b5cdbf4
wgl: Make contexts current with pointer instead of DHGLRC
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
0d3a215819
wgl: Pass share context as pointer instead of DHGLRC
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Jesse Natalie
ca1cceeed5
wgl: Create contexts and DHGLRCs separately
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727 >
2021-09-15 20:17:31 +00:00
Mike Blumenkrantz
6a240a1c95
zink: stop setting nr_samples for null surfaces
...
this is a special value that shouldn't be set
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12875 >
2021-09-15 19:41:51 +00:00
Mike Blumenkrantz
8e9ec440af
zink: don't copy inner surface refcount
...
this leaks surfaces. lots of surfaces.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12875 >
2021-09-15 19:41:51 +00:00
Dave Airlie
929db0a818
intel/decode/gfx6: add support for gfx6 CC/VIEWPORT pointers.
...
These have 3 sub states encoded and valid fields on SNB.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12864 >
2021-09-16 05:13:16 +10:00
Samuel Pitoiset
09ef427f94
radv/ci: add a list of expected failures for VanGogh
...
Empty means 100% passrate like Sienna Cichlid.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12872 >
2021-09-15 18:20:07 +02:00
Guilherme Gallo
7244aa1980
gitlab-ci: refactor timeout constants and tweak timeout values
...
* Refactor timeouts and retry attempts constants to variables in the top
of the python script.
* Increase LAVA job timeout value from 1 minute to 5 minutes, since the
timeout detection is just a heuristic based on the log silence in LAVA
devices. If we keep 1 minute timeout, maybe we could cancel jobs that
have tasks which may take too long to respond. Also, one minute
timeout is prone to misdetect scenarios when some network errors or
slowness may happen.
* Increase polling rate to check if the job has started from 1 check
every 30 seconds to 1 check every 10 seconds. Since it was taking 30
seconds in the worst case to start to get the log output from a LAVA
job. It is important to note that some LAVA jobs take less than 2
minutes to finish, so a 10 second wait would be more suitable in those
cases.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12870 >
2021-09-15 15:12:52 +00:00
Filip Gawin
4655196796
r300: make global variables const (if possible)
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12860 >
2021-09-15 14:53:17 +00:00
Filip Gawin
765b3b3b11
r300: fix usage of COVERED_PTR_MASKING_ENABLE for r500
...
http://developer.amd.com/wordpress/media/2013/10/
R5xx_Acceleration_v1.5.pdf
On page 281 you can see that register ZB:ZB_BW_CNTL
is using 19th bit for enabling this feature on r500.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12861 >
2021-09-15 14:41:19 +00:00
Samuel Pitoiset
3bb5082900
radv: advertise EXT_shader_atomic_float2 with LLVM 14+
...
The intrinsics aren't exposed on earlier LLVM versions.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
7a25451752
ac/llvm: implement nir_intrinsic_global_atomic_{fmin,fmax}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
9deee80f51
ac/llvm: implement nir_intrinsic_shared_atomic_{fmin,fmax}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
efe40c98ed
ac/llvm: implement nir_intrinsic_ssbo_atomic_{fmin,fmax}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12716 >
2021-09-15 14:10:42 +00:00
Samuel Pitoiset
cf3e31fd11
ac/llvm: implement nir_intrinsic_image_deref_atomic_{fmin,fmax}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12716 >
2021-09-15 14:10:42 +00:00
Marek Vasut
9373db5d94
freedreno: a2xx: Handle samplerExternalOES like sampler2D
...
There should be no difference in handling these two samplers,
handle GLSL_SAMPLER_DIM_EXTERNAL just like GLSL_SAMPLER_DIM_2D
to fix "unimplemented sampler 6" error in case someone tries to
use samplerExternalOES in shader program.
Signed-off-by: Marek Vasut <marex@denx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12817 >
2021-09-15 13:50:01 +00:00
Iago Toral Quiroga
09cb4e3010
v3dv: start using Broadcom's device identifiers
...
Instead of creating our own based on the V3D version. CTS waivers
are registered using a combination of VendorID and DeviceID, so if
we want to reuse any wavers filed by Broadcom we want to use the
same identifiers. We are already using the Broadcom VendorId, so
let's start using the same deviceID as well.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12865 >
2021-09-15 12:54:48 +00:00
Samuel Pitoiset
3a26dfe761
radv/llvm: fix vertex input fetches with 16-bit floats
...
Not ideal but ac/llvm and RADV works with integers, so passing a
16-bit float type would break more than it helps.
Fixes a few CTS with 16-bit float IO.
Fixes: 3fb229e010 ("ac,radeonsi: load VS inputs at the call site of nir_intrinsic_load_input")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12835 >
2021-09-15 11:48:01 +00:00
Juan A. Suarez Romero
7d5aea9edf
ci/v3d: add piglit flake
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12866 >
2021-09-15 12:55:42 +02:00
Samuel Pitoiset
5eda8e5fe9
radv/llvm: fix using Wave32
...
The Wave32 pass manager has been removed a while ago.
Fixes: 94a1f45e15 ("ac/llvm: set target features per function instead of per target machine")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12833 >
2021-09-15 12:31:32 +02:00
Samuel Pitoiset
9bf977ffa5
radv: reduce SQTT traffic when instruction timing is disabled
...
Some tokens can be excluded without instruction timing. This reduces
RGP capture sizes significantly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12853 >
2021-09-15 10:48:58 +02:00
Joshua Ashton
fe96cea2f3
radv: Disable DCC on storage images that cannot support DCC image stores
...
Additional work is needed for storage images with DCC without DCC image stores to not be broken.
Fixes black screens in Doom Eternal.
Fixes : #5345
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12818 >
2021-09-15 00:21:04 +00:00
Emma Anholt
aed4c0b5a9
nir: Drop the unused instr arg for src/dest copy functions.
...
Now that we don't use ralloc, we don't need this arg to get at the right
ralloc ctx.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:06 +00:00
Emma Anholt
879a569884
nir: Switch from ralloc to malloc for NIR instructions.
...
By replacing the 48-byte ralloc header with our exec_node gc_node (16
bytes), runtime of shader-db on my system across this series drops
-4.21738% +/- 1.47757% (n=5).
Inspired by discussion on #5034 .
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:06 +00:00
Emma Anholt
feee5e6974
nir/tests: Fix transmuting an SSA dest to be non-SSA
...
With the de-ralloc changes, having the register dest not have its .reg
properly initialized caused crashes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:06 +00:00
Emma Anholt
1edff520e2
nir/lower_phis_to_scalar: Use nir_instr_free() to free instrs.
...
Preparation for de-rallocing instrs.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:06 +00:00
Emma Anholt
d1a2870f78
nir: Add all allocated instructions to a GC list.
...
Right now we're using ralloc to GC our NIR instructions, but ralloc has
significant overhead for its recursive nature so it would be nice to use a
simpler mechanism for GCing instructions.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:06 +00:00
Emma Anholt
22788d68eb
nir: Consistently pass the instr to nir_src_copy().
...
The arg says it's supposed to be the instr, not the shader.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:05 +00:00
Emma Anholt
5e37cfb7fe
nir: Consistently pass the shader to the shader arg of instr creation.
...
We were using the ralloc parent in some places, which should work out to
be the shader I think, but to de-ralloc the instrs we should just pass the
existing shader pointer in.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:05 +00:00
Emma Anholt
7a4bbe60c1
nir/from_ssa: Use nir_instr_free() to free instrs instead of ralloc.
...
This code was being tricky with passing a mem_ctx instead of the shader,
then freeing the mem_ctx when the pass was done and all the parallel
copies had been removed from the shader. Use the right type for instr
creation and do a bit of manual list management to prepare the way for
non-ralloc NIR instrs.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:05 +00:00
Emma Anholt
b99efb8af0
nir: Pull the instr list free function out to a helper.
...
With the de-rallocing, we're going to have some more places that free a
list of instrs.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:05 +00:00
Emma Anholt
36d9bdca0b
nir: Add a nir_instr_free() to replace ralloc_free(instr).
...
This will gain another step shortly.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776 >
2021-09-14 17:53:05 +00:00
Ian Romanick
7956a701d8
nir/lower_gs_intrinsics: Make nir_lower_gs_intrinsics be idempotent
...
Calling this lower pass twice in a row would cause spurious
set_vertex_and_primitive_count(0, undef) intrinsics after the proper
set_vertex_and_primitive_count intrinsic. This pretty much turns any
geometry shader into garbage.
Fix this by treating nir_intrinsic_emit_vertex_with_counter and
nir_intrinsic_end_primitive_with_counter just like the non-_with_counter
versions. If no blocks would need set_vertex_and_primitive_count
intrinsics added, exit the pass before doing any work. This prevents
the need for DCE to do extra clean up later.
Since this pass is potentially called multiple times via multiple
invocations of a finalize_nir callback, it is (hypothetically?) possible
that control flow could be changed to add new blocks that need this
intrinsic. The check implemented in this commit should be robust
against that possibility.
v2: Add a_block_needs_set_vertex_and_primitive_count. Suggested by
Timur.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12802 >
2021-09-14 09:13:07 -07:00
Ian Romanick
edf357b233
nir/lower_gs_intrinsics: Return progress if append_set_vertex_and_primitive_count makes progress
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: 542d40d698 ("nir: Add new GS intrinsics that maintain a count of emitted vertices.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12802 >
2021-09-14 09:12:47 -07:00
Marek Olšák
7b4427b199
radeonsi: enable NGG passthrough when LDS is used, document the real constraints
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
70c975fd13
radeonsi: fix incorrect comments about VGT_SHADER_STAGES_EN
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
0b5c1537aa
radeonsi: don't set edgeflags for TES and blit VS
...
they are disabled (TES) or have no effect (blit VS)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
b330c7cb2a
radeonsi: use a trick to extract and pack edgeflags using fewer instructions
...
This removes 4 instructions from the prim export packing.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
2d8dfb9111
radeonsi: convert gfx10_emit_ge_pc_alloc to radeon_opt_set_uconfig_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
edb5fa4d59
radeonsi: eliminate redundant SPI_SHADER_PGM_RSRC3/4_GS register writes
...
They don't change much.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
3df035d08c
radeonsi: put si_pm4_state at the beginning of si_shader
...
instead of allocating it separately. This removes pointer indirections.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
73c82570cb
radeonsi: move setting one GS shader key field out of si_shader_selector_key
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
99c5e03986
radeonsi: move setting most TCS shader key fields out of si_shader_selector_key
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
fb04378e76
radeonsi: set prefer_mono outside of si_shader_selector_key
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5824ab569e
radeonsi: precompute more spi_map code
...
This replaces vs_output_param_offset by vs_output_ps_input_cntl,
which is easier to use.
For geometry shaders, vs_output_ps_input_cntl is stored in the GS si_shader
structure, not gs_copy_shader. This requires that gs_copy_shader compilation
is finished before the GS main shader part, so that GS can initialize
vs_output_ps_input_cntl using the compiled GS copy shader.
output_semantic_to_slot becomes unused, so it's removed.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
dba914de85
radeonsi: unroll loops in si_emit_spi_map using 33 C++ template instantiations
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
3264372539
radeonsi: inline si_get_ps_input_cntl because it has only one use
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5f090891e9
radeonsi: simplify si_emit_spi_map for back-face colors
...
Just precompute what we need in si_shader_info.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
57f9452b46
radeonsi: precompute num_interp for si_emit_spi_map
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
46802f7b60
radeonsi: interleave si_shader_info::input_* in memory for faster emit_spi_map
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
11d1309d82
radeonsi: restructure si_get_ps_input_cntl for future refactoring
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
b59bb9c07a
radeonsi: force flat for PrimID early in si_nir_scan_shader
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5cdbbcc2ab
radeonsi: eliminate a not-found conditional for PrimID in si_get_ps_input_cntl
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
3ea3621b8d
radeonsi: determine num_vbos_in_user_sgprs from template arguments in draw_vbo
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
a65f99b2d1
radeonsi: deduplicate si_compiler_ctx_state initialization
...
to remove it from si_update_shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
7a20110ad3
radeonsi: precompute si_vgt_stages_key for NGG in si_shader
...
to remove this overhead from si_update_shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5a131566b1
radeonsi: move flat shading VRS enablement out of si_update_shaders
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
eed149aa7c
radeonsi: move DB_SHADER_CONTROL update for PS out of si_update_shaders
...
It only depends on the pixel shader CSO and alpha test.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
70220a1896
radeonsi: check flatshade and sprite_coord_enable for spi_map in bind_rs_state
...
it doesn't need to be in si_update_shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
2dfe01db01
radeonsi: optimize scratch buffer size updates using C++ template arguments
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
98d07e1928
radeonsi: make si_update_shaders a C++ template in si_state_draw.cpp
...
This reduces driver overhead.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
dff6dc0316
radeonsi: unset SI_PREFETCH_* only when we unbind pm4 shader states
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
76fe6a0242
radeonsi: move PS inputs_read computation out of si_get_vs_key_outputs
...
to reduce overhead of si_update_shaders
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
35a42377cd
radeonsi: move si_shader_io_get_unique_index calls out of si_get_vs_key_outputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
6d1ab77a8f
radeonsi: rewrite inlinable uniform states for shader keys in si_context
...
directly update the shader keys in si_context
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
aed93eb991
radeonsi: update the VS shader key in set & bind functions and remove memsets
...
This decreases overhead of si_update_shaders and overall driver overhead.
The VS shader key portion related to VS inputs is updated in set & bind
functions. Other fields related to outputs are still updated
in si_shader_selector_key.
Now that all modified fields are set to 0 when not needed, and remove
the memsets.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
74a0c9bd51
radeonsi: clean up and clear VS shader key fields related to outputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
dbdde903bb
radeonsi: update most of the PS shader key in set & bind functions
...
This decreases overhead of si_update_shaders and overall driver overhead.
There is only one function that depends on the rasterized primitive type,
and thus it can't be moved to set & bind functions.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
7e3c03bc6a
radeonsi: ignore blitter when computing the PS shader key
...
it doesn't have any effect
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
00d1d947ea
radeonsi: divide si_update_ps_shader_key into many separate functions
...
they will be used in bind functions etc.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
59072ee484
radeonsi: don't memset part in si_update_ps_shader_key
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
60580c04c0
radeonsi: don't memset mono and opt in si_update_ps_shader_key
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
46bda71a54
radeonsi: move PS shader key code into a separate function
...
There is reordering and new comments.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
a912c80439
radeonsi: sink memsets and disable uniform inlining in si_shader_selector_key
...
to facilitate refactoring. Uniform inlining will be re-enabled later.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
0b1fd84950
radeonsi: handle NO_OPT_VARIANT in si_shader_select_with_key
...
so as not to change the keys in si_context
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
03b5a94258
radeonsi: add const to the key parameter in si_shader_select_with_key
...
The keys will match the current state, so we shouldn't change them.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Mike Blumenkrantz
361a7d2451
compiler/spirv: add a fail if tex instr coord components aren't dimensional enough
...
this is really hard to pin down later on, so catch it here instead
gotta have those dimensions.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12825 >
2021-09-14 13:54:24 +00:00
Charlie Turner
c38318aee2
radv/ci: Fix the GPU_VERSION for polaris10
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11426 >
2021-09-14 11:31:26 +00:00
Charlie Turner
b75dc87762
radv/ci: Remove duplication in dEQP skip lists.
...
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Martin Peres <martin.peres@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11426 >
2021-09-14 11:31:26 +00:00
Charlie Turner
852904e9fd
ci: Support per-driver skip lists.
...
In addition to a global skip list introduced in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11333
(enabled by
https://gitlab.freedesktop.org/anholt/deqp-runner/-/merge_requests/4 )
it is also useful to have a per-driver skip list in addition to a
per-gpu list. Now, there are multiple levels at which skips can be
specified, from least to most specific,
- (deqp|piglit)-all-skips.txt :: affecting all tests
- (deqp|piglit)-$(DRIVER_NAME|VK_DRIVER|GALLIUM_DRIVER)-skips.txt ::
affecting the specified driver
- (deqp|piglit)-$GPU_VERSION-skips.txt :: affecting a specific GPU
This idea could be useful for -fails.txt as well.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Martin Peres <martin.peres@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11426 >
2021-09-14 11:31:26 +00:00
Connor Abbott
e43797ab13
freedreno, turnip: Disable 8bpp UBWC on a650
...
While it doesn't immediately hang like on a660, it seems to be buggy and
the blob disables it.
This fixes a bunch of r8_* dEQP-VK tests, which seem to pass
individually but don't work when run after other tests. For example this
fixes failures running dEQP-VK.pipeline.sampler.*.r8_uint*.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12830 >
2021-09-14 11:11:39 +00:00
Tomeu Vizoso
f86517be7f
panfrost/ci: Enable test runs on G72
...
Looks pretty stable now!
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12850 >
2021-09-14 12:39:41 +02:00
Danylo Piliaiev
b1eb088792
turnip/kgsl: fix compilation after perfetto introduction
...
Perfetto isn't supported with kgsl at the moment. Make stubs for
missing functions.
Fixes: 3dd1bb6355 "turnip: implement basic perfetto support"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5352
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12837 >
2021-09-14 09:34:45 +00:00
Kenneth Graunke
1cd868f105
iris: Add some accessor wrappers for a few fields.
...
In the future, we're going to have "real" BOs representing GEM objects,
and "slab allocated" BOs suballocated out of a larger BO. Many fields
are properties of the real underlying BO, but we may still want to ask
about an arbitrary BO, and have the accessor chase answers down as
necessary.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12848 >
2021-09-14 07:36:44 +00:00
Kenneth Graunke
e4c3d3efc7
iris: Defer construction of the validation (exec_object2) list
...
When I wrote this code originally, I decided to try and construct the
validation list up front, rather than at submission time. That worked
okay, but it's not really necessary. It's a fair amount of data to
store (struct drm_i915_gem_exec_object2 is 56 bytes per object), when
we can easily construct it on the fly.
More importantly, with suballocation, batch->exec_bos[i] may have
multiple entries corresponding to a single validation list entry.
Rather than tracking two lists with an awkward mapping between them,
we choose to just store the BO list and generate the other on the fly.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12848 >
2021-09-14 07:36:44 +00:00
Kenneth Graunke
2f0eccf647
iris: Track written BOs via a bitfield rather than exec_object2 entries
...
When we start suballocating BOs, multiple logical BOs may map to the
same GEM object, and thus share a validation list entry. However, we
want to track whether logical BOs are written, to avoid unnecessary
cross-batch data dependencies.
Just track that in a bitfield instead, where bit i corresponds to
batch->exec_bos[i].
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12848 >
2021-09-14 07:36:44 +00:00
Kenneth Graunke
795b14aaa3
iris: Rewrite bo->index comment to refer to exec_bos[]
...
batch->validation_list[] will be going away shortly, but exec_bos[]
will live on. bo->index is the index into both lists, so we can just
refer to the one we're not about to delete.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12848 >
2021-09-14 07:36:44 +00:00
Dave Airlie
4149a60209
crocus/gen7: add missing IVB/GT2 geom shader workaround.
...
Noticed this in passing.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12847 >
2021-09-14 07:03:36 +00:00
Mike Blumenkrantz
be35fdae5f
zink: add some debug asserts to validate imageless framebuffer correctness
...
not sure if these matter enough to assert on but they're annoying to track down
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Mike Blumenkrantz
0734484058
zink: update surface info when rebinding to storage
...
fixes some validation for imageless framebuffer usage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Mike Blumenkrantz
ad57bb1b7d
zink: force imageless fb rebind if rebinding an attachment
...
ensure that the STORAGE usage gets picked up here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Mike Blumenkrantz
372f7d4726
zink: be smarter about fb surface rebinds
...
the aspect info lets us avoid unnecessary comparisons
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Mike Blumenkrantz
46a262dc1e
zink: wrap framebuffer surfaces to preserve gallium expectations
...
gallium needs pipe_surface::context to reflect the context used to create
the surface, but zink caches surfaces, so instead return a wrapper object
that can be destroyed without blowing up the stack
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Mike Blumenkrantz
01f00eb90d
zink: move surface and bufferview caches onto resources
...
this makes the locking smaller in scope and also make the lookups faster
due to having smaller populations in the hash tables
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Mike Blumenkrantz
e28df76c3a
zink: add a resource reference for bufferviews
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Mike Blumenkrantz
32cf036cb7
zink: assert surface geometry
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843 >
2021-09-14 05:47:47 +00:00
Jordan Justen
333b2185d8
intel/isl: Enable MOCS 61 for external surfaces on TGL
...
Reworks:
* Lionel/Francisco: Add comment
Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12292 >
2021-09-14 05:33:53 +00:00
Mike Blumenkrantz
0f812e1295
zink: unset src access in barriers if there's no src pipeline stages
...
this is a partial barrier, so having access of any kind is invalid
VUID-vkCmdPipelineBarrier-srcAccessMask-02815(ERROR / SPEC): msgNum: 618171435 - Validation Error: [ VUID-vkCmdPipelineBarrier-srcAccessMask-02815 ] Object 0: handle = 0x2834530, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x24d88c2b | vkCmdPipelineBarrier(): .pImageMemoryBarriers[0].srcAccessMask bit VK_ACCESS_TRANSFER_READ_BIT is not supported by stage mask (VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT). The Vulkan spec states: The srcAccessMask member of each element of pMemoryBarriers must only include access flags that are supported by one or more of the pipeline stages in srcStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdPipelineBarrier-srcAccessMask-02815 )
Objects: 1
[0] 0x2834530, type: 6, name: NULL
zink DEBUG: ERR: 'Validation Error: [ VUID-vkCmdPipelineBarrier-srcAccessMask-02815 ] Object 0: handle = 0x2834530, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x24d88c2b | vkCmdPipelineBarrier(): .pImageMemoryBarriers[0].srcAccessMask bit VK_ACCESS_TRANSFER_READ_BIT is not supported by stage mask (VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT). The Vulkan spec states: The srcAccessMask member of each element of pMemoryBarriers must only include access flags that are supported by one or more of the pipeline stages in srcStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdPipelineBarrier-srcAccessMask-02815 )'
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12845 >
2021-09-14 04:19:13 +00:00
Mike Blumenkrantz
904261b985
zink: unset barrier info if resource object no longer has usage after reset
...
this avoids spurious barriers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12845 >
2021-09-14 04:19:13 +00:00
Mike Blumenkrantz
ecf5d706ef
zink: move barrier info to resource object struct
...
this is a bit more accurate
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12845 >
2021-09-14 04:19:13 +00:00
Mike Blumenkrantz
cb65ac9bdf
zink: add return values for resource usage unsetting
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12845 >
2021-09-14 04:19:13 +00:00
Kenneth Graunke
d3b72d49cb
glsl: Assert that lower_blend_equation_advanced is only called for FS
...
It only makes sense to call this pass for fragment shaders, and the
first thing the pass does is read a FS-specific field out of a union,
so it isn't safe to call it for other shader stages.
We could make it early return, but instead we just assert, so that
drivers know to only call it when appropriate.
(A previous version of this patch, which early returned instead of
asserting, was Reviewed-by: Emma Anholt <emma@anholt.net > as well.)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12839 >
2021-09-14 03:55:05 +00:00
Kenneth Graunke
bec8f8fde8
i965: Only call lower_blend_equation_advanced for fragment shaders
...
i965 called this pass unconditionally, while st/mesa only calls it for
fragment shaders. It only makes sense to run for fragment shaders, and
the first thing the pass does is read a FS-specific field out of a
union. This isn't safe for other stages.
Fixes about 20,630 test failures on i965 since 91dc863921 , which moved
the advanced_blend_modes field. The field had previously been in a
union with no other fields, so it never aliased anything, and thus
worked, even if it was wrong. That commit moved it to a union that had
fields for other stages, so it started reading garbage and trying to
lower advanced blending for other stages on i965.
Fixes: 91dc863921 ("mesa: Move the advanced blend bitmask to shader_info.")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12839 >
2021-09-14 03:55:05 +00:00
Mike Blumenkrantz
ca92a0d1ae
zink: fix some return values
...
the function used to return the layout directly
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12844 >
2021-09-14 03:43:36 +00:00
Mike Blumenkrantz
28386d0db5
zink: unconditionally support conditional rendering
...
this lets drivers that don't support the vk ext provide support
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12801 >
2021-09-14 03:30:49 +00:00
Mike Blumenkrantz
f54cde75d7
zink: fix dmabuf cap export
...
this requires a lot more than just one extension
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
9ec9289385
zink: add dmabuf fd handling
...
just gotta get it out of the underlying graphics layer
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
651def5896
zink: use foreign queue import for dmabufs
...
this is required to get image data
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
7d2de96847
zink: fix import pNext attachment during image creation
...
there's better checks for this now, so the weird pNext handling here
can be simplified
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
5b827b0a39
zink: handle image creation for dmabufs
...
these use PREINIT layout
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
2a63f38cb1
zink: set a flag for dmabuf init
...
this will be useful for barrier handling
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
3bd98d4bf6
zink: split import and export fd handle types
...
these can maybe be different
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
6f7fe12fd4
zink: hook up VK_EXT_queue_family_foreign
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
2b98fba806
zink: add dmabuf modifier query hooks for screen
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
b359950b0f
zink: hook up dmabuf ext
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Anuj Phogat
18477f60e2
intel/dg2: Add L3 configuration
...
Rework:
* Jordan: Merge dg1/dg2 into empty_l3_list
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12711 >
2021-09-14 02:51:03 +00:00
Jordan Justen
4620f8334f
intel/dev: Add is_dg2 to devinfo
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12711 >
2021-09-14 02:51:03 +00:00
Mike Blumenkrantz
727e10d290
zink: use smallest int type possible for decompose shader key
...
this reduces the component key size for decomposition by up to 75%, down
to as low as 2 bytes, which is more optimal for both hashing and memcmp of
the key
it will become more useful as further changes are added to improve vertex format
support, enabling the keysize to remain relatively small
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771 >
2021-09-14 01:55:56 +00:00
Mike Blumenkrantz
1542f3eb47
zink: decompose vertex attribs into single components when not supported
...
this avoids vbuf in a lot more cases on radv where 3component attribs aren't supported
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771 >
2021-09-14 01:55:56 +00:00
Mike Blumenkrantz
c106c45a99
zink: add function for decomposing vertex format to single component
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771 >
2021-09-14 01:55:56 +00:00
Marek Olšák
9df5ebe5bf
radeonsi: fix DCC image stores with image descriptors in user SGPRs
...
The bug workaround was not applied there.
Fixes: 34a2c75310 - radeonsi: enable DCC stores on gfx10.3 APUs for better performance
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
921c770d49
driconf: remove leftover code for allow_incorrect_primitive_id
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
a5ea2ef93e
radeonsi: copy a few nir_shader_compiler_options from RADV
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
3d1ca01e41
radeonsi: fix DCC image stores with display DCC
...
Fixes: 34a2c75310 - radeonsi: enable DCC stores on gfx10.3 APUs for better performance
Tested-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Kai Wasserbäch
d4f7337d14
fix(clover/llvm): update code to build with recent versions of LLVM 14 (Git)
...
`hasAttribute()` in `llvm::AttributeList` is gone, use `hasParamAttr()` instead.
This fixes an FTBFS.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12826 >
2021-09-13 22:10:49 +00:00
Jordan Justen
c7d8a69249
intel/devinfo: Add devinfo->max_scratch_ids
...
This consolidates several duplicated pieces of code into devinfo.
max_scratch_ids is an array that provides the max number of threads
for the rendering and compute stages.
This fixes some exceptions missed by crocus for scratch ids on haswell
and cherryview.
It also fills out devinfo->max_scratch_ids properly for stages VS
through CS on Gfx12.5. But, functionally this should not make a
difference as Gfx12.5 already uses COMPUTE for all stages.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12799 >
2021-09-13 13:26:51 -07:00
Jordan Justen
32e848aeaa
intel: Move subslice_total into devinfo
...
Reworks:
* Move asserts for subslice_total into intel_device_info.c (s-b Ken)
* Drop now unused intel_device_info_subslice_total (s-b Ken)
* Add comment for subslice_total (Ken)
Suggested-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12799 >
2021-09-13 13:26:23 -07:00
Simon Ser
3c18e69078
vulkan/wsi/x11: add driconf option to not wait under Xwayland
...
By default, Mesa's X11 Vulkan WSI will wait for buffers to be ready
before submitting them to Xwayland when the swapchain is created
with the IMMEDIATE mode.
This is undesirable when the Wayland compositor already monitors
fences. A Wayland compositor may want to know the delay between
the buffer submition and the end of the GPU work, this is impossible
to measure if the WSI waits for the buffer to be ready before
submission.
Since most compositors don't monitor fences, let's introduce a driconf
option for this for now. We can reconsider once more compositors
have better support for fences.
Signed-off-by: Simon Ser <contact@emersion.fr >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11290 >
2021-09-13 19:38:13 +00:00
Emma Anholt
91dc863921
mesa: Move the advanced blend bitmask to shader_info.
...
For drivers that don't lower advanced blend to FBFETCH, we need the
bitmask to be in the NIR shader so that it gets carried over to TGSI
successfully.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12813 >
2021-09-13 18:36:58 +00:00
Mike Blumenkrantz
a45c84f226
zink: fix ZINK_MAX_DESCRIPTORS_PER_TYPE to stop exploding the stack
...
this isn't the max per type, it's the max that can be used for a type,
which is the max used by a shader stage * the number of shader stages
Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12829 >
2021-09-13 17:46:11 +00:00
Rob Clark
a601cae51c
freedreno: Move a6xx specific screen init
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820 >
2021-09-13 17:21:14 +00:00
Rob Clark
0ee0972a0d
freedreno: Cleanup primtypes/primtypes_mask
...
Move primtypes/primtypes_mask to screen to remove duplicated introduced
by 744ef862b8 .
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5299
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820 >
2021-09-13 17:21:14 +00:00
Rob Clark
1e5730102a
freedreno: Remove unused function
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820 >
2021-09-13 17:21:14 +00:00
Samuel Pitoiset
b269f59ec5
radv: enable comp-to-single for MSAA images
...
This allows fast clears for concurrent MSAA images.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12483 >
2021-09-13 16:43:07 +00:00
Samuel Pitoiset
de8865df56
radv: add MSAA support to the comp-to-single fast clear path
...
Clearing the first sample is enough as long as CMASK is also cleared
to indicate that other samples are also cleared.
I verified that the first sample is always at the beginning of 256B
blocks.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12483 >
2021-09-13 16:43:07 +00:00
Juan A. Suarez Romero
010fbbeff2
ci/v3dv: update flakes
...
dEQP-VK.api.external.fence.opaque_fd.signal_export_import_wait_permanent
became a flake in latest kernel (5.10.60-v8+)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12832 >
2021-09-13 13:56:03 +00:00
Charlie Turner
a356da6357
ci: Fix syntax error in radv fails files
...
Fixes instances of,
Error: Failed to parse dEQP-VK.ssbo.phys.layout.random.8bit.all_per_block_buffers.46 as CSV test,status[,duration] or comment at line 1
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Martin Peres <martin.peres@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12777 >
2021-09-13 13:31:20 +00:00
Charlie Turner
79197dac58
ci: Build libdrm earlier for x86_test-vk
...
VK-CTS v1.2.7.0 has buggy tests that only work if DRM support is
available for them (drm_files_exist). This isn't exposed in the Mesa
CI by other farms, because their infra installs libdrm-dev as part
of either rootfs generation for freedreno/broadcom or respective
container stages (for lava). In the case of radv, we directly use the
x86 Mesa testing containers, so we are the odd ones out here.
By moving the building of the custom libdrm above the building of
vk-gl-cts, it will compile in support required for this test to pass,
ensuring the x86_test-vk container has the right dependencies to match
the rest of the CI. Lava actually installs drm development files
twice, once from the Debian repos, which vk-gl-cts then compiles
against, and a second time from a tarball, which the tests will use at
runtime. Seemed a little cleaner to use the version of libdrm
specified in the Mesa CI, and hence used at both build time and
runtime.
A bug should be raised with the testsuite to avoid this in the future,
but we should probably have libdrm development files exposed for these
components anyway.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Martin Peres <martin.peres@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12777 >
2021-09-13 13:31:20 +00:00
Bas Nieuwenhuizen
afee571d2b
radv: Expose a bufferImageGranularity of 1.
...
It shouldn't matter as image & buffer alignment are enough and we
don't need any alignment between the two.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5213
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12765 >
2021-09-13 13:12:41 +00:00
Juan A. Suarez Romero
9c158fcc70
broadcom: add cl_nobin debug option
...
Dumps the command list, excluding the binary resources.
v2 (Juan):
- Make this option independent from `cl`
v3 (Iago):
- Rename option name
- Fix style issues
- Do not print BO ranges
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12803 >
2021-09-13 08:51:54 +00:00
Juan A. Suarez Romero
d220d8cb51
broadcom/compiler: add V3D_DEBUG_NO_LOOP_UNROLL debug option
...
Disables loop unrolling.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12803 >
2021-09-13 08:51:54 +00:00
Samuel Pitoiset
09cf2584bd
ac/llvm: fix build with LLVM 14
...
AttributeList::hasAttribute() has been replaced by
hasParamAttr()/hasRetAttr().
All supported LLVM versions have hasParamAttr().
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5320
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12715 >
2021-09-13 10:04:30 +02:00
Mike Blumenkrantz
718e9dd133
zink: use descriptor info for ubo hashing
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12824 >
2021-09-13 04:04:58 +00:00
Mike Blumenkrantz
41c3363e07
zink: remove zink_get_resource_for_descriptor()
...
this is no longer useful
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12824 >
2021-09-13 04:04:58 +00:00
Mike Blumenkrantz
3db5c1bfc5
zink: remove bind_stages and bind_history from zink_resource
...
these are no longer used
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
c5a090aa3a
zink: use more accurate generation for buffer barrier pipeline stages
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
793e5dba98
zink: don't generate more pipeline stages if vertex bit is already set
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
a810e58051
zink: use bind_stages for pipeline barrier generation
...
Fixes: be40886521 ("zink: emit descriptor barriers and references during bind")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
18866dc733
zink: remove ZINK_RESOURCE_USAGE_STREAMOUT
...
we can use a bool flag for this instead to be more sensible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
13114ff712
zink: use better check for determining bufferview rebinds
...
we have the bvci here so the actual buffer is still available
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
60bc0fbffa
zink: make a local screen var for buffer replace
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
b5e460cec2
zink: move batch ref when possible during buffer replacement
...
avoid atomics when possible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
d772419dab
zink: add a batch ref when replacing a buffer that has binds and usage
...
any resource with active binds will have exactly 1 ref for the bind, so
if it also has usage, it needs to be destroyed on the batch to avoid
early deletion while it's in use
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
566771ee31
zink: add some asserts for buffer replacement
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
f44d8d8b74
zink: replace a couple checks for bind counts with new inline
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
107866cf7a
zink: add inline for checking whether a resource has any binds
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
468a0fb2b1
zink: set vbo resource usage on bind
...
this is more accurate and avoids setting usage on a batch that could be
flushed before draw
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
891b4497b4
Revert "zink: ci updates"
...
This reverts commit 03489cf519 .
maybe not...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12821 >
2021-09-13 02:38:28 +00:00
Mike Blumenkrantz
eb7d2ef070
zink: initialize zink_descriptor_layout_key::use_count on create
...
Fixes: 95fe2f7b82 ("zink: track active use counts for descriptor layouts")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12821 >
2021-09-13 02:38:28 +00:00
Mike Blumenkrantz
14e9d01aa6
zink: export PIPE_SHADER_CAP_FP16_CONST_BUFFERS
...
this is now functional
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12823 >
2021-09-13 02:13:06 +00:00
Mike Blumenkrantz
a955d89f20
zink: add 8/16bit ubo handling
...
left this out of the original 8/16bit storage implementation somehow,
but it didn't matter since nothing was doing 8/16bit ubo reads
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12823 >
2021-09-13 02:13:06 +00:00
Mike Blumenkrantz
3a3c968de8
zink: clamp instance divisors to max value
...
better than exploding
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12756 >
2021-09-13 01:09:54 +00:00
Mike Blumenkrantz
b483faccb6
zink: remove batch params from barrier functions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770 >
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz
5e17510d51
zink: remove unused barrier function
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770 >
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz
ec2cce6d60
zink: remove batch params from resource copy functions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770 >
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz
ba925cf958
zink: remove batch params from renderpass functions
...
this no longer makes sense to have
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770 >
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz
46b6ecd4ab
zink: move resource unrefs to flush thread
...
unrefs here (almost always) mean destruction, which means eating the cost
of the atomics for the unrefs and then also the destructors
instead, handle this at the end of the next submit from this batch, since the
submit thread is never as busy as the driver thread
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12759 >
2021-09-13 00:38:42 +00:00
Mike Blumenkrantz
03489cf519
zink: ci updates
...
I think these should be more reliable now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783 >
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz
7a03507f3c
zink: document ZINK_DESCRIPTORS env var
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783 >
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz
7c1b7ded7a
zink: add "nofallback" descriptor mode
...
this disables lazy fallback and forces caching always
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783 >
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz
5475a6fe18
zink: fall back to lazy descriptors if too many cache misses in a row
...
in the cases where it's not useful to cache for one reason or another, stop
trying to force it and just go with the flow
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783 >
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz
d3ae8e82d7
zink: split out lazy set updating
...
make this reusable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783 >
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz
815e5c4df9
zink: reorganize cached descriptor updating a bit
...
do per-set updates in each part to stop passing around arrays
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783 >
2021-09-12 23:58:48 +00:00
Ella-0
08b17e029f
ci/v3dv: Update fails with multiview failing with points
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524 >
2021-09-12 21:01:20 +00:00
Ella-0
bd0f9283f8
v3dv: Implement VK_EXT_vertex_attribute_divisor
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524 >
2021-09-12 21:01:20 +00:00
Ella-0
43790a4d08
v3dv: Expose correct point size granularity
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524 >
2021-09-12 21:01:20 +00:00
Ella-0
7bf707f6d6
v3d: Don't handle PIPE_SPRITE_COORD_UPPER_LEFT twice
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524 >
2021-09-12 21:01:20 +00:00
Ella-0
53ae5c3aae
v3d/compiler: Handle point_coord_upper_left
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524 >
2021-09-12 21:01:11 +00:00
Joshua Ashton
138463d3c3
radv: Fix DCC image store check
...
Doesn't seem to be causing any issues right now but could with modifiers potentially.
Matches what is in RadeonSI where the comment is also shamelessly stolen from.
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12811 >
2021-09-11 05:58:06 +00:00
Marek Olšák
eddb65ffb0
radeonsi: don't use NGG passthrough if culling is possible for better perf
...
Switching NGG passthrough on/off decreases performance because it causes
context rolls.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
0e64252912
radeonsi: add AMD_DEBUG=ib to print IBs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
2817ca1aef
radeonsi: don't emit PA_SU_POLY_OFFSET_CLAMP if it has no effect
...
this is more efficient even
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
1d4e47e1db
radeonsi: remove a few fields from si_state_rasterizer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
1f8be99621
radeonsi: enable shader-based prim culling with polygon mode
...
Polygon mode should have no effect on culling, so keep it enabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
af7c6720de
winsys/amdgpu: include CS ioctl overhead in RADEON_NOOP
...
submit an empty IB instead of skipping the ioctl
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
64a06f8167
radeonsi: skip setting some PGM_HI registers by switching to 32-bit addresses
...
Other registers benefit from consecutive register offsets for the smallest
command buffer size.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
a2a7610e1f
radeonsi: strengthen the VGT_FLUSH condition in begin_new_gfx_cs
...
Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
8d7846cfed
radeonsi: reduce the frequency of switching GS fast launch on/off
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
468135abab
winsys/amdgpu: precompute amdgpu_ib_max_submit_dwords
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
576f8394db
radeonsi: remove the primitive discard compute shader
...
It doesn't always work, it's only useful on gfx9 and older, and it's too
complicated.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4011
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
9e994560ff
radeonsi: correct index_bias_varies usage
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
f734152b62
radeonsi: don't update shaders if only the vertex element count changes
...
Only check if the relevant fields changed.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
58f0ca8685
radeonsi: accurately check if instance divisors need a VS update
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
ece92ecc35
radeonsi: ignore the vertex element count in si_shader_selector_key_vs
...
It's always at least num_inputs, so just use num_inputs.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
0186c788b6
radeonsi: don't set prefer_mono for fetched instance divisors
...
It's not necessary because the overhead is very low and the comment isn't
true anymore. (the divisions are fast now)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Icecream95
1976f4980c
lima: Add a noop drm-shim
...
Hard-code Mali450 with six cores for now, matching the hardware I
have.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12737 >
2021-09-10 21:34:36 +00:00
Daniel Schürmann
eb8ec12b23
aco/ra: Fix potential out-of-bounds array accesses.
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12748 >
2021-09-10 19:39:18 +00:00
Timur Kristóf
536580b139
aco: Add some useful info to the README for debugging.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12748 >
2021-09-10 19:39:18 +00:00
Michel Dänzer
c10cb38a5c
ci: Put all container related jobs in a single stage
...
GitLab 14.2 supports dependencies between jobs in the same stage.
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12790 >
2021-09-10 18:56:26 +00:00
Tomeu Vizoso
95c1de96ea
ci: Stop adding link to tracie dashboard
...
Besides the sed being broken for some trace names, now we have all
needed information in the artifacts so the dashboard isn't needed.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12675 >
2021-09-10 18:15:45 +00:00
Tomeu Vizoso
d324748e92
ci: Uprev piglit to 99be1b06ff36
...
Brings in these changes:
99be1b06ff36 framework/replay: Display the image differences if any
3074b9c72b3d glsl-predication-on-large-array: Test predication on values from large array
c97da22d35b4 cmake: Fix gbm test compiling
0cbccd68c3c1 piglit: Find our data directory when we're invoked through a symlink
4eb71fc10bbe arb_sso: add test that has explicit locations and array fields in ifc
fa9c82380273 glsl-1.30: test shadow var in a switch
aa7f042b0417 glsl-1.30: add tests for incorrect "compare to 0" optimizations
60138ef32ec1 add explicit tests for GetFragDataLocation/Index(gl_Frag*)
4a8806696b90 egl: add test for EGL_KHR_display_reference
d6b7053b4e52 glsl-1.30: test that switch expression is evaluated once
8023a3c945c3 arb_shader_storage_buffer_object: Require extension on the new test
8820cac60827 pbobench: Fix sometimes-uninitialized warning.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12675 >
2021-09-10 18:15:45 +00:00
Guilherme Gallo
460ce7e75d
gitlab-ci: Implement a simple timeout detection for LAVA jobs
...
* Retry twice if the job does not generates logs for 5 minutes.
* Only active the timeout detection when the job starts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12808 >
2021-09-10 13:01:16 -03:00
Guilherme Gallo
2587fa1570
gitlab-ci: Add sleep for every scheduler.jobs.logs call
...
Add a time.sleep call between proxy.scheduler.jobs.logs calls, since
they do not block. This will relieve some request pressure on LAVA
dispatchers.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12797 >
2021-09-10 12:34:26 +00:00
Danylo Piliaiev
45801e1ecc
turnip: support tracing of gmem/sysmem load/store/clears
...
Now we support per-tile tracing.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969 >
2021-09-10 14:58:28 +03:00
Danylo Piliaiev
4092d5f0d8
u_trace: pass command stream through tracing functions
...
Allows writing timestamps into different command streams.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969 >
2021-09-10 14:58:28 +03:00
Danylo Piliaiev
5c6f0d46e7
turnip/perfetto: reusable command buffers support
...
The limitation is that the reusable command buffer should be created
when perfetto is already connected in order to write timestamps.
Otherwise such cmd buffer won't be traces.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969 >
2021-09-10 14:58:28 +03:00
Danylo Piliaiev
0565c993f9
u_trace: helpers for tracing tiling GPUs and re-usable VK cmdbuffers
...
Re-usable command buffer could be resubmitted any number of times,
but tracepoints are written once. u_trace_clone_append allows
copying tracepoints and copying timestamps if GPU doesn't support
writing timestamps into indirect address.
The case of tiling GPUs is similar, command stream for draws is
resubmitted for each tile.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969 >
2021-09-10 14:58:28 +03:00
Danylo Piliaiev
3dd1bb6355
turnip: implement basic perfetto support
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969 >
2021-09-10 14:58:28 +03:00
Danylo Piliaiev
cefaa73909
util/u_trace: auto-generation of serialization funcs for tracepoints
...
Add ability to auto-generate:
- printing of args for "GPU_TRACE=1", still could be overriden with
tp_print.
- population of extra data for perfetto event.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969 >
2021-09-10 14:58:28 +03:00
Danylo Piliaiev
e14f525280
util/u_trace: make u_trace usable for other than gallium drivers
...
With little modifications u_trace could be usable for Vulkan drivers.
Beside removing dependencies on gallium, the other notable change is
the passing of opaque flush_data pointer via u_trace_flush. There
is data which becomes available only at this point which other drivers
may want to pass.
For example Vulkan drivers would want to pass at least submission id
(for perfetto) and a sync object to wait on in u_trace_read_ts.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969 >
2021-09-10 14:58:28 +03:00
Connor Abbott
9033916d84
ir3: Add bar to beginning of HS with tess_use_shared
...
This matches the blob. In theory, this is necessary only because the
VS/HS workgroup can now span more than one wave and a patch may be
assigned to different waves in the VS and HS. However I've seen it fix
tests where the entire draw should fit in one wave, so there may some
other sort of waiting this does or the HW dispatch may be inefficient
sometimes.
Fixes
EQP-VK.tessellation.user_defined_io.per_patch.vertex_io_array_size_implicit.*
when run immediately after
dEQP-VK.tessellation.invariance.outer_triangle_set.quads_fractional_even_spacing
or when all of dEQP-VK.tessellation.* is run in sequence on a650.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12791 >
2021-09-10 10:05:52 +00:00
Boris Brezillon
6c286edc53
panvk: Disable the BO cache
...
This makes it easier to debug memory leaks, and we probably want to
rely on vulkan caches anyway, so let's just disable the BO cache.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:42:21 +02:00
Boris Brezillon
ef48b6c4d0
panvk: Only set PAN_DBG_TRACE if PANVK_DEBUG_TRACE is set
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:42:14 +02:00
Boris Brezillon
1b53600ff4
panvk: Don't take a BO reference when binding memory to an image
...
Memory is never unbound, and vulkan mandates that the memory stays around
for the image lifetime, unless another chunk of memory is bound to this
image. Let's keep things simple and don't take a reference on the BO
we bind to an image, this way, the memory gets released as soon as
vkFreeMemory() is called.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:42:07 +02:00
Boris Brezillon
81e8a5d83a
panvk: Initialize clear values to zero when load_op != OP_CLEAR
...
This is easier to detect when something goes wrong with this default
initialization in place.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:41:59 +02:00
Boris Brezillon
55e3d0e256
panvk: Fix a BO leak in panvk_pool_alloc_backing()
...
When picking a BO from a BO pool, we need to add it to the memory pool
otherwise it gets lost when the memory pool is reset/destroyed.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:41:54 +02:00
Boris Brezillon
cb5415396d
panvk: Reset panvk_pool->transient_bo in panvk_pool_reset()
...
Fixes a use-after-free issue.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:41:46 +02:00
Boris Brezillon
4a178cf858
panvk: Close the panfrost device in the panvk_physical_device_init() error path
...
Otherwise some resources stay around.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:41:39 +02:00
Boris Brezillon
f0be7dc745
panvk: Don't allocate an array of blend constants
...
Those are shared by all render targets.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:41:34 +02:00
Boris Brezillon
2c4b8f9168
panvk: Clamp blend constants before copying them to the cmdbuf state
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:41:29 +02:00
Boris Brezillon
8182f7a981
panvk: Narrow the allow-forward-pixel-kill condition
...
Setting it to info->fs.can_fpk is wrong. Let's mimic the gallium driver
here.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:41:23 +02:00
Boris Brezillon
c0e43b844c
panvk: Fix chan_size calculation in panvk_emit_blend()
...
Only the first channel was taken into account.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:40:54 +02:00
Boris Brezillon
6f670bc355
panvk: Don't advertise min/max filter
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:40:48 +02:00
Boris Brezillon
08a06dbee5
panvk: We don't support linear filtering on integer formats
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:40:40 +02:00
Boris Brezillon
09aab6471d
panvk: Only advertise MSAA-4
...
We'll see if we want to support MSAA 8 and 16 later. MSAA 2 is not
supported.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:40:34 +02:00
Boris Brezillon
393615510d
panvk: Fix blend descriptor emission
...
Got the round_to_fb_precision wrong when rebasing the the per-gen XML
changes. Fix it now.
Fixes: 792a0ab0b1 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:40:29 +02:00
Boris Brezillon
3c73ac53c7
panvk: Don't use pan_is_bifrost()
...
Leftovers from the per-gen XML transition patch.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762 >
2021-09-10 11:40:05 +02:00
Juan A. Suarez Romero
c98ddc778a
broadcom/compiler: force a last thrsw for spilling
...
As we don't know if we are going to have spilling or not, emit always a
last thrsw at the end of the shader.
If later we don't have spillings and we don't need that last thrsw, we
remove it and switch back to the previous one.
This way we ensure all the spilling happens always before the last
thrsw.
v2 (Juan):
- Rework the code to force a last thrsw and remove later if no spilling
v3:
- Merge functionality inside vir_emit_last_thrsw (Iago)
- Add vir_restore_last_thrsw (Juan)
v4 (Iago):
- Fix/add new comments
- Rename variables/parameters
v5 (Iago):
- Fix comments
- Add assertion
Cc: mesa-stable
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4760
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12322 >
2021-09-10 09:18:05 +00:00
Juan A. Suarez Romero
53c8b4c093
broadcom: make vir_emit_last_thrsw() private
...
This function is only used in v3d_nir_to_vir(), so make it private.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12322 >
2021-09-10 09:18:05 +00:00
Ilia Mirkin
fb5deb2b4a
a4xx/computerator: add initial backend
...
This backend provides very basic a4xx support. It's enough to run
kernels with explicit stg/etc ops, but not with stgb/ldgb type access.
There is no perfcounter support hooked up yet either.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12784 >
2021-09-10 01:20:22 +00:00
Ilia Mirkin
269cbc8a4d
a4xx: add some better documentation for compute registers
...
These were driven by seeing 0x1c (and other) values set by blob, as well
as comparing to equivalent a3xx documentation.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12784 >
2021-09-10 01:20:22 +00:00
Sagar Ghuge
5f66e5e56d
anv: No need to lower to A64 messages for 64-bit atomics
...
With LSC support, we can do 64-bit atomics with A32/64 messages.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566 >
2021-09-09 23:34:33 +00:00
Sagar Ghuge
75e28b8777
intel/compiler: Add support to handle 64-bit atomics with A32 messages
...
v1: (Jason)
- Fix parentheses
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566 >
2021-09-09 23:34:33 +00:00
Sagar Ghuge
9ffd05b41e
anv: Advertise support for shaderBufferFloat64AtomicMinMax
...
v1:
- Just check has_lsc (Jason)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566 >
2021-09-09 23:34:33 +00:00
Sagar Ghuge
527468f56f
intel/compiler: Add 64-bit A64 float logical opcode support
...
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566 >
2021-09-09 23:34:33 +00:00
Jason Ekstrand
7f2395046f
anv: Advertise support for shaderBufferFloat32AtomicAdd
...
Rework: (Sagar)
- Enable shaderBufferFloat32AtomicAdd for XeHPG
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566 >
2021-09-09 23:34:33 +00:00
Jason Ekstrand
7b21def9c2
intel/fs: Add support for atomic_fadd
...
Rework:
- Enable float32 atomic add with LSC (Sagar)
- disassemble new opcode (Caio)
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566 >
2021-09-09 23:34:33 +00:00
Emma Anholt
db930bd91b
nir_to_tgsi: Allow SSA defs to include swizzles, abs, and neg.
...
This will let some copy prop happen automatically, avoiding MOVs to temps.
Most importantly, though, it means that virgl won't see (unused channel)
swizzles from channels beyond the bounds of sysvals, which trigger shader
compile failures on the host.
softpipe shader-db:
total instructions in shared programs: 2946336 -> 2934777 (-0.39%)
instructions in affected programs: 374676 -> 363117 (-3.09%)
total temps in shared programs: 565552 -> 564139 (-0.25%)
temps in affected programs: 18138 -> 16725 (-7.79%)
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781 >
2021-09-09 22:02:52 +00:00
Emma Anholt
bd8de16803
nir_to_tgsi: Switch ssa_temp[] to be a ureg_src.
...
After ntt_store_def(), all uses want it to be a ureg_src. This will let
us fold abs/neg/swizzles in.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781 >
2021-09-09 22:02:52 +00:00
Emma Anholt
ed1fb1f03b
nir_to_tgsi: Clean up some unnecessary pointers-to-uregs.
...
This was used at one point to do ntt_store_def() or something I think.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781 >
2021-09-09 22:02:52 +00:00
Emma Anholt
d24893e735
nir_to_tgsi: Add support for memory_barrier_tcs_patch.
...
glsl_to_tgsi translated both cases of ir_barrier to TGSI's BARRIER, so map
both of glsl_to_nir's ir_barrier outputs to the same.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781 >
2021-09-09 22:02:52 +00:00
Emma Anholt
4a4a889de3
nir_to_tgsi: Don't forget to add sampler views with our samplers.
...
While softpipe and i915 didn't really care, virgl very much does.
tgsi_scan also insisted that the texture ops and the decls matched, which
led to deduplicating the switch statemnts.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781 >
2021-09-09 22:02:52 +00:00
Emma Anholt
947f585e91
nir_to_tgsi: Fix indirect addressing of atomic counters.
...
It's not actually a given that the offset within the counter buffer is a
constant.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781 >
2021-09-09 22:02:52 +00:00
Bas Nieuwenhuizen
b05cd10b8e
nir: Avoid visiting instructions multiple times in nir_instr_free_and_dce.
...
Sadly need to poke a bit in the src internals to avoid using yet another
heap allocated datastructure.
Fixes: 5251548572 ("nir: Add a nir_instr_remove that recursively removes dead code.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5323
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12726 >
2021-09-09 21:35:03 +00:00
Chia-I Wu
ca1622830e
venus: separate physical device init and filter
...
It is not an error when a physical device is filtered out. But it is an
error when a physical device fails to initialize.
Fixed
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.
v2: separate success and fail paths
Fixes: 7dfac808 ("venus: no supported device is not an error")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org > (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com > (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12723 >
2021-09-09 20:07:18 +00:00
Chia-I Wu
e14bec2ef3
venus: refactor vn_instance_enumerate_physical_devices
...
Move device enumeration to a new function.
v2: separate success and fail paths, rename functions
(suggested by Ryan)
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org > (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12723 >
2021-09-09 20:07:18 +00:00
Mike Blumenkrantz
7f5a353012
aux/trace: use private refcounts for samplerviews
...
this avoids having the driver bypass the samplerview wrapper and destroying
the samplerview prematurely, e.g., spec@sgis_generate_mipmap@gen-texsubimage
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12546 >
2021-09-09 19:27:35 +00:00
Roland Scheidegger
1a554fd610
lavapipe: implement VK_EXT_depth_clip_enable
...
v2: fix pipeline creation, need a deep copy for rasterization state now
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12260 >
2021-09-09 18:29:26 +00:00
Roland Scheidegger
49337ec410
gallium: add rasterizer depth_clamp enable bit
...
This is required for d3d10+, which has depth_clamp always enabled
regardless of depth_clip (in contrast to OpenGL, where enabling
depth_clamp disables depth_clip). There doesn't seem to be a GL
extension for it, but it will be used for lavapipe to implement
VK_EXT_depth_clip_enable.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12260 >
2021-09-09 18:29:26 +00:00
Mike Blumenkrantz
869f0a4992
mesa: skip fallback draw call if no primitives are being drawn
...
../src/mesa/main/draw.c: In function ‘_mesa_draw_gallium_fallback’:
../src/mesa/main/draw.c:1056:4: warning: ‘prim’ may be used uninitialized [-Wmaybe-uninitialized]
1056 | ctx->Driver.Draw(ctx, prim, num_prims, index_size ? &ib : NULL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1057 | index_bounds_valid, info->primitive_restart,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1058 | info->restart_index, min_index, max_index,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1059 | info->instance_count, info->start_instance);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12766 >
2021-09-09 16:52:40 +00:00
Juan A. Suarez Romero
b58d6eaf11
mesa: fix default texture buffer format
...
According to ARB_tbo spec, default format is LUMINANCE8, but according
to core spec, it is R8.
This fixes piglit's spec@arb_texture_buffer_object@get test with drivers
supporting ARB_tbo spec but OpenGL/ES < 3.1.
v2:
- Compare against compat profile (Ilia)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12774 >
2021-09-09 15:23:43 +00:00
Pierre-Eric Pelloux-Prayer
a08baaff97
vbo/dlist: fix indentation in vbo_save_api.c
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
cc57156dce
vbo/dlist: rework vertex_store management
...
Simplify the whole thing:
- keep a single function (grow_vertex_storage) that extends the array
- call it when the array is full (in ATTR_UNION) or at the beginning of
a primitive when the vertex count is known to avoid multiple reallocations.
- allocate save->vertex_store in vbo_save_NewList if needed
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
9863fe5a02
vbo/dlist: rework primitive store handling
...
Simplify the logic by simply growing the primitive array when needed and
remove remove the call to compile_vertex_list in _save_End if the
array is full (it'll be resized later if needed instead).
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
3253594268
vbo/dlist: rework buffer sizes
...
Use 20Mb as the default bo size and use the same limit when
allocating the CPU buffers in realloc_storage.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
031cb085cd
vbo/dlist: remove unused functions
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
5e281a053a
vbo/dlist: add documentation
...
Add a bit of documentation to describe the logic of vbo_save_api.
while at it improve the packing of vbo_save_context.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
dd55d9f2b3
vbo/dlist: remove vbo_save_context::vert_count
...
The same property can be deduced directly from the vertex_store,
so remove this one to avoid sync problems between the two and
simplify the code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
2671b9c90f
vbo/dlist: remove vbo_save_copied_vtx
...
The copy_vertices() function is rarely called and removing
this decreases vbo_save_context's size by 20kb.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
0b8dcdec9d
vbo/dlist: fix max_index_count value
...
We just need an upper bound anyway.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
fc2030b8f3
vbo/dlist: rework out of memory
...
We don't need to store/init a GLvertexformat (3kb) only to handle the
out of memory situation.
Instead, we can call _mesa_noop_vtxfmt_init when needed.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
831f5d1fe0
vbo/dlist: don't force list compilation if out of vertex space
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
94a2063987
vbo/dlist: limit allocation sizes
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
ea99d1c748
vbo/dlist: remove vbo_save_context::max_vert
...
max_vert is easy to deduce from vertex_store so remove it to simplify
the code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
93867fad55
vbo/dlist: realloc vertex stores
...
Same logic that for the primitives: since we're using an intermediate
RAM storage, we don't need to artificially split lists when the buffer
is full.
Instead, we can simply realloc-ate it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
776445468b
vbo/dlist: remove vbo_save_context::buffer_map
...
buffer_map pointed to the first vertex in the store for the current list.
With the previous commit, the first vertex is always at index 0, so we
can drop buffer_map.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
6a63a4a14f
vbo/dlist: reset vertex_store::used in reset_counters
...
This means that each list will start writing its vertices at index 0.
The previous mode (append) was useful in the past when the vertices
were written directly to a mapped-buffer object.
Now that there's an intermediate storage in RAM, the added complexity
of the append-mode has no value so drop it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
3ab1ddd5c1
vbo/dlist: remove vbo_save_context::buffer_ptr
...
buffer_ptr is always "buffer_in_ram + used" so compute it when needed
and drop it from the struct to avoid out-of-sync errors.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
b511b65123
vbo/dlist: don't force list compilation if out of prim space
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
69615d92a0
vbo/dlist: realloc prims array instead of free/malloc
...
Now that we don't have links to the prim_store->prims pointers, we
can replace the free/malloc by a realloc version to grow the prim
storage as needed by a list.
This will be used in the next commit to avoid splitting lists in
multiple vbo_save_vertex_list instances because the prim_store was full.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
22f666622a
vbo/dlist: use prim_store directly
...
prim_store won't be shared anymore between multiple list, so use it
directly instead of proxies.
This simplifies the code and avoid to keep them in sync.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
2c6e8bab1b
vbo/dlist: don't store prim_store
...
This is not used anywhere, so we can drop it from vbo_save_context.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
f5aa98579a
vbo/dlist: remove vbo_save_vertex_store::bufferobj
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
f9d12bf50e
vbo/dlist: use a single buffer object
...
Instead of using 2 bo, 1 for the indices, one for the vertices store
everything in the same buffer.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
edd7733826
vbo/dlist: use buffer_in_ram_size
...
The next commit will refactor buffer upload so we need to decouple
the size from the CPU buffer holding the vertices from the size of
the GPU buffer where we're uploading them.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
b0853d0ada
vbo/dlist: move VAO update at the end
...
No functional changes but this is needed for future commits.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
c01851bcf6
vbo/dlist: apply start_offset after indices construction
...
This will make our life easier for the next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
3d3b73813d
vbo/dlist: simplify add_vertex function
...
Use the correct pointer directly instead of adding/removing the same
offset.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:15 +02:00
Connor Abbott
8e188f8f2e
freedreno/a6xx: Fix VS primid with tess + GS.
...
Analogous to the previous commit.
Fixes: 8115cde3ba ("tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12768 >
2021-09-09 11:17:53 +00:00
Connor Abbott
f254686b13
tu: Fix VS primid with tess + GS
...
If tess is enabled, then VS chains to the HS and we have to use the HS
value for the PrimID sysval. This is still true if GS is also enabled,
so we need to use the HS instead of the GS if both are enabled. In
particular if the HS or DS uses gl_PrimitiveID but the GS doesn't then
we still need to setup the register.
This fixes a bunch of dEQP-VK.tessellation.invariance.primitive_set.*
cases on a650, although it seems they managed to still pass on a630 with
the broken PrimID handling.
Fixes: 8115cde3ba ("tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12768 >
2021-09-09 11:17:53 +00:00
Rhys Perry
c1f724b2b9
nir: fix serialization of loop/if control
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Fixes: e76ae39ae2 ("nir: add support for user defined select control")
Fixes: b56451f82c ("nir: add support for user defined loop control")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12778 >
2021-09-09 10:32:30 +00:00
Rohan Garg
30f457e119
ci: Use FDO_DISTRIBUTION_TAG where possible
...
This allows for de duplicating some variables.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12750 >
2021-09-09 11:49:42 +02:00
Qiang Yu
d33eeb2634
radeonsi: enable nir option pack_varying_options
...
flat interpolation type is not enabled because we need to set
SPI_PS_INPUT_CNTL_x.FLAT_SHADE=1
which is per vec4.
16 bit varying also need to set
SPI_PS_INPUT_CNTL_x.FP16_INTERP_MODE
but varying packing only support 32 bit, so we don't need to
worry about this for now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537 >
2021-09-09 06:00:58 +00:00
Qiang Yu
7054c1b7fd
nir/linker: pack varyings with different interpolation qualifier
...
Driver like radeonsi load varying in a scalar manner, so prefer to pack
varying with different interpolation qualifier into same slot to save
space.
But driver like panfrost/bifrost can load varying in vector manner,
so prefer to pack varying with same interpolation qualifier.
Driver can add interpolation qualifiers which are able to be
packed into same varying slot to pack_varying_options nir option.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537 >
2021-09-09 06:00:58 +00:00
Qiang Yu
5a24aed1ac
nir/lower_io_to_vector: check centroid & sample when merge variable
...
These qualifiers should be respected for different varying load code
generation.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537 >
2021-09-09 06:00:58 +00:00
Qiang Yu
1fd3cf990e
mesa: fix glthread deadlock when EGL multi thread shared context
...
This fixes dEQP EGL tests when glthread is enabled:
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copyteximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random.images.texsubimage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_server_sync.images.teximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_server_sync.images.texsubimage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.copyteximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.texsubimage2d.*
Deadlock happens when:
Thread A: call EGL context functions which will involve _mesa_glthread_finish(), like
eglMakeCurrent() and eglDestroyContext(). It will hold the EGLDisplay.Mutex and wait
on glthread job queue empty (util_queue_fence_wait(&last->fence)). glthread job thread
executes batch holding gl_context.Shared.TexMutex (glthread_unmarshal_batch()).
Thread B: call EGLImage import functions like EGLImageTargetTexture2DOES() which will
hold gl_context.Shared.TexMutex (egl_image_target_texture()) then validate EGLImage
and hold EGLDisplay.Mutex (dri2_lookup_egl_image()).
This fixes the deadlock by moving the EGLImage validation out of gl_context.Shared.TexMutex
lock area.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
be4f5f1c92
mesa: add ValidateEGLImage driver callback
...
Check EGLImage imported.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
4145532671
gallium/api: add validate_egl_image interface
...
For being used by mesa state tracker.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
d45d749e8b
gallium/dri: add dri_screen egl image validate hooks
...
For being used by EGLImage import in the following commits.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
27d91fec04
gbm/dri: implement image lookup extension version 2
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
dcf38724c7
egl/dri2: seperate EGLImage validate and lookup
...
Version 2 of DRIImageLookupExtension add two interface for EGLImage
validate and lookup. This is for resolving deak lock in the following
commits.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Eric Engestrom
5d74c33aaa
docs: update calendar and link releases notes for 21.1.8
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12780 >
2021-09-08 22:38:13 +01:00
Eric Engestrom
996e50a60a
docs: add release notes for 21.1.8
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12780 >
2021-09-08 22:37:44 +01:00
Jesse Natalie
44b9e11ddb
gl.h: Remove dllimport
...
__declspec(dllimport) isn't needed for linking to functions, extern
is sufficient. The preprocessor define used to determine when to
set it (_DLL) was incorrect, since that preprocessor define is set
anytime you're linking against dynamic CRT as opposed to static CRT.
Reviewed-by: Bill Kristiansen <billkris@Microsoft.com >
Reviewed-by: Marek Olák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12776 >
2021-09-08 18:42:57 +00:00
Mike Blumenkrantz
5ab27ad01e
aux/trace: dump more pipe_vertex_element members
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12754 >
2021-09-08 18:16:22 +00:00
Mike Blumenkrantz
b4cbc47b3c
mesa/st: use uint for instance_divisor instead of int
...
this is confusing
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12755 >
2021-09-08 17:54:08 +00:00
Chia-I Wu
e38c58c808
venus: raise the ring buffer size to 64KB
...
When the renderer supports largeRing, raise the ring buffer size to 64KB
and raise the direct submit threshold to 4KB. The numbers are randomly
picked.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
79b8498c05
venus: update venus-protocol headers
...
There are some decoder changes. But we mainly want to gain largeRing
support.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
c9eedba75d
venus: make ring buffer size configurable
...
Until we can assume large ring support.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
eb88c8e1d4
venus: rework vn_instance_submission
...
The goal is to remove local_cs_data. To that end, vn_ring_submit is
modified to take a cs than a pointer.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
862244ccc6
venus: add and use VN_CS_ENCODER_INITIALIZER
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
0641a230a0
venus: init experimental features before the ring
...
We can no longer use
vn_call_vkGetVenusExperimentalFeatureData100000MESA which requires the
ring to be initialized.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
e5a005dd0c
venus: support reply shmem without ring
...
Let vn_instance_get_reply_shmem_locked use the renderer if it is called
before the ring is initialized.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
68eb682a23
venus: add vn_renderer_submit_simple_sync
...
It submits a command stream to the renderer and waits.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
2996c707cf
venus: init roundtrip fields in vn_instance later
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
3bba38ab71
venus: reorder version fields in vn_instance
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Jesse Natalie
076c8f041a
docs: Update Windows llvmpipe doc for driver split
...
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:22:45 -07:00
Jesse Natalie
f36921effe
wgl: Refactor drivers to a libgallium_wgl.dll
...
I'd like to support EGL on Windows, using the same architecture as Linux.
On Linux, libgallium_dri.so is a "megadriver," containing the Mesa Gallium
state tracker, plus the actual driver implementations.
Now, on Windows, libgallium_wgl.dll is a proper OpenGL ICD, and OpenGL32.dll
is just a stub DLL which implements the wgl* APIs in terms of that ICD.
This is the more "architecturally clean" way to share the state tracker
between EGL and WGL.
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:22:39 -07:00
Jesse Natalie
e2bb111e02
wgl: Make overridden entrypoints local to stw_ext_context
...
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:22:35 -07:00
Jesse Natalie
739fb1057d
wgl: Move wgl* non-extension definitions to libgl-gdi
...
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:22:24 -07:00
Jesse Natalie
a153c78d6e
wgl: Move opengl32.def to target instead of frontend
...
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:22:13 -07:00
Jesse Natalie
675775b140
wgl: Don't use BUILD_GL32 for wgl frontend
...
The set of GL exports from OpenGL32.dll is controlled by a .def file,
there's no need to also use __declspec(dllexport) for all of them.
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:22:00 -07:00
Jesse Natalie
2a76c976d1
static-glapi: Fix MSVC preprocessor definitions
...
Previously, any DLL which links any function from libglapi-static would
end up exporting the entire GL API surface area, due to the dllexport
introduced by BUILD_GL32. This fix allows DLLs to internally include
definitions of gl* APIs without having to export the entire surface.
Also, remove unreachable with_shared_glapi branch already in an else block.
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:21:53 -07:00
Jesse Natalie
03006926de
wgl: Fix unit test when using shared glapi
...
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:21:48 -07:00
Jesse Natalie
92f515ad6e
mapi: Fix shared-glapi build with MSVC
...
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Charmaine Lee >charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677 >
2021-09-08 07:21:26 -07:00
Corentin Noël
d326d32e24
glx: Prevent crashes when an extension isn't found
...
Avoid a NULL-pointer dereference.
Fixes: 2c8a85b712 ("glx: Stash a copy of the XExtCodes in the glx_display")
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12751 >
2021-09-08 11:46:51 +00:00
Rob Clark
20ec247cb8
freedreno/ir3: Update physical_predecessors for streamout block
...
Caught by newly added ir3_validate checks.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742 >
2021-09-08 08:53:39 +00:00
Rob Clark
137471ca89
freedreno/ir3: Improve error msg for block level validation
...
Printing whatever happened to be the last instruction is misleading.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742 >
2021-09-08 08:53:39 +00:00
Rob Clark
ac5df8c5c9
freedreno/ir3: Validate physical successors
...
Each block's physical successors should be a superset of the logical
successors.
Also validate that the successors are sane (ie. we shouldn't have the
2nd one if we don't have the first)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742 >
2021-09-08 08:53:39 +00:00
Rob Clark
d2efcd3f06
freedreno/ir3: Fix double printing of branch suffix
...
print_instr_name() already prints the suffix.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742 >
2021-09-08 08:53:39 +00:00
Rob Clark
c343fa9ecd
freedreno/ir3: Fix physical successors for break out of loop
...
We can't just clobber the existing successor[0] which is based on
logical successor[0]
Suggested-by: Connor Abbott <cwabbott0@gmail.com >
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742 >
2021-09-08 08:53:39 +00:00
Rob Clark
f472949b24
freedreno/ir3: Update physical_successors after retargetting jumps
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742 >
2021-09-08 08:53:39 +00:00
Marcin Ślusarz
30b2cc423c
glsl: break out early if compound assignment's operand errored out
...
Fixes compiler crashes on:
struct Foo
{
float does_exist_member;
};
in vec2 tex;
out vec4 color;
void
main(void)
{
Foo foo;
foo.does_not_exist_member %= 3; /* or any of: <<=, >>=, &=, |=, ^= */
color = vec4(tex.xy, tex.xy);
}
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
CC: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12717 >
2021-09-08 06:59:34 +00:00
Marcin Ślusarz
26302ccdc1
glsl: propagate errors from *=, /=, +=, -= operators
...
Fixes compiler crash on:
void main()
{
gl_FragColor = a += 1;
}
(a is not declared anywhere)
Found with AFL++.
Fixes: d1fa69ed61 ("glsl: do not attempt assignment if operand type not parsed correctly")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12717 >
2021-09-08 06:59:34 +00:00
Mike Blumenkrantz
0edbdc671f
zink: fix some pipe caps for max instructions
...
all shaders are supported now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12760 >
2021-09-08 04:45:28 +00:00
Mike Blumenkrantz
ad584ed34e
zink: use dispatch table for (almost) all vulkan calls
...
try to avoid hitting the loader when possible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12757 >
2021-09-08 04:31:24 +00:00
Icecream95
2777d4f69d
lima: Improve error messages for unsupported GP operations
...
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738 >
2021-09-08 04:19:56 +00:00
Icecream95
4ad4aa38fa
lima: Fix crashes for GPUs with more than four cores
...
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738 >
2021-09-08 04:19:56 +00:00
Icecream95
c1f40c762c
lima: Enable PIPE_CAP_VERTEX_COLOR_UNCLAMPED
...
Fixes lighting being too bright in Neverball.
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738 >
2021-09-08 04:19:56 +00:00
Timothy Arceri
52893327fb
glsl: fix variable scope for do-while loops
...
Without this the following code was successfully compiling.
void main()
{
do
int var_1 = 0;
while (false);
var_1++;
}
Fixes: a87ac255cf ("Initial commit. lol")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465 >
2021-09-08 03:56:59 +00:00
Timothy Arceri
174c057926
glsl: handle scope correctly when inlining loop expression
...
We need to clone the previously evaluated loop expression when
inlining otherwise we will have conflicts with shadow variables
defined in deeper scopes.
Fixes: 5c02e2e2de ("glsl: Generate IR for switch statements")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5255
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465 >
2021-09-08 03:56:59 +00:00
Timothy Arceri
8bbbbb02cd
glsl: fix variable scope for loop-expression
...
We need to evaluate the loop-expression of a for loop before
we evaluate the loop body otherwise we will find the wrong
variable for the following loop.
int var_0 = 0;
for(; var_0 < 10; var_0++) {
const float var_0 = 1.0;
gl_FragColor = vec4(0.0, var_0, 0.0, 0.0);
}
Fixes: a87ac255cf ("Initial commit. lol")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5262
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465 >
2021-09-08 03:56:59 +00:00
Timothy Arceri
732cd9db44
mesa: fix mesa_problem() call in _mesa_program_state_flags()
...
Previously STATE_INTERNAL returned 0 for the unhandled states
but the outer switch throws the error for unhandled states.
Fixes: b4f3497786 ("mesa: remove STATE_INTERNAL")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5316
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12746 >
2021-09-08 03:33:59 +00:00
Mike Blumenkrantz
c5059915ee
zink: use EXT_primitive_topology_list_restart where available
...
this also fixes an error where PATCHES was reported as supported
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12626 >
2021-09-08 03:08:39 +00:00
Mike Blumenkrantz
c96e854db3
zink: hook up VK_EXT_primitive_topology_list_restart
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12626 >
2021-09-08 03:08:39 +00:00
Mike Blumenkrantz
ff6ccbf5f0
lavapipe: fix primitive restart with indexed indirect draws
...
restart index needs to be set
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12761 >
2021-09-07 22:45:07 -04:00
Mike Blumenkrantz
5bb747abd9
util/primconvert: force restart rewrites if original primtype wasn't supported
...
if we're doing a primtype change, the restart needs to be eliminated to
avoid losing restart data after the rewrite
Fixes: 583070748c ("util/primconvert: handle rewriting of prim-restart draws with unsupported primtype")
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12625 >
2021-09-08 01:50:46 +00:00
Michael Tang
f7e575ce0d
microsoft/spirv_to_dxil: Add install : true to spirv_to_dxil library.
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12758 >
2021-09-08 00:00:42 +00:00
pal1000
90faabc0ee
ci: Add osmesa to Windows GitLab CI
...
osmesa CI coverage on Windows was lost when Windows CI with
Meson build was migrated from AppVeyor to GitLab CI
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8672 >
2021-09-07 20:39:02 +00:00
Italo Nicola
5d02cbfcb5
main: don't always clamp pixels read from snorm buffers
...
From the OpenGL 4.6 spec, section 18.2.8:
"For a signed normalized fixed-point color buffer, each component is
clamped to [0,1] if read color clamping is enabled, or if type
represents un- signed integer components; otherwise type represents
signed integer components, and each component is clamped to [−1,1]."
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12749 >
2021-09-07 20:18:33 +00:00
Mike Blumenkrantz
dda0bb0b32
zink: clamp query results to 500 per qbo on 32bit
...
this makes 4000byte qbos instead of 40000, which avoids bypassing slab
allocation and makes the buffers more reusable to avoid exploding 32bit
address space
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12752 >
2021-09-07 19:38:35 +00:00
Emma Anholt
a2dfb49961
llvmpipe: memcpy user_buffers at set_constant_buffer time.
...
The data in the user buffer is only valid for a short period of time, and
we could use-after-free it if rendering hadn't been flushed by shader
deletion time.
Fixes : #5254
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724 >
2021-09-07 19:16:32 +00:00
Emma Anholt
a83a2b980c
llvmpipe: Fix leak of CS local memory with 0 threads.
...
Fixes: bde08ce4d7 ("llvmpipe: handle compute shader launch with 0 threads")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724 >
2021-09-07 19:16:32 +00:00
Emma Anholt
dee8b50cad
llvmpipe: Free CS shader images on context destroy.
...
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724 >
2021-09-07 19:16:32 +00:00
Paulo Zanoni
26364c6347
iris: signal the syncobj after a failed batch
...
When a batch fails we either recreate our context (in case we got -EIO
or -ENOMEM) or we abort() (every other error). If we don't abort and a
later batch has a dependency on the batch that failed, then this newer
batch will fail with -EINVAL since it requires a syncobj that was
never submitted, which means we'll abort().
To avoid this problem, in this patch we simply signal syncobjs of
failed batches. This means we may be breaking our dependency tracking,
but IMHO it's better than simply letting it abort() later.
In other words, this moves the situation for some apps from "app
causes a GPU hang and then aborts" to "app causes a GPU hang but keeps
running".
Note: on some older Kernels (like today's Debian 5.10 Kernel) I see X
simply freezing after the GPU hang when the app doesn't decide to
abort(). Switching to a more recent Kernel fixes this issue for me, so
in case it happens to you make sure you have the most recent stable
trees.
v2:
- Fix coding style (Ken).
- Use the big comment block provided by Ken (Ken).
- Adjust the commit message so avoid saying we retry (Ken).
- Rebase after the syncobj ownership changes.
- Drive-by add a missing white space in the header.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12657 >
2021-09-07 19:03:03 +00:00
Emma Anholt
db35acafa9
ci/freedreno: Skip slow SizedDeclarationsPrimitive in CI.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12753 >
2021-09-07 18:42:19 +00:00
Emma Anholt
52f65551d2
ci/freedreno: Mark a630 basic-glsl-misc-fs as flaky.
...
My branch mostly fixed it, but apparently it's not stable yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12753 >
2021-09-07 18:42:19 +00:00
Emma Anholt
f5f446f3ec
ci/freedreno: Fix typo in glx-tfp flake annotation.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12753 >
2021-09-07 18:42:19 +00:00
Emma Anholt
edfff331b3
freedreno/a6xx: Emit a WFI after event writes flushing CCU.
...
Following on from !12475 , do the same CCU workaround for freedreno as
turnip is doing, so that we flush CCU correctly for when color/depth is
next read under a different cache domain from where it was written.
Fixes instability (particularly if the GPU is clocked up) on
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8* in bypass
mode on a630.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11481 >
2021-09-07 18:14:30 +00:00
Marek Olšák
69e96cfc0d
ac,radv: remove unused inputs array and VS input code
...
The previous commit stopped using "inputs".
"load_layer_id" has always been broken and it was probably unused anyway.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
3fb229e010
ac,radeonsi: load VS inputs at the call site of nir_intrinsic_load_input
...
to match ACO
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
bce7c7f3fc
ac/llvm: implement nir_intrinsic_elect
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
e0f07483d0
ac/llvm: implement nir_intrinsic_overwrite_*_arguments_amd
...
This should work if the intrinsics are not called from conditional blocks.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
1e178f7a37
ac: make ac_shader_abi::inputs an array instead of a pointer
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
6df5f268db
ac: remove needless parameters from ac_shader_abi::emit_outputs
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
2e95ad1433
ac/llvm: implement a bunch of NIR AMD intrinsics for NGG
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
a33602b1f9
ac/llvm: remove load_tess_coord callback
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Emma Anholt
0fed8d4fab
ci/iris: Switch GL/GLES testing to suites.
...
Better board utilization, less fussy load-balancing of the boards, and
being able to add KHR-GLES* and multisample testing without having to add
more reboots.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:36:12 -07:00
Emma Anholt
4abcf8433c
ci/iris: Consistently use .test-manual-mr for our unstable hardware.
...
... and place it in the board's definition, instead of the consuming jobs.
GLK and APL are the boards that are enabled by default so far, and the
rest are off. But, if you want to check on some other board, you should
be able to click the button.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:36:09 -07:00
Emma Anholt
b91ca2022e
ci/iris: Unmark dma_buf_import_export tests as failing.
...
We now get the binaries built in our rootfs.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:36:06 -07:00
Emma Anholt
a9150f0bdc
ci/iris: Mark create_context-no_error as failing.
...
Consistent in CI, and other drivers fail at it too.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:35:58 -07:00
Connor Abbott
f5f948826a
ir3/lower_pcopy: Set entry->done in the swap loop
...
We process all the remaining copy entries one-at-a-time when emitting
swaps, so normally we wouldn't need to care about whether the entry is
done, except that we need to look at the other entries to split them up
and we need to skip this when the copy to be split has already been
processed.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5307
Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12747 >
2021-09-07 17:12:37 +00:00
Connor Abbott
e7f8d283d7
ir3/lower_pcopy: Use right flags for src const/immed
...
At some point I split up the flags into overall/source flags and made
copies from immed/const only set IR3_REG_IMMED/IR3_REG_CONST on the
source flags, but I forgot to update this. Noticed by inspection.
Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12747 >
2021-09-07 17:12:37 +00:00
Jesse Natalie
67065f99c5
llvmpipe: Don't wait for already-terminated threads on Windows
...
In the case of an app returning from main(), Windows will apparently terminate
other threads before invoking final cleanup on the main thread.
llvmpipe can't wait for threads to signal a semaphore if the thread is already
gone. Since we're already in a WIN32 special case, just call the Win32 API
to check if the thread is terminated or STILL_ALIVE.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12731 >
2021-09-07 16:19:10 +00:00
Jose Maria Casanova Crespo
cd46cad0a7
v3d: Enable PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE
...
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12744 >
2021-09-07 16:04:34 +00:00
Ed Martin
09aeb59b54
winsys/radeonsi: Set vce_encode = true when VCE found
...
Allows VA-API encoding on AMD PITCAIRN
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5305
Fixes: 43c04ab2b4 ("radeonsi: separate video hw info based on HW engine individually")
Reviewed-by: James Zhu <James.Zhu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12679 >
2021-09-07 15:32:21 +00:00
Veerabadhran Gopalakrishnan
6e6b432df2
radeon/vcn: Add FW header flag to enable VP9 header parsing
...
set flags to enable VP9 uncompressed header parsing in FW and extract
quantization and loop filter parameters.
Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12703 >
2021-09-07 13:59:50 +00:00
Mike Blumenkrantz
71aa4adba3
zink: fix PIPE_SHADER_CAP_FP16_DERIVATIVES handling
...
this requires 16bit io, not just alus
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
5ce3fa0100
zink: handle bo struct types that are just a runtime array
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
efc4e577ed
zink: handle 8/16bit ssbo storage
...
this is a bit gross, but basically just add an array of extra spvids
so that each bitsize can have its own variables to keep the types in sync
glsl can't do this, but (future) internal mesa shaders can
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
600f7804bf
zink: implement nir_op_pack_half_2x16_split
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
567d539512
zink: lower 32_2x16_split pack/unpack instructions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
376b963c81
zink: hook up 8/16bit storage exts
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
86b4e2e9cc
zink: add 8bit alu handling
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
6931fe58ca
zink: fix PIPE_CAP_DRAW_PARAMETERS export
...
before 1.2, assume this is available if the extension is there, otherwise
require the feature
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12710 >
2021-09-07 13:17:45 +00:00
Mike Blumenkrantz
22da219dd8
zink: always emit sample id 0 for non-msaa texel pointers in ntv
...
in practice this shouldn't matter since the sample id must always be zero,
but it's still a spec violation
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12710 >
2021-09-07 13:17:45 +00:00
Mike Blumenkrantz
d524d0d72b
zink: move drawid_broken to unhashed pipeline state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
58d08635b5
zink: move point sprite rasterizer bits to unhashed pipeline state
...
avoid reading values that aren't part of the pipeline state
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
0dc2de7b76
zink: add pipeline state flag for determining if output type is points
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
ad45e351a2
zink: move sample part of fs key to renderpass
...
this is more accurate
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
43cfd97ade
zink: remove tcs shader keys
...
these never did anything and need a rework to become useful, assuming
I even find a case where such a thing would be needed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
75ed571921
zink: hash blend state pointers on creation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Danylo Piliaiev
9ab4bfcb53
turnip: re-emit vertex params after they are invalidated
...
Constants could be invalidated via HLSQ_INVALIDATE_CMD which is
emitted when new pipeline is bound and in CmdClearAttachments.
Also they become invalid after secondary cmd execution.
Fixes geometry flickering in Genshin Impact
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5313
Fixes: 815a85dd7c "turnip: do not re-emit same vs params"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12684 >
2021-09-07 08:34:18 +00:00
Jonathan Marek
27f2c9dc2e
freedreno/registers: add a6xx media formats
...
Define hardware formats which correspond to media formats.
DPU/CAMSS/VENUS/CDSP can consume/produce buffers in these formats with UBWC
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12740 >
2021-09-06 18:48:47 +00:00
Emma Anholt
c993f02f6a
i915g: Reject non-unrolled loops or non-flattend IFs at link time.
...
i915 has no support for control flow, so we need to link-fail shaders that
fail to unrooll loops. This is valid for GLES2, and non-conformant but
the best we can do for GL2.
Note that we still have some dEQP failures where loops that should be
unrollable and thus are required to be supported don't get unrolled
(#4979 ).
Closes : #4978
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
17332ceb0f
mesa/st: Add an optional GLSL link fail msg to finalize_nir.
...
GLES2 drivers are allowed to reject some GLSL constructs, like dynamic
loop bounds (which neither i915g nor vc4 can fully support), but gallium
hasn't had any way to trigger a link failure. Add a return msg to the
finalize_nir hook, which is called at the end of GLSL linking, and use
that. This means that some other callers of finalize need to do something
with the msg, and we (for now) just throw it away.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
1b4b9a9eff
i915g: Add finalize_nir.
...
This allows mesa/st to do some more optimization of state variables, but
more importantly it will be what we use to do GLSL link-time errors for
loops.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
682d08a6ea
i915g: Expose PIPE_CAP_TGSI_TEXCOORD.
...
We want to be able to use finalize_nir, but doing so requires this flag to
be set because not having it is incompatible with being able to finalize
twice (since the texcoord workaround varyings shift happens at variant
time rather than link time).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
d5254601c9
i915g: Simplify the process of texcoord mapping to TGSI semantics.
...
Custom index-as-semantic defines and extra bool flags at state update time
are unnecessary if we just store the semantics and index that each
texcoord should be.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
6dd87592a6
mesa/st: Add an assertion for finalize_nir versus PIPE_CAP_TEXCOORD.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
9194ee90c8
cso: Revert using FS sampler count for other stages at context unbind.
...
You shouldn't be asking drivers without VS texturing to unbind VS
textures, which was breaking i915g.
Fixes: 802e43a6b5 ("gallium/cso: add unbind mask for cso restore")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Rob Clark
b8b475ad4e
nir/lower_amul: Fix usage of nir_foreach_src()
...
nir_foreach_src() bails after cb returns false for any src. Which isn't
the behavior we were looking for. Move progress flag to state struct
instead, so we don't skip visiting some sources.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12732 >
2021-09-06 15:58:05 +00:00
Rob Clark
5800fde1bb
nir/lower_amul: Handle load/store_global
...
These need more than 24b.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12732 >
2021-09-06 15:58:05 +00:00
Rhys Perry
c1e668d5d1
aco/ra: don't use ds_write_b8_d16_hi/ds_write_b16_d16_hi on GFX8
...
GFX8 doesn't support these opcodes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: c75138ed64 ("aco/ra: refactor subdword definition info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12721 >
2021-09-06 15:10:26 +00:00
Juan A. Suarez Romero
265515fa62
broadcom/compiler: check instruction belongs to current block
...
Check in the ldunif optimization if the current instruction belongs to
current block.
These avoids again searching the instruction when current block is not
correctly set, as it happened in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12339 and in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12221 .
v2:
- Remove extra blank line (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12358 >
2021-09-06 10:38:06 +00:00
Iago Toral Quiroga
3ef2ca9cbf
broadcom/compiler: don't enable early fragment tests if shader writes Z
...
We had an optimization to auto-enable early fragment tests when a shader
didn't have side effects, but of course, we cannot do that this if the
shader writes Z, as in that case the fragment tests need to use the
value written from the shader.
Also, if the shader enables early fragment tests, then any shader Z
writes should be ignored.
Fixes:
dEQP-VK.spirv_assembly.instruction.graphics.early_fragment.*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12736 >
2021-09-06 12:01:43 +02:00
Iago Toral Quiroga
38d79d00a1
v3dv: honor VkPhysicalDeviceFeatures2 in pNext chain of VkDeviceCreateInfo
...
Fixes:
dEQP-VK.robustness.buffer_access.through_pointers.*.reads.*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12718 >
2021-09-06 08:11:42 +02:00
Vinson Lee
9b6c641cb5
nv50/ir: Add DeadCodeElim constructor.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor
for this class does not initialize deadCount.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12697 >
2021-09-05 21:40:09 -07:00
Ilia Mirkin
5d91cf41f1
freedreno: use OUT_WFI for emit_marker
...
This is only used pre-a5xx, where we want OUT_WFI. Tested on FD420.
Fixes: 8651cfbbf0 (freedreno: emit_marker() cleanup)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12734 >
2021-09-05 23:55:31 +00:00
Rob Clark
6619877bdf
clover: Don't remove sampler/image uniforms
...
Otherwise we fool nir_shader_gather_info() into telling us there are no
samplers/images.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12733 >
2021-09-05 18:14:08 +00:00
Jesse Natalie
43c4f5eb63
ci/windows: Build spirv-to-dxil
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12728 >
2021-09-04 19:47:54 -07:00
Jesse Natalie
015cc73407
spirv2dxil: Fix build after spirv_to_dxil signature change
...
Fixes: ada05759 ("spirv_to_dxil: Convert out parameters to a single object")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5322
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12728 >
2021-09-04 19:47:41 -07:00
Bas Nieuwenhuizen
8de60a1654
util/fossilize_db: Don't corrupt keys during entry read.
...
We change the hash that is still used to set entry->key.
Fixes: d2d642cc01 "util/fossilize_db: Only allocate entries after full read."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12725 >
2021-09-04 15:12:06 +02:00
Emma Anholt
5610b5840d
osmesa: Add a unit test for resizing buffers.
...
This should cover both the former use-after-free of the old pixel buffer
when moving the context to a new pixel buffer, and also successful moving
to a different-sized pixel buffer.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12685 >
2021-09-03 20:30:04 +00:00
mattvchandler
eed660221b
gallium/osmesa: fix buffer resizing
...
Generate a new buffer if OSMesaMakeCurrent is called with a new size
Fix a use-after-free error when the old buffer is destroyed
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5276
Fixes: 26c6f6cfbb ("gallium/osmesa: Remove the broken buffer-reuse scheme.")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12685 >
2021-09-03 20:30:04 +00:00
Mike Blumenkrantz
3b289c9f30
tgsi_to_nir: force int type for LAYER output
...
this otherwise gets confused as a vec4 most of the time
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12709 >
2021-09-03 19:48:38 +00:00
Emma Anholt
1cc8523c5c
freedreno/ir3: Use LDIB for coherent image loads on a5xx.
...
If the coherent flag is present, then we need to not have an incoherent
cache between us and previous stores to the image that were also decorated
as coherent. isam apparently (unsurprisingly) goes through a texture
cache. Use ldib instead, so that we don't get the wrong result.
We would need a similar fix for a4xx, but that uses ldgb and I don't
have hardware to test on.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12704 >
2021-09-03 18:17:07 +00:00
Emma Anholt
2b6729883a
freedreno/ir3: Add encode/decode support for a5xx's LDIB.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12704 >
2021-09-03 18:17:07 +00:00
Emma Anholt
127e845d1d
freedreno/ir3: Refactor a3xx ibo/ssbo load/store instruction XML.
...
There are fields common to both loads and stores, but not resinfo. Move
them to a common bitset to reduce duplication.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12704 >
2021-09-03 18:17:07 +00:00
Emma Anholt
9cf232c9a8
freedreno/ir3: Clarify what's going on in a4xx SSBO atomics.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12704 >
2021-09-03 18:17:07 +00:00
Emma Anholt
23f7e06cd8
freedreno/ir3: Don't use isam for coherent image loads on a6xx.
...
If the coherent flag is present, then we need to not have an incoherent
cache between us and previous stores to the image that were also decorated
as coherent. isam apparently (unsurprisingly) goes through a texture
cache. Use ldib instead, so that we don't get the wrong result.
We need a similar fix for pre-a6xx, but we don't have
emit_intrinsic_load_image for those (yet).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12704 >
2021-09-03 18:17:07 +00:00
Emma Anholt
24fbda3f36
ci/freedreno: Fix xfail update for arb_draw_indirect.
...
I saw UnexpectedPass in my patch, and removed the Crash, but it was
actually Crash -> Fail that had happened.
Fixes: 83e9a7fbcf ("freedreno/ir3: Align driver param upload size/offset for indirect uploads.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12704 >
2021-09-03 18:17:07 +00:00
Emma Anholt
4717c0ca90
ci/v3dv: generalize the buffer_access.through_pointers flakes.
...
I saw an unrelated marge pipeline fail on
dEQP-VK.robustness.buffer_access.through_pointers.graphics.reads.fragment.4B_out_of_memory_with_vec4_f32,
and it sure looks like all of these are flaky.
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12681 >
2021-09-03 18:02:34 +00:00
Enrico Galli
398d591b65
spirv_to_dxil: Add support for non-zero vertex and instance indices
...
Since DXIL does not have a way to get the base/first vertex and base
instance as well as using a zero-based vertex index, these values need
to be passed in via a constant buffer.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12707 >
2021-09-03 16:21:03 +00:00
Enrico Galli
49ef896a5e
spirv_to_dxil: Add support for nir_intrinsic_load_num_workgroups
...
Since DXIL does not have a way to get the number of workgroups used
during dispatch with a system-value, these numbers need to be passed in
via a constant buffer.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12707 >
2021-09-03 16:21:03 +00:00
Enrico Galli
9461fe5cf1
nir: Add CAN_REORDER to load_ubo_dxil
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12707 >
2021-09-03 16:21:03 +00:00
Enrico Galli
ada05759e1
spirv_to_dxil: Convert out parameters to a single object
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12707 >
2021-09-03 16:21:03 +00:00
Timur Kristóf
268158a758
aco/optimize_postRA: Use iterators instead of operator[] of std::array.
...
Also add a few more assertions to make sure the registers are
within the bounds of the array.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12682 >
2021-09-03 15:00:55 +00:00
Timur Kristóf
bb956464cb
aco: Skip code paths to emit copies when there are no copies.
...
Found while running with libstdc++ debug mode.
Fixes the following:
Error: attempt to advance a dereferenceable (start-of-sequence)
iterator -1 steps, which falls outside its valid range.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12682 >
2021-09-03 15:00:55 +00:00
Timur Kristóf
728ed892df
aco: Use Builder reference in emit_copies_block.
...
Found while running with libstdc++ debug mode.
Fixes the following:
Error: attempt to copy-construct an iterator from a singular iterator.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12682 >
2021-09-03 15:00:55 +00:00
Danylo Piliaiev
46def1814e
turnip: consider shader's immediates size for sub-stream allocation
...
Otherwise we could exceed pre-allocated space.
Fixes:
dEQP-VK.spirv_assembly.instruction.compute.opphi.wide
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8841 >
2021-09-03 14:34:53 +00:00
Mike Blumenkrantz
86e4fea2d5
zink: add a piglit ci job for lazy descriptors
...
this fills out lavapipe's descriptor coverage in ci
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12708 >
2021-09-03 13:51:42 +00:00
Mike Blumenkrantz
fd3eaabf28
lavapipe: unbreak push descriptor templates
...
the stride/offset calculation on this was all wrong, so just unroll the
template before enqueuing to present a uniform stream of descriptors
without trying to copy potentially megabytes of data
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12708 >
2021-09-03 13:51:42 +00:00
Rhys Perry
522f135d06
radv: expose VK_KHR_shader_integer_dot_product
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:28 +00:00
Rhys Perry
8037b21573
aco/ra: allow v1b operands with 16-bit instructions
...
Instruction selection can create these.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: ec1bbfa608 ("aco/ra: refactor subdword operand stride")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:28 +00:00
Rhys Perry
2a7fa132be
aco: implement udot_4x8/sdot_4x8/udot_2x16/sdot_2x16 opcodes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:28 +00:00
Rhys Perry
e0d232c2fc
aco: implement nir_op_pack_32_4x8
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:28 +00:00
Rhys Perry
4dd420f76d
radv,aco: implement iadd_sat
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:28 +00:00
Rhys Perry
44be450dc1
radv: refactor handling of nir_options
...
Make it easier to change them depending on chip_class and family.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:28 +00:00
Rhys Perry
859790ba54
ac/llvm: implement udot_4x8/sdot_4x8/udot_2x16/sdot_2x16 opcodes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:27 +00:00
Rhys Perry
d6619d0a01
ac/llvm,radv: implement uadd_sat/iadd_sat
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:27 +00:00
Rhys Perry
f7cdd49a09
ac/llvm: implement nir_op_pack_32_4x8
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:27 +00:00
Rhys Perry
40a0935899
ac/gpu_info: add has_accelerated_dot_product
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:27 +00:00
Rhys Perry
137974fabb
spirv: use sdot_2x16 and udot_2x16 opcodes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:27 +00:00
Rhys Perry
41ecef7855
nir: add sdot_2x16 and udot_2x16 opcodes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:27 +00:00
Rhys Perry
ae00f5af61
nir: separate lower_add_sat
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617 >
2021-09-03 13:21:27 +00:00
Rhys Perry
54f83d718a
aco/spill: add temporary operands of exec phis to next_use_distances_end
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: dfb10e4f4b ("aco/spill: don't count phis as variable access")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12702 >
2021-09-03 14:01:27 +01:00
Rhys Perry
f241bd3749
aco: don't coalesce constant copies into non-power-of-two sizes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12702 >
2021-09-03 14:01:27 +01:00
Marcin Ślusarz
8408cce303
vulkan/wsi/x11: fix shm allocation control flow issue
...
shmget returns -1 on error. alloc_shm assigns it to an unsigned variable
and then checks whether it's < 0, which will never be true.
Found by Coverity.
CID: 1490891
Fixes: 1f55f9a97a ("vulkan/wsi/sw: add support for using host_ptr for shm pixmaps.")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12696 >
2021-09-03 08:33:36 +00:00
Samuel Pitoiset
ad878856e6
radv/llvm: rework VS input loads and implement the callback
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12693 >
2021-09-03 08:14:51 +00:00
Vinson Lee
e209580fe4
draw/tess: Fix unused-function warning with draw-use-llvm=disabled.
...
../src/gallium/auxiliary/draw/draw_tess.c:37:1: warning: unused function 'draw_tes_get_input_index' [-Wunused-function]
draw_tes_get_input_index(int semantic, int index,
^
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12663 >
2021-09-03 00:47:03 -07:00
Jose Maria Casanova Crespo
8bee5d3c11
v3d: Enable PIPE_CAP_PRIMITIVE_RESTART
...
We disabled PIPE_CAP_PRIMITIVE_RESTART on ffc4d82438 ("v3d: Disable
PIPE_CAP_PRIMITIVE_RESTART") because the HW can only support
PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX subset.
But the introduction of PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART
allows us to support these nonfixed primitive restarts so we can now
re-enable NV_primitive_restart for OpenGL extensions.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12669 >
2021-09-03 09:24:23 +02:00
Jose Maria Casanova Crespo
deb55340ca
vc4: remove primconvert
...
We are losing the optimization of converting a single quad to
a triangle fan reusing the same four vertex in the buffer.
Maybe this optimization can be ported to primconvert, QUADS are
always converted to TRIANGLES with primconvert. And i965, crocus
and svga have similar optimizations.
V3D doesn't implement this optimization and according to when it was
introduced on 230e646a40 ("broadcom/vc4: Decompose single QUADs to
a TRIANGLE_FAN."):
"No significant difference in the minetest replay, but it should reduce
overhead by not requiring that we write quad indices to index buffers
that we repeatedly re-upload (and making the draw packet smaller, as
well)."
v2: Commit log includes more detail about the removed optimization.
(Alejandro Piñeiro)
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5277
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12669 >
2021-09-03 09:24:23 +02:00
Jose Maria Casanova Crespo
dad69c7ccd
vc4: export supported prim types by vc4
...
This is now handled by gallium.
v2: Fix incorrect indentation (Alejandro Piñeiro)
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5277
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12669 >
2021-09-03 09:24:23 +02:00
Jose Maria Casanova Crespo
cdb27abf58
v3d: remove primconvert
...
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5277
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12669 >
2021-09-03 09:24:23 +02:00
Jose Maria Casanova Crespo
1618b5e720
v3d: export supported prim types by v3d
...
This is now handled by gallium.
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5277
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12669 >
2021-09-03 09:24:23 +02:00
Tomeu Vizoso
0005b90ba9
vulkan: Copy pNext structures when enqueuing commands
...
There is enough information in vk.xml to figure how to copy the chain of
extensions, so use it.
Otherwise, the caller might have released the structs after recording
the command but before it executes.
Closes #5314 .
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reported-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12701 >
2021-09-03 07:33:21 +02:00
Tomeu Vizoso
03d586899e
Revert "lavapipe: unbreak imageless framebuffer"
...
This reverts commit c679dbe09c .
No need to override the generated cmd enqueing function, we can use the
information in vk.xml to do the right thing with pNext arguments.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12701 >
2021-09-03 07:33:21 +02:00
Filip Gawin
2de348cdb0
glsl: use bool literals instead of integers
...
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12674 >
2021-09-02 21:19:22 +00:00
Filip Gawin
b178296574
nouveau: use bool literals instead of integers
...
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12678 >
2021-09-02 21:08:00 +00:00
Filip Gawin
8bf202ac72
nouveau: fix forward declaration of struct
...
Mismatching class/struct is disliked by MSVC.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12698 >
2021-09-02 20:57:18 +00:00
Samuel Pitoiset
1402c17e4f
radv: optimize VRS when no depth stencil attachment is bound
...
This is allowed by the Vulkan spec and we have to handle this situation
internally. We used to create and bind a 4096x4096 image to copy the
VRS rates but this wasted too much VRAM (~33MiB). Now, the driver only
allocates a HTILE buffer (~1MiB) and bind it to the framebuffer.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12243 >
2021-09-02 19:39:04 +00:00
Samuel Pitoiset
ab635b024b
radv: pass the HTILE buffer to radv_copy_vrs_htile()
...
Will be used to use a global HTILE buffer without an image.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12243 >
2021-09-02 19:39:04 +00:00
Samuel Pitoiset
ad60354a92
radv: optimize copying VRS rates to the global HTILE buffer
...
By skipping the read operation which is unnecessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12243 >
2021-09-02 19:39:04 +00:00
Samuel Pitoiset
0fd40af59f
radv: allow to conditionally read HTILE value when copying VRS rates
...
When a subpass is bound without a VRS attachment, the driver has to
create one internally and the copy can be a write only operation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12243 >
2021-09-02 19:39:04 +00:00
Daniel Schürmann
8bd7e2392b
aco: preserve subdword RC when lowering p_insert/p_extract
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12640 >
2021-09-02 20:39:17 +02:00
Daniel Schürmann
73481338fe
aco/print_ir: always print SDWA dst & src selections
...
This way, it becomes more apparent how SDWA behaves.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12640 >
2021-09-02 20:39:17 +02:00
Daniel Schürmann
0988f7b9ba
aco: remove explicit dst_preserve flag
...
Instead, we can rely on the fact that subdword definitions
must preserve the unused bits while dword definitions either
pad or sign-extend.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12640 >
2021-09-02 20:39:17 +02:00
Daniel Schürmann
9e3ff06c38
aco: rewrite SDWA selector
...
This commit introduces a new struct SubdwordSel
in order to ease and clean up the usage of SDWA
selections. This includes removing the distinction
between register-allocated and fixed SDWA selections.
Instead, SDWA selections can now also access the high
bits of subdword variables. Alignment and sizes are
validated accordingly. Size, offset and sign_extend
can be evaluated via helper methods.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12640 >
2021-09-02 20:39:17 +02:00
Daniel Schürmann
cc4682ed47
aco: fix p_insert lowering with 16bit sources
...
The previous lowering only wrote a single byte.
Fixes: 2f94353735 ('aco: add p_extract/p_insert')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12640 >
2021-09-02 20:39:17 +02:00
Yiwei Zhang
cc62fbed6d
venus: suggest the proper sampler ycbcr model conversion based on format
...
Cc: 21.2.3 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12694 >
2021-09-02 18:09:04 +00:00
Samuel Pitoiset
607a14b870
radv: remove NGG streamout support in LLVM
...
It has never really been used due to various issues with GDS in the
past and it will be lowered in NIR at some point.
The driver support is still there because it can likely be re-used.
This implementation can also be used as a reference point.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12695 >
2021-09-02 17:58:51 +02:00
Mike Blumenkrantz
c552d99b09
zink: use imageless framebuffers
...
this feature lets zink avoid the screen-based framebuffer cache with locks
in favor of a context-based one that doesn't need any complicated wizardry
to work since it doesn't need to track refcounts for attachments or work
across contexts since the surface info gets passed in when the renderpass
is begun
also expand the dummy surface to an array for use with multisampling and simplify
surface refs there for non-imageless case
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12661 >
2021-09-02 15:53:16 +00:00
Mike Blumenkrantz
9643f0b8fc
zink: store some surface metadata to struct during creation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12661 >
2021-09-02 15:53:16 +00:00
Mike Blumenkrantz
cf8997ab58
zink: store some image creation metadata to object struct
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12661 >
2021-09-02 15:53:16 +00:00
Mike Blumenkrantz
42c47ef465
zink: move get_framebuffer() to zink_framebuffer.c
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12661 >
2021-09-02 15:53:16 +00:00
Samuel Pitoiset
b31994cf67
radv: fix determining the maximum number of waves that can use scratch
...
This estimation was incorrect, the number of waves doesn't only
depend of the number of VGPRs.
Though, {SPI,COMPUTE}_TMPRING_SIZE.WAVES should limit the number of
scratch waves in flight, not sure if limiting it really works.
This fixes a GPU hang with an upcoming game, and this might also
helps resolving some spurious random GPU hangs.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12700 >
2021-09-02 15:09:07 +00:00
Daniel Schürmann
ef7d840a70
aco/lower_phis: optimize loop exit phis
...
This optimization works by ensuring that disabled lanes
are zero'd before any merge sequence.
Totals from 6075 (4.05% of 150170) affected shaders: (GFX10.3)
CodeSize: 57913908 -> 57913212 (-0.00%)
Instrs: 11055852 -> 11055678 (-0.00%)
Latency: 438705219 -> 438534652 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 125284101 -> 125251397 (-0.03%); split: -0.03%, +0.00%
Copies: 807388 -> 821035 (+1.69%); split: -0.00%, +1.69%
Branches: 391827 -> 391782 (-0.01%)
PreSGPRs: 574841 -> 574838 (-0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11659 >
2021-09-02 16:41:52 +02:00
Daniel Schürmann
207249d2b2
aco/lower_phis: propagate constants before emitting merge code
...
This generalizes a previous optimization.
Totals from 521 (0.35% of 150170) affected shaders: (GFX10.3)
CodeSize: 1680348 -> 1678884 (-0.09%)
Instrs: 307994 -> 307628 (-0.12%)
Latency: 5799845 -> 5792655 (-0.12%)
InvThroughput: 994859 -> 994030 (-0.08%)
Copies: 18992 -> 18767 (-1.18%)
Branches: 10143 -> 10037 (-1.05%)
PreSGPRs: 21904 -> 21853 (-0.23%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11659 >
2021-09-02 16:41:52 +02:00
Daniel Schürmann
aed7b7d185
aco/lower_bool_phis: avoid creating trivial phis
...
For this purpose, get_ssa() is also refactored slightly.
Totals from 4 (0.00% of 150170) affected shaders: (GFX10.3)
CodeSize: 15504 -> 15376 (-0.83%)
Instrs: 2942 -> 2910 (-1.09%)
Latency: 292444 -> 291642 (-0.27%)
InvThroughput: 30842 -> 30770 (-0.23%)
Copies: 164 -> 150 (-8.54%)
Branches: 96 -> 82 (-14.58%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11659 >
2021-09-02 16:41:52 +02:00
Daniel Schürmann
6d8ea54654
aco: refactor lower_phis()
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11659 >
2021-09-02 16:41:52 +02:00
Daniel Schürmann
e4c5062fb7
aco: fix init_any_pred_defined() for loop header phis
...
This includes setting the correct end point of the propagation and
not propagating the incoming values after the loop header.
This patch also changes the propagation to a single iteration for
loop exit phis.
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
aco: don't propagate incoming value in init_any_pred_defined()
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11659 >
2021-09-02 16:41:52 +02:00
Carsten Haitzler
6f56eb2429
panfrost: tidy up GPU naming to be in line with official names
...
Offical naming of Mali GPUs is like Mali-G52 or Mali-T860 wth a dash.
Also variants of the same GPU e.g. revision 1 are generally not part
of the name. This adds a dash instead of a space between Mali and the
model and also splits off the r1 revision with a space. This should
keep the naming in-line with offical names and with what the binary
DDK uses for naming.
Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12667 >
2021-09-02 11:16:49 +00:00
Samuel Pitoiset
da9f1a7340
radv: use common vkGet{Buffer,Image}MemoryRequirements()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
48cae114c2
radv: use common vkBind{Buffer,Image}Memory()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
757545b90e
radv: use common vkGetDeviceQueue()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
9fc16b66d0
radv: use common vkGetPhysicalDevice{Image}FormatProperties()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
8a9c17bf4e
radv: use common entrypoints for sparse image requirements/properties
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
f695171e38
vulkan: add common entrypoints for sparse image requirements/properties
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
e62d3db64b
radv: do not disable DCC for storage images if atomics aren't enabled
...
VK_FORMAT_R32_SFLOAT seems pretty common and it seems we can be a
little smarter when shader image 32-bit float atomics aren't enabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12406 >
2021-09-02 10:40:43 +02:00
Samuel Pitoiset
a17756c865
radv: track if shader image 32-bit float atomics are enabled
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12406 >
2021-09-02 10:40:42 +02:00
Samuel Pitoiset
8dd9287ce5
radv: call nir_lower_int64() for LLVM
...
Seems to run fine now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12665 >
2021-09-02 08:04:22 +02:00
Iago Toral Quiroga
0496a39b1f
v3dv: make v3dv_image_view derive from vk_image_view
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12668 >
2021-09-02 05:53:39 +00:00
Iago Toral Quiroga
f0e299fc5c
v3dv: use subresource helpers in more places
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12668 >
2021-09-02 05:53:39 +00:00
Iago Toral Quiroga
f1c6f05c35
v3dv: make v3dv_image derive from vk_image
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12668 >
2021-09-02 05:53:39 +00:00
Iago Toral Quiroga
77f2e2a75f
vulkan: allow creating color views from depth/stencil images
...
Some drivers may want to implement certain depth/stencil operations by
reinterpreting a depth/stencil format as a color format. This is not
strictly allowed by the Vulkan spec, so handle it separately.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12668 >
2021-09-02 05:53:39 +00:00
Francisco Jerez
dfef775c8a
iris: Make sure a bound resource is flushed after iris_dirty_for_history.
...
This is the last step before we can start removing the history flush
mechanism: In cases where a dirtied buffer has the potential to be
concurrently bound to the pipeline (as indicated by the bind_history
mask), flag the "flush" dirty bits corresponding to its binding point.
This ensures that the buffer-local memory barriers introduced earlier
in this series are executed before the next draw call, which in turn
will emit any necessary PIPE_CONTROLs in cases where the buffer is
bound through a cache incoherent with the cache that performed the
write.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
9f1053a1f3
iris: Track dirty UBOs per-stage for more targeted flushing.
...
This allows us to skip over individual constant buffer bindings which
haven't been changed since the last flush, or which are set to a user
buffer, which means they don't require flushing.
Omitting this commit would lead to the following statistically
significant Piglit Draw Overhead regressions:
107/DrawArrays (16 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.31% x22 -> XXX ±2.55% x21 d=-3.49% ±2.38% p=0.00%
79/DrawArrays ( 1 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: XXX ±1.90% x22 -> XXX ±2.25% x21 d=-3.20% ±2.04% p=0.00%
78/DrawArrays ( 1 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.64% x22 -> XXX ±2.58% x21 d=-2.74% ±2.58% p=0.12%
45/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.53% x22 -> XXX ±2.29% x21 d=-2.41% ±2.39% p=0.20%
108/DrawArrays (16 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: XXX ±2.10% x22 -> XXX ±1.41% x21 d=-2.36% ±1.78% p=0.01%
16/DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.44% x22 -> XXX ±1.19% x21 d=-2.12% ±1.93% p=0.09%
46/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: XXX ±2.93% x22 -> XXX ±2.44% x21 d=-1.99% ±2.68% p=1.93%
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
8be320117b
iris: Use separate dirty bits for UBO and SSBO flushes.
...
This moves UBO+SSBO flushing into a dirty bit separate from the one
used for image and sampler views, which saves some CPU overhead in the
frequent case where buffers from only one or the other set are updated.
Omitting this commit would lead to the following statistically
significant Piglit Draw Overhead regressions:
107/DrawArrays (16 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.31% x22 -> XXX ±1.80% x21 d=-24.31% ±1.91% p=0.00%
78/DrawArrays ( 1 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.64% x22 -> XXX ±2.21% x21 d=-24.13% ±2.22% p=0.00%
45/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.53% x22 -> XXX ±1.90% x21 d=-23.63% ±2.07% p=0.00%
16/DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ 1 UBO change: XXX ±2.44% x22 -> XXX ±1.97% x21 d=-23.23% ±2.04% p=0.00%
108/DrawArrays (16 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: XXX ±2.10% x22 -> XXX ±1.50% x21 d=-22.15% ±1.71% p=0.00%
79/DrawArrays ( 1 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: XXX ±1.90% x22 -> XXX ±1.70% x21 d=-22.12% ±1.64% p=0.00%
17/DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: XXX ±2.85% x22 -> XXX ±1.59% x21 d=-21.03% ±2.22% p=0.00%
46/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ 8 UBOs change: XXX ±2.93% x22 -> XXX ±1.09% x21 d=-20.62% ±2.18% p=0.00%
7/DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ vertex attrib change: XXX ±9.30% x22 -> XXX ±7.02% x21 d=-6.49% ±8.08% p=1.19%
68/DrawArrays ( 1 VBO| 8 UBO| 8 Tex) w/ shader program change: XXX ±1.60% x22 -> XXX ±1.93% x21 d=-2.23% ±1.75% p=0.01%
6/DrawElements ( 1 VBO| 8 UBO| 8 Tex) w/ shader program change: XXX ±2.90% x22 -> XXX ±2.71% x21 d=-2.04% ±2.78% p=2.08%
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
5c44df011f
iris: Insert buffer-local memory barriers for UBO reads.
...
Similar to what was previously done for other kinds of buffers --
Insert memory barriers at resolves-and-flushes time instead of relying
on the history flush mechanism.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
077af5c928
iris: Insert buffer-local memory barriers for SSBO reads and writes.
...
Similar to what was previously done for vertex buffers, render
buffers, etc -- Insert memory barriers at resolves-and-flushes time
instead of relying on the history flush mechanism.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
8e49d4809e
iris: Use DATA domain barrier for shader images instead of OTHER domain.
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
cb9f02f863
iris: Add read-write domain for data cache.
...
This will allow us to remove the history flushes performed for SSBOs
and instead take advantage of the same mechanism used for tracking
other memory accesses.
v2: Use C99 designated initializers (Ken).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
c677e76483
iris: Insert buffer-local memory barriers for indirect draw parameters.
...
This adds buffer-local barriers so any required synchronization
commands are emitted before a buffer object is used as source for
indirect draw parameters. An unconditional PIPE_CONTROL meant to
flush the contents of the draw count buffer can now be removed, since
it's redundant with the more accurate buffer-local barrier introduced
here, which should avoid flushing in cases where the buffer wasn't
written by any incoherent cache since the last flush.
(Rebased by Kenneth Graunke.)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
51f022cc03
iris: Add separate dirty bit for VBO flushes.
...
Instead of emitting barriers every time IRIS_DIRTY_VERTEX_BUFFERS is
flagged, use a separate dirty bit and optimize out the barriers in
cases where the same buffer object is re-bound as vertex buffer.
Omitting this commit would lead to the following statistically
significant Piglit Draw Overhead regressions:
36/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ vertex attrib change: XXX ±7.22% x22 -> XXX±11.09% x21 d=-20.10% ±8.06% p=0.00%
98/DrawArrays (16 VBO| 8 UBO| 8 Tex) w/ vertex attrib change: XXX ±7.27% x22 -> XXX ±7.70% x21 d=-17.76% ±6.83% p=0.00%
69/DrawArrays ( 1 VBO| 8 UBO| 8 Tex) w/ vertex attrib change: XXX ±9.94% x22 -> XXX ±8.72% x21 d=-7.46% ±9.08% p=1.02%
53/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ depth enable change: XXX ±8.34% x22 -> XXX ±6.88% x21 d=-7.30% ±7.45% p=0.26%
61/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ cull face enable change: XXX±10.22% x22 -> XXX ±8.63% x21 d=-6.75% ±9.23% p=2.11%
55/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ stencil enable change: XXX ±9.30% x22 -> XXX ±7.25% x21 d=-6.60% ±8.16% p=1.14%
50/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ viewport change: XXX ±6.48% x22 -> XXX ±5.93% x21 d=-6.58% ±6.04% p=0.09%
54/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ depth clamp enable change: XXX ±9.95% x22 -> XXX ±7.95% x21 d=-6.50% ±8.81% p=2.02%
35/DrawElements (16 VBO| 8 UBO| 8 Tex) w/ shader program change: XXX ±7.27% x22 -> XXX ±7.25% x21 d=-5.77% ±7.06% p=1.06%
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
4cce00350f
iris: Insert buffer-local memory barriers for VF reads.
...
This ensures that any required synchronization (i.e. PIPE_CONTROL)
commands are emitted whenever a vertex or index buffer is used in
cases where it had been previously accessed from an incoherent caching
domain.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
4ab1048cf9
iris: Annotate all BO uses through VF cache domain.
...
This promotes some of the previously introduced IRIS_DOMAIN_OTHER_READ
annotations used for vertex data to the more specific
IRIS_DOMAIN_VF_READ domain.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Francisco Jerez
ff601897fb
iris: Add read-only domain for VF cache.
...
This will allow us to order writes and reads of vertex and index
buffers by using the same cache tracking infrastructure introduced
previously for render and depth buffers. The ultimate goal is to
remove the somewhat heavy-handed history flush mechanism currently
used for buffer objects, and use a single cache tracking mechanism
across the whole driver.
v2: Use C99 designated initializers (Ken).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12691 >
2021-09-02 03:14:37 +00:00
Mike Blumenkrantz
c679dbe09c
lavapipe: unbreak imageless framebuffer
...
vk cmd queue doesn't copy pNext pointers
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12688 >
2021-09-01 21:40:00 -04:00
Yiwei Zhang
97aa90dec2
venus: workaround a blob_mem mappable size check issue
...
For blob_mem allocated from virtgpu_virgl backend, the guest mappable
size queried can be smaller than the size returned from image memory
requirement query from the host side. Here we temporarily workaround
until we switch to use cross-domain backend in minigbm.
Cc: 21.2.3 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12687 >
2021-09-01 22:38:48 +00:00
Yiwei Zhang
cbdec34db3
venus: renderer to check map size only when mappable
...
Cc: 21.2.3 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12687 >
2021-09-01 22:38:48 +00:00
Mike Blumenkrantz
ae6a5e8f46
docs: update features for lavapipe
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12627 >
2021-09-01 22:01:03 +00:00
Mike Blumenkrantz
9be8c48058
lavapipe: support EXT_primitive_topology_list_restart
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12627 >
2021-09-01 22:01:03 +00:00
Paulo Zanoni
89a34cb845
iris: switch to explicit busy tracking
...
We're moving away from relying on the Kernel's implicit busy tracking
into our own tracking, except for shared buffers.
Not only this shouldn't hurt now (it doesn't, according to my
measurements), when we switch to vm_bind we will be able to cut some
significant overhead by simply omitting all the async buffers from the
execbuf ioctl.
v2:
- Change iris_bo_busy() to bool (Ken).
- Fix coding style issues (Ken).
- Rebase on not having the refcount _inc and _dec helpers anymore
(Ken).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4748
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12363 >
2021-09-01 21:48:13 +00:00
Paulo Zanoni
d1c27d214b
iris: give each screen of a bufmgr a unique ID
...
We want to implement explicit BO dependency tracking and for that
we'll use arrays of dependencies (syncobjs) indexed by screen->id.
This is way more efficient than storing and checking screen pointers
everywhere.
v2: Properly use atomic operations in a non-racy way (Alyssa, Ken).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12363 >
2021-09-01 21:48:13 +00:00
Paulo Zanoni
b2c811ccdc
iris: syncobjs are now owned by bufmgr instead of screen
...
The next patches will justify the new ownership. We want the BOs to
have references on the batches' syncobjs so we can implement implicit
tracking. In other words: BOs will be able to wait on syncobjs owned
by different screens. Since our syncobjs are actually just a Kernel
handle with a refcount, they can be used globally and it makes more
sense to map them to the bufmgr, just like the BOs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12363 >
2021-09-01 21:48:13 +00:00
Samuel Pitoiset
971a373caf
radv: use radeon_set_sh_reg_seq() more for initial gfx/compute state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12671 >
2021-09-01 20:46:29 +00:00
Chia-I Wu
bd04ff972e
venus: initialize physical devices once
...
Avoid re-enumeration when there is no device or no supported device.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12653 >
2021-09-01 20:27:50 +00:00
Chia-I Wu
7dfac808b0
venus: no supported device is not an error
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12653 >
2021-09-01 20:27:50 +00:00
Chia-I Wu
fc74233363
venus: group physical device fields with a struct
...
This makes it clear what the mutex protects.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12653 >
2021-09-01 20:27:50 +00:00
Mike Blumenkrantz
7aef59ccd2
radv: add some asserts for descriptor updating
...
let's avoid any further issues with descriptor sizing
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12620 >
2021-09-01 20:08:24 +00:00
Tomeu Vizoso
ec44c48945
vulkan: Remove dependency on Python 3.9+
...
Closes #5311 .
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Fixes: 997a6ca226 ("vulkan: Generate entrypoints that enqueue commands")
Fixes: a7b0946ef0 ("vulkan: Generate code to place commands in a queue")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12672 >
2021-09-01 19:46:14 +00:00
Connor Abbott
1963a61faa
freedreno/computerator: Add support for pvtmem
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11876 >
2021-09-01 19:26:41 +00:00
Emma Anholt
b16587c14c
ci/freedreno: Add a bunch of recent a530 and a630 flakes.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12683 >
2021-09-01 19:05:53 +00:00
Emma Anholt
41c5dd972e
ci/freedreno: Annotate a bunch of piglit fails/crashes.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12683 >
2021-09-01 19:05:53 +00:00
Mike Blumenkrantz
34f0aef19b
radv: just use UINT64_MAX when getting absolute timeout for that value
...
this would otherwise result in (UINT64_MAX - gettime()), which can effectively
be rounded to UINT64_MAX without a noticeable change
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12680 >
2021-09-01 17:47:33 +00:00
Mike Blumenkrantz
45f35900c3
mesa/st: create new surfaces before destroying old ones when updating attachments
...
try to avoid patterns that would destroy surfaces for drivers that cache them for
deduplication purposes
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12651 >
2021-09-01 15:43:48 +00:00
Adrian Bunk
7155676618
util/format: NEON is not available with the soft-float ABI
...
Fixes: 80923e8d58 ("util/format: Add some NEON intrinsics-based u_format_unpack.")
Reviewed-by: Emma Anholt <emma@anholt.net >
Tested-by: Ross Burton <ross.burton@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12569 >
2021-09-01 15:18:02 +00:00
Timur Kristóf
fe6e4484ab
ac/nir/nggc: Move gs_alloc_req up in NGG culling shaders.
...
This is the first part of a refactor to make vertex compaction optional.
Additionally, it may yield a very small benefit to allocate the PC
space sligtly sooner.
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 58239 (45.27% of 128647) affected shaders:
CodeSize: 160502348 -> 160502340 (-0.00%)
Instrs: 30722664 -> 30722662 (-0.00%)
Latency: 137627419 -> 137782218 (+0.11%); split: -0.00%, +0.11%
InvThroughput: 21698587 -> 21699068 (+0.00%); split: -0.00%, +0.00%
Copies: 3288263 -> 3288261 (-0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12246 >
2021-09-01 14:45:14 +00:00
Timur Kristóf
f4a65e5628
ac/nir/nggc: Only repack arguments that are needed.
...
Don't repack everything, only what is actually used.
The goal of this commit is primarily to remove unnecessary
LDS stores and loads. In addition to that, it also gets rid of
a few VALU instructions and reduces VGPR use.
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 6951 (5.40% of 128647) affected shaders:
VGPRs: 206056 -> 205360 (-0.34%); split: -0.79%, +0.45%
CodeSize: 12344568 -> 12269312 (-0.61%); split: -0.62%, +0.01%
MaxWaves: 211206 -> 212196 (+0.47%)
Instrs: 2319459 -> 2308483 (-0.47%); split: -0.50%, +0.03%
Latency: 7220829 -> 7164721 (-0.78%); split: -1.21%, +0.43%
InvThroughput: 1051450 -> 1049191 (-0.21%); split: -0.36%, +0.15%
VClause: 25794 -> 25445 (-1.35%); split: -1.97%, +0.61%
SClause: 39192 -> 39277 (+0.22%); split: -0.21%, +0.43%
Copies: 315756 -> 313404 (-0.74%); split: -1.17%, +0.42%
Branches: 127878 -> 127879 (+0.00%); split: -0.00%, +0.00%
PreVGPRs: 168029 -> 160162 (-4.68%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12246 >
2021-09-01 14:45:14 +00:00
Timur Kristóf
02bba6aab5
ac/nir/nggc: Don't stop applying reusable variables at prim export.
...
This was a mistake that prevented reusing variables in shaders
with late primitive export.
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 6547 (5.09% of 128647) affected shaders:
VGPRs: 323368 -> 323824 (+0.14%); split: -0.03%, +0.18%
SpillSGPRs: 45 -> 4865 (+10711.11%)
CodeSize: 34208732 -> 33855952 (-1.03%); split: -1.21%, +0.18%
MaxWaves: 142538 -> 142456 (-0.06%); split: +0.04%, -0.09%
Instrs: 6654252 -> 6606432 (-0.72%); split: -0.89%, +0.17%
Latency: 30527770 -> 30452769 (-0.25%); split: -0.42%, +0.18%
InvThroughput: 5604540 -> 5609450 (+0.09%); split: -0.04%, +0.13%
VClause: 121531 -> 120448 (-0.89%); split: -1.17%, +0.27%
SClause: 195388 -> 177902 (-8.95%); split: -9.14%, +0.19%
Copies: 617949 -> 636397 (+2.99%); split: -0.44%, +3.42%
Branches: 228184 -> 228281 (+0.04%); split: -0.09%, +0.13%
PreSGPRs: 271395 -> 343555 (+26.59%); split: -0.01%, +26.60%
PreVGPRs: 277650 -> 277710 (+0.02%); split: -0.01%, +0.03%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12246 >
2021-09-01 14:45:14 +00:00
Timur Kristóf
59de9620b4
ac/nir/ngg: Delete unused struct.
...
This was left there by accident after a rebase mistake.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12246 >
2021-09-01 14:45:14 +00:00
Tomeu Vizoso
25720f84df
lavapipe: Use c_msvc_compat_args
...
So local builds fail before the Windows build finds out.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12662 >
2021-09-01 16:00:01 +02:00
Danylo Piliaiev
6373dd814a
ir3/a6xx,freedreno: account for resinfo return size dependency on IBO_0_FMT
...
On a6xx resinfo returns size in bytes divided by IBO_0_FMT format size
(not just size in dwords), we have to shift it back to NIR meaning which
is size in bytes.
Make freedreno use 16b buffers when they are supported in order to be
able to depend on hardware capabilities when lowering ssbo size.
Fixes: ce1a381e57 "turnip: enable VK_KHR_16bit_storage on A650"
Fixes cts tests:
dEQP-VK.ssbo.unsized_array_length.float_offset_explicit_size
dEQP-VK.ssbo.unsized_array_length.float_no_offset_whole_size
dEQP-VK.compute.basic.write_multiple_unsized_arr_single_invocation
and many more
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12485 >
2021-09-01 16:09:20 +03:00
Mykhailo Skorokhodov
e8cbfa95a3
iris: Fix compute shader leak
...
Variant after creation with the function iris_create_shader_variant
requires to be added to variants. Otherwise there is a memory
leak after execution.
Fixes: 2024d470483("iris: Add the variant to the list as early as possible")
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12645 >
2021-09-01 10:02:38 +00:00
Timur Kristóf
9d20cf2732
aco: Fix invalid usage of std::fill with std::array.
...
In this case std::array doesn't behave like a regular array, therefore
it is NOT okay to index it outside the array, even though std::fill
needs us to do so.
Change the syntax to do the same thing slightly differently,
and add an assertion to make sure the registers are always within
the array's bounds.
Closes : #5289
Fixes: 0e4747d3fb
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12664 >
2021-09-01 09:33:28 +00:00
Vinson Lee
498d93f3dd
glx: Fix unused-variable warning with macOS build.
...
../src/glx/tests/indirect_api.cpp:52:20: warning: unused variable 'nil' [-Wunused-variable]
static const void *nil = 0;
^
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12607 >
2021-09-01 09:03:53 +00:00
Timur Kristóf
33630090a2
nir: Add comment to explain the sad_u8x4 opcode.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12649 >
2021-09-01 08:42:03 +00:00
Connor Abbott
77a852c1ba
lima/gpir: Rewrite register allocation for value registers
...
The usual linear-scan register allocation algorithm can't handle
preallocated registers, since we might be forced to choose a color for
a non-preallocated variable that overlaps with a pre-allocated variable.
But in such cases we can simply split the live range of the offending
variable when we reach the beginning of the pre-allocated variable's
live range. This is still optimal in the sense that it always finds a
coloring whenever one is possible, but we may not insert the smallest
possible number of moves. However, since it's actually the scheduler
which splits live ranges afterwards, we can simply fold in the move
while keeping its fake dependencies, and then everything still works! In
other words, inserting a live range split for a value register during
register allocation is pretty much free.
This means that we can split register allocation in two. First globally
allocate the cross-block registers accessed through load_reg and
store_reg instructions, which is still done via graph coloring, and then
run a linear scan algorithm over each block, treating the load_reg and
store_reg nodes as referring to pre-allocated registers. This makes the
existing RA more complicated, but it has two benefits: first, using
round-robin with the linear scan allocator results in much fewer fake
dependencies, resulting in around 15 less instructions in the glmark2
jellyfish shader and fixing a regression in instruction count since
branching support went in. Second, it will simplify handling spilling.
With just graph coloring for everything, every time we spill a node, we
have to create new value registers which become new nodes in the graph
and re-run RA. This is worsened by the fact that when writing a value to
a temporary, we need to have an extra register available to load the
write address with a load_const node. With the new scheme, we can ignore
this entirely in the first part and then in the second part we can just
reserve an extra register in sections where we know we have to spill. So
no re-running RA many times, and we can get a good result quickly.
The current implementation does linear scan backwards, so that we can
insert the fake dependencies while allocating and avoid creating any
move nodes at all when we have to split a live range. However, it turns
out that this makes handling schedule_first nodes a bit more
complicated, so it's not clear if that was worth it.
Note:
The commit was originally authored by Connor Abbott <cwabbott@gmail.com >
and was cherry-picked from <mesa/mesa!2315>.
Rebasing was necessary due to changes to BITSET_FOREACH_SET,
see 4413537c
Because some deqp tests pass now, deqp-lima-fails.txt was also changed.
The above changes are
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7682 >
2021-09-01 08:30:57 +00:00
Connor Abbott
3d957b40cc
lima: Add a NIR load duplicating pass
...
and use it with vertex shaders.
Note:
The commit was originally authored by Connor Abbott <cwabbott@gmail.com >
and was cherry-picked from <mesa/mesa!2315>.
Apart from some changes, which were necessary due to rebasing, the following
changes have been added:
clone_intrinsic() was changed to use nir_instr_clone() instead of
doing it manually.
Tests against `src->parent_instr->type != nir_instr_type_phi` have been
inserted, otherwise we may run into a nir validation error.
Intrinsic load_input and load_uniform are not duplicated, if their source
type is nir_instr_type_load_const.
The above changes are
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7682 >
2021-09-01 08:30:57 +00:00
Marek Olšák
ef190b9e15
radeonsi: clean up typecasts in compute_copy_image
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
34a2c75310
radeonsi: enable DCC stores on gfx10.3 APUs for better performance
...
There is just one hw bug that we need to handle.
NO_DCC_FB was unused.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
c88a546550
radeonsi: track displayable_dcc_dirty for non-compute shaders
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
8c845d4cb4
radeonsi: rename DCC_WRITE -> ALLOW_DCC_STORE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
550f859c53
radeonsi: handle pipe_aligned in compute_expand_fmask
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
0c39597734
radeonsi: add missing make_CB_shader_coherent for DCC stores into copy_image
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
cb845c53f4
radeonsi: enable DCC stores for clear_render_target on gfx10
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
b648d6fbf8
radeonsi: disable DCC stores on Navi12-14 for displayable DCC to fix corruption
...
This is a hardware limitation.
Fixes: 1d64a1045e "radeonsi: enable dcc image stores on gfx10+"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Mike Blumenkrantz
0b2b2a4783
zink: remove ZINK_HEAP_HOST_VISIBLE_ANY
...
this was just the coherent heap but splitting the slabs more to make
suballocating worse
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12659 >
2021-09-01 04:24:03 +00:00
Mike Blumenkrantz
a923835afc
zink: clamp lazy pools to 500 descriptors and allocate more slowly
...
now that these can get popped without stalling, they can be much smaller
to avoid exploding available memory or address space
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12658 >
2021-09-01 04:13:07 +00:00
Mike Blumenkrantz
70f1337f63
zink: use compatible renderpass state in pipeline hash
...
this massively deduplicates the number of pipelines
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
8dac288c8d
zink: track compatible render passes
...
Two render passes are compatible if their corresponding color, input, resolve, and depth/stencil
attachment references are compatible and if they are otherwise identical except for:
• Initial and final image layout in attachment descriptions
• Load and store operations in attachment descriptions
• Image layout in attachment references
VK 8.2
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
d7e36a1831
zink: inline gfx pipeline hash table
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
15450d2c2e
zink: incrementally hash all pipeline component hashes
...
not the actual pipeline hash, just the components
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
12cf0099fd
zink: incrementally hash vertex state into pipeline hash
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
6fd5565933
zink: incrementally hash module variants in pipeline
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
7f23c9daca
zink: incrementally hash gfx shader stages
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
07240424ca
zink: don't use dynamic vertex stride with dynamic vertex input
...
avoid spurious validation errors and potential driver fails from updating
stride twice
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12604 >
2021-09-01 03:18:14 +00:00
Mike Blumenkrantz
34abd8761a
zink: dynamic vertex input template
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12604 >
2021-09-01 03:18:14 +00:00
Mike Blumenkrantz
e53e5165b1
zink: create inner scanout object without scanout binds
...
this restores mutable formats to the inner object to work with scanout
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12629 >
2021-09-01 03:07:55 +00:00
Mike Blumenkrantz
63e62af31c
zink: ensure gfx shader module states are updated when doing a partial recalc
...
these are in the pipeline state and must be updated
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12632 >
2021-09-01 02:56:04 +00:00
Mike Blumenkrantz
c71e662ae2
zink: remove refcounting from batch states
...
these are always destroyed by the context, no exceptions
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12633 >
2021-09-01 02:46:00 +00:00
Mike Blumenkrantz
39df394ffe
zink: split out stalling from fence-waiting function
...
stall and flush+stall are not the same; in some cases, the driver must only
stall and never flush, so ensure that this is possible to avoid infinite
recursion
fixes Metro Last Light: Redux benchmark mode
Fixes: d8905446d6 ("zink: rework oom flushing")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12652 >
2021-09-01 02:35:38 +00:00
Mike Blumenkrantz
2aaca02bbf
zink: use tc rebind info for buffer replacements
...
this makes the most common type of replacement more efficient
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12575 >
2021-09-01 02:23:05 +00:00
Mike Blumenkrantz
52a846d147
zink: directly pass resource pointer to descriptor state updates
...
this should cut down a little more overhead
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12575 >
2021-09-01 02:23:05 +00:00
Mike Blumenkrantz
802e43a6b5
gallium/cso: add unbind mask for cso restore
...
this code was duplicated in a bunch of places, so now there can just
be a bitmask passed to simplify and consolidate
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12571 >
2021-09-01 01:59:52 +00:00
Mike Blumenkrantz
7ac2edd555
aux/cso: always restore states in atom order
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12571 >
2021-09-01 01:59:52 +00:00
Mike Blumenkrantz
b7534fe82a
zink: destroy shader modules on program free to avoid leaking
...
it's irrelevant whether the shader pointer is valid, the shader cache
may still exist
Fixes: a92442225c ("zink: split up shader cache per-stage")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12650 >
2021-09-01 01:48:04 +00:00
Tomeu Vizoso
eb7eccc76f
lavapipe: Use generated command queue code
...
Most of the code that implements entry points for commands doesn't need
to be manually written. So just drop it.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
997a6ca226
vulkan: Generate entrypoints that enqueue commands
...
For drivers such as Lavapipe that record the commands at the execution
stage.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
a7b0946ef0
vulkan: Generate code to place commands in a queue
...
It can be used by lavapipe and also by drivers for GPUs with command
streams that require values related to the framebuffer, thus the command
stream emission for secondary buffers needs to be deferred until the
framebuffer is known (execution time).
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
925a8fac17
vulkan: Read len attribute of parameters to functions
...
It will be needed for generating code that needs to know the size of
arrays.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
77ad17d022
lavapipe: add xfails for whole of CTS
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Marek Olšák
3362da2c53
ac/gpu_info: fix detection of smart access memory
...
chip_class was 0. Move the code after setting chip_class.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5282
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
e05ad2680c
radeonsi: set gfx10 registers better in si_emit_initial_compute_regs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
deacef5d43
radeonsi: fix a memory leak in si_get_shader_binary_size
...
Fixes: bf8a1ca902 "radeonsi: use the new run-time linker for shaders"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5272
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
46cb3bb4d1
ac/debug: add an option to disable colors for printed IBs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
6cb2f07e90
radeonsi: add si_print_current_ib function for debugging
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
f28552b804
radeonsi: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x
...
SQ_NON_EVENT was originally meant to fix a perf issue on Navi1x, but using
the event actually makes the perf worse.
This improves perf for viewperf/snx.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
9fb77745f5
radeonsi: inline si_need_gfx_cs_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
77a0411694
winsys/amdgpu: clean up amdgpu_cs_check_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
48632778b9
radeonsi: simplify si_need_gfx_cs_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
85742b28ef
radeonsi: inline remaining big functions in draw_vbo for better snx perf
...
This makes compilation slower, but the perf improvement is ~4%
with pipe_vertex_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b15c413947
radeonsi: simplify memory usage checking by merging vram and gtt counters
...
no change in behavior
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b92e109ac6
radeonsi: correctly use cs instead of gfx_cs in build pm4 helpers
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b29741906d
radeonsi: use memcmp and radeon_emit_array in radeon_opt_set_context_regn
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
0aed2d0cd3
radeonsi: stop using AC_EXP_PARAM_UNDEFINED because it's not useful
...
Just use AC_EXP_PARAM_DEFAULT_VAL_0000 to keep things simple.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
2027831aaa
radeonsi: inline si_get_alpha_test_func
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
c005b2cd4b
radeonsi: move as_ls/es/ngg setting out of si_shader_selector_key
...
Do it when we bind shaders.
The advantages are:
- no need to memset the fields when any shader variant state is changed
(e.g. culling on/off)
- no need to recompute the fields every time that happens
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
5a8a716168
radeonsi: move si_vgt_stages_key determination into si_update_vgt_shader_config
...
This simplifies si_update_shaders. It also makes it more obvious that
si_update_shaders could become a C++ template one day.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
ec37db756e
radeonsi: remove stages_key parameter from si_shader_selector_key
...
no change in behavior
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
08310f85ae
radeonsi: remove instancing support from the prim discard compute shader
...
It's not important for workstation apps on Vega.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
9ec707ca37
radeonsi: remove unused depth_clamp_any
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
6367d8036a
mesa: skip draw calls with unaligned indices
...
GL doesn't say which error we should report. dEQP expects no error and
no crash and allows skipping the call. Some drivers can crash.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5227
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533 >
2021-08-31 23:54:51 +00:00
Marek Olšák
614f273ab4
mesa: fix gl_DrawID with indirect multi draws using user indirect buffer
...
The code lowered the draws to direct ones but disregarded gl_DrawID.
We need to pass the draw ID to the driver manually.
gl_DrawID is the 3rd parameter of DrawGallium here.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5274
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533 >
2021-08-31 23:54:51 +00:00
Marek Olšák
1f80cd35cb
mesa: remove unused indices parameter from validate functions
...
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533 >
2021-08-31 23:54:51 +00:00
Dave Airlie
07956bbcae
lavapipe: VK_KHR_depth_stencil_resolve support
...
This adds support for depth stencil resolves to lavapipe.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Dave Airlie
3235b695b2
u_blitter: add support for sample0 only resolves.
...
This adds support for sample0 only resolves to support lavapipe
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Dave Airlie
4d747c0c89
gallium: add a sample0 only option to blitter.
...
Vulkan depth/stencil resolves can ask for just sample 0 instead
of averaging. Just add a flag to the state to allow it.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Dave Airlie
a5786a2e71
llvmpipe: adjust scissor planes for multisample.
...
For the inclusive x0/y0 planes, add a half pixel adjustment
For the exclusive x1/y1 planes, remove a half pixel adjustment
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Dave Airlie
519f235459
llvmpipe/scissor: rewrite scissor planes interaction.
...
This just changes the calcs to be cleaner and easier to interpret.
Adjust the inclusive (x0/y0) by -1 like before, and then flip the
sign for the correct direction.
Add full pixel to the exclusive side after scaling, this is do
show that this value is incorrect and the next patch fixes that
taking multisample into account
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Dave Airlie
22b5e61db9
llvmpipe: consolidate scissor plane code between line/tri
...
This code is pretty much the same in both, consolidate it.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Dave Airlie
291d0795a3
llvmpipe/fs: fix multisample depth/stencil fs writes.
...
The state wasn't storing the shader depth/stencil outputs
per-sample, so only the last sample emitted was being used
for the late depth test and stencil ref.
Noticed while trying to fix some vulkan depth stencil resolve
issues
Fixes: a0195240c4 ("llvmpipe: handle multisample early depth test/late depth write")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Marek Olšák
6c75e5e3c6
vbo: check more GL errors when drawing via glCallList
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12265 >
2021-08-31 22:53:45 +00:00
Marek Olšák
43041f2447
vbo: merge draws with GL_LINES regardless of line stippling
...
see the code comment
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12265 >
2021-08-31 22:53:45 +00:00
Marek Olšák
386e5371a7
util/cpu_detect: add/guess support for next Zen CPUs
...
so that we don't have to update this anymore
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12335 >
2021-08-31 22:29:21 +00:00
Marek Olšák
d7a36d8907
util/cpu_detect: print num_L3_caches and num_cpu_mask_bits
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12335 >
2021-08-31 22:29:21 +00:00
Quantum
e52aa1edff
main: allow all external textures for BindImageTexture
...
According to OES_EGL_image_external_essl3:
On p. 196 in the errors section for BindImageTexture, replace the
last error with the following:
"An INVALID_OPERATION error is generated if <texture> is neither the
name of an immutable texture object, nor the name of an external
texture object."
According to OES_EGL_image_external:
The command
void EGLImageTargetTexture2DOES(enum target, eglImageOES image);
with <target> set to TEXTURE_EXTERNAL_OES defines the currently bound
external texture object to be a target sibling of <image>.
...
If <target> is not TEXTURE_EXTERNAL_OES, the error INVALID_ENUM is
generated. (Note: if GL_OES_EGL_image is supported then <target> may
also be TEXTURE_2D).
Currently, mesa only allows GL_TEXTURE_EXTERNAL_OES textures to be bound
by glBindImageTexture. However, the language of the specification does not
appear to use "external" to refer to GL_TEXTURE_EXTERNAL_OES specifically,
since OES_EGL_image_external allows external eglImageOES to be attached
to GL_TEXTURE_2D in the presence of GL_OES_EGL_image. Thus, it should be
interpreted to refer to all types of external textures, including 2D
textures attached via glEGLImageTargetTexture2DOES.
Fixes: ed43dd62ac ("main: allow external textures for BindImageTexture")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12383 >
2021-08-31 22:00:16 +00:00
Yiwei Zhang
4a2adb36ae
venus: set maxMipLevels to 1 for ahb images
...
Fixes: dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.*
Cc: 21.2.2 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12639 >
2021-08-31 21:50:25 +00:00
Keith Packard
6440523077
iris: Map scanout buffers WC instead of WB [v2]
...
The scanout engine is not coherent with rendering, so make sure
scanout buffers are mapped WC. This ensures that CPU rendering as done
by the Xserver gets flushed to the frame buffer immediately instead of
waiting for some future time.
v2:
Also mark shared buffers to be allocated for scanout
in case they are being used for scanout elsewhere.
Signed-off-by: Keith Packard <keithp@keithp.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5231
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12259 >
2021-08-31 21:05:18 +00:00
Chia-I Wu
86cb30baaf
venus: fix device group enumeration with unsupported devices
...
instance->physical_devices includes only supported devices, not all
devices. One example is that it does not include 1.0 devices. We need
to fix up VkPhysicalDeviceGroupProperties to exclude unsupported
devices.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637 >
2021-08-31 20:54:06 +00:00
Chia-I Wu
a7ebcbbd6b
venus: pre-initialize device groups
...
We don't need to worry about how vkEnumeratePhysicalDeviceGroups is
called (props is NULL, props is non-NULL but count is 0, etc.) this way.
It also allows us to fix up VkPhysicalDeviceGroupProperties easily.
v2: let the for-loop increment (Yiwei)
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org > (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637 >
2021-08-31 20:54:06 +00:00
Chia-I Wu
e2020484eb
venus: minor cleanup to physical device init loop
...
v2: let the for-loop increment (Yiwei)
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org > (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637 >
2021-08-31 20:54:06 +00:00
Connor Abbott
88142d8a5a
ir3/ra: Fix type mismatch when comparing intervals
...
This was once a physreg, back in the very beginning of the new RA, but
now the caller passes an unsigned int.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5163
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487 >
2021-08-31 20:33:49 +00:00
Connor Abbott
62a7acee93
ir3: Make ir3_register::name 32-bits
...
It was overflowing with
dEQP-VK.spirv_assembly.instruction.compute.spirv_ids_abuse.lots_ids.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487 >
2021-08-31 20:33:49 +00:00
Connor Abbott
82c3dc220e
ir3: Make instruction IP 32 bits
...
a6xx supports shaders with more than 64k dwords, or at least the shader
size register has increased in size, and the matching name is gone so
there's no reason to be clever here. This doesn't fix anything at the
moment.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487 >
2021-08-31 20:33:49 +00:00
Connor Abbott
9fd1616842
ir3: Remove ir3_instr::name
...
Unused since the switch to new RA.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487 >
2021-08-31 20:33:49 +00:00
Emma Anholt
600bdde2c1
nir_to_tgsi: Use explicit sizes of NIR variables for UBO declarations.
...
This fixes duplicate CB0 declarations, missing interface array
declarations, and too-low sizes of UBOs containing multiple nir_variables.
Closes : #4810
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175 >
2021-08-31 20:12:16 +00:00
Emma Anholt
33182c555f
nir/nir_lower_uniforms_to_ubo: Set the explicit stride of the UBO 0 uniform.
...
Normal UBOs have explicit strides on them, make our lowered one behave the
same.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175 >
2021-08-31 20:12:16 +00:00
Emma Anholt
01759d3fb2
nir: Set .driver_location for GLSL UBO/SSBOs when we lower to block indices.
...
Without this, there's no way to match the UBO nir_variable declarations to
the load_ubo intrinsics referencing their data.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175 >
2021-08-31 20:12:16 +00:00
Ian Romanick
f2c69f8306
anv: Enable KHR_shader_integer_dot_product
...
For now, only mark the 4x8BitPacked variants as accelerated.
Applications are unlikely to use the "add with saturate" opcodes from
VK_INTEL_shader_integer_functions2, so, technically, all of the
AccumulatingSaturating variants "[provide] a performance advantage over
user-provided code composed from elementary instructions..." on all
Intel platforms. If we encounter an application that cares, we can do
things differently then. Ditto for the non-packed 8Bit, 4-element
vector variants.
v2: Don't memset props as this also zeros sType and pNext. Noticed by
Georg Lehmann in !12617 .
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12624 >
2021-08-31 19:57:21 +00:00
Mike Blumenkrantz
24b8fc38c3
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:30 +00:00
Mike Blumenkrantz
88c3904289
docs: mark off ES 3.2 for zink
...
blammo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:30 +00:00
Mike Blumenkrantz
1bbab34660
zink: enable fbfetch pipe cap
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
3b04a3c797
zink: add a renderpass flag for input attachment layout handling
...
this has special requirements
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
8fb1dff797
zink: update push descriptor set anytime fbfetch changes
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
48676b64a0
zink: add an input attachment to the gfx push set layout to handle fbfetch
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
8529c64fb7
zink: fix lazy descriptor deinit
...
this used to be the right conditional, but it's not anymore
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
08050b7e98
zink: add an input attachment to the gfx push set layout to handle fbfetch
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
052f85ea1b
zink: flag color attachment images as input attachments at creation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
d31b7dcefd
zink: track fbfetch info on context, update as needed
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
45a1d43439
zink: refactor descriptor layout/template creation a little
...
make the push sets more flexible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
8fb7875291
zink: add a compiler pass to translate fbfetch -> input attachments
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
c9edf964b0
zink: emit fbfetch variables as ntv input attachments
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
73456393d8
zink: add input attachment thingy for spirv builder
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Mike Blumenkrantz
25fe797104
zink: move alphaToOne warning to a dynamic warning
...
stop spamming these if they aren't even being used
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12647 >
2021-08-31 19:32:26 +00:00
Emma Anholt
3e94af0629
ci/llvmpipe: Add a fractional ASan run.
...
This reproduces #5254 and seems like a good idea to be checking normally.
I think running some desktop GL would also be useful here, but it turns
out that desktop glcts is pretty leaky/overflowy inside of deqp.
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12493 >
2021-08-31 19:08:40 +00:00
Marek Olšák
dab8bded4d
mesa: add environment variable MESA_NO_SHADER_REPLACEMENT
...
for performance comparisons
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12492 >
2021-08-31 18:25:48 +00:00
Marek Olšák
805c6a37b8
meson: add missing custom target to generate shader_replacement.h
...
for custom shader replacements enabled by -Dcustom-shader-replacement=path.
process_shaders.py should generate shader_replacement.h, which should
contain shaders and their substitutions.
Loosely based on Pierre-Eric's commit.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12492 >
2021-08-31 18:25:48 +00:00
Italo Nicola
dcc89c9165
virgl/ci: enable some traces that were previously crashing
...
Most of these are fixed in recent mesa and virglrenderer versions, but
some might still be flaky. We'll keep an eye on them and if they are
flaky we can disable them.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12643 >
2021-08-31 17:41:57 +00:00
Italo Nicola
b986b0a79f
virgl/ci: stop overriding GL version when running traces
...
These environment variables make some traces that require higher GLSL
versions crash.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12643 >
2021-08-31 17:41:57 +00:00
Tomeu Vizoso
ddee006c1d
ci: Ensure the DRM device is open
...
... before changing the PM settings.
Otherwise, we hit a kernel warning in Qualcomm devices and the device is
left in a non-functional state.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12644 >
2021-08-31 17:16:44 +00:00
Rhys Perry
33ddbd220f
aco: remove DPP when applying constants/literals/sgprs
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12601 >
2021-08-31 16:58:20 +00:00
Rhys Perry
7d95f7510f
aco/tests: test copy propagation with DPP instructions
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12601 >
2021-08-31 16:58:20 +00:00
Rhys Perry
e27946ca11
aco: don't constant propagate to DPP instructions
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12601 >
2021-08-31 16:58:20 +00:00
Leo Liu
f4b61e9061
radeon/vcn: add a handling of error for incorrect reference lists
...
Use the first dpb buffer instead of the NULL pointer sent to hardware.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12610 >
2021-08-31 15:43:21 +00:00
Leo Liu
6a0cadd8ec
radeon/vcn: reuse the dpb buffers when with the same size.
...
To avoid allocate/deallocate frequently.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12610 >
2021-08-31 15:43:21 +00:00
liuyujun
2bdc0bb324
gallium: fix surface->destroy use-after-free
...
regen surface on every update framebuffer
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: liuyujun <liuyujun@uniontech.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12520 >
2021-08-31 14:20:07 +00:00
Lionel Landwerlin
838c0e5eef
intel/fs: fix framebuffer reads
...
We're missing some restrictions on those messages.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5292
Cc: mesa-stable
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12615 >
2021-08-31 11:52:39 +00:00
Filip Gawin
451e97028e
meson: add crocus to default group of drivers for x86/x86_64
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12636 >
2021-08-31 11:13:09 +00:00
Samuel Pitoiset
640f15edd7
radv/llvm: fix invalid IR when converting triangle strips to indices
...
Operand 0 of LLVMBuildSelect() should be i1.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12616 >
2021-08-31 09:56:27 +02:00
Samuel Pitoiset
72b6b02e09
ac/llvm: fix huge alignment when loading from shared memory
...
LLVM doesn't support huge alignments, also it can optimize the shared
loads, so it's unecessary to emit better (but broken) LLVM IR.
Fixes a bunch of crashes with RADV_DEBUG=llvm,checkir.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12616 >
2021-08-31 09:56:27 +02:00
Samuel Pitoiset
e72c2e36e0
ac/llvm: adjust assertion for nir_intrinsic_terminate
...
Fixes dEQP-VK.spirv_assembly.instruction.terminate*.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12616 >
2021-08-31 09:56:27 +02:00
Dave Airlie
1ef97ea0ab
meson: fix regression finding shm dep
...
Just copy the dep into both places.
Fixes: b5c390c113 ("vulkan/wsi: add support for detecting mit-shm pixmaps.")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Tested-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12635 >
2021-08-31 14:18:43 +10:00
Mike Blumenkrantz
213548251b
zink: explicitly end renderpass before running dispatch
...
it's possible that nothing will end the renderpass otherwise
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12581 >
2021-08-31 02:17:40 +00:00
Rob Clark
f05270ed7f
freedreno/ci: Bring fd farm back online after move
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12608 >
2021-08-30 23:48:57 +00:00
Mike Blumenkrantz
6270f8cb7c
zink: use VK_WHOLE_SIZE for full-sized bufferviews
...
this works around most cts coverage which violates spec by creating a view
sized using a range that isn't a multiple of the format's blocksize
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12631 >
2021-08-30 21:27:46 +00:00
Mike Blumenkrantz
441018a173
zink: free local shader nirs on program free
...
leak--
Fixes: 61f2667cf5 ("zink: remove gfx program slot mapping")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12630 >
2021-08-30 21:19:27 +00:00
Ian Romanick
a8d0c0af86
intel/fs: Remove type-based restriction for cmod propagation to saturated operations
...
Previously, we misunderstood how conditional modifiers and saturate
interacted. We thought the condition was evaulated before the saturate
was applied. For the floating point cases, we went to some heroics to
modify the condition to maintain the same results. For integer cases,
it was not clear that this could even work. We had no use-cases and no
tests-cases, so we just disallowed everything.
Now we understand that the condition is evaluated after the saturate.
Earlier commits in this series removed the various floating point
heroics. It is easier to just delete the code that prevents some cases
that just work.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
5ad88fd499
intel/fs: Remove after parameter from test_saturate_prop
...
Originally this was part of "intel/fs: Remove condition-based
restriction for cmod propagation to saturated operations". With some
additional changes to that commit, it caused a lot of extra churn in the
unit tests. I felt that made it harder to see the actual changes in the
unit tests, so I split it out.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
e6373923a7
intel/fs: Remove condition-based restriction for cmod propagation to saturated operations
...
I don't know why the float_saturate_l_mov test was #if'ed out, but it
passes... so this commit enables it.
No shader-db or fossil-db changes.
In a previous iteration of this MR, this commit helped ~200 shaders in
shader-db. Now all of those same shaders are helped by "intel/fs: cmod
propagate from MOV with any condition". All of these shaders come from
Mad Max. After initial translation from NIR to assembly, these shader
contain patterns like:
mul(8) g90<1>F g88<8,8,1>F 0x40400000F /* 3F */
...
mov.sat(8) g90<1>F g90<8,8,1>F
...
cmp.nz.f0(8) null<1>F g90<8,8,1>F 0 /* 0F */
An initial pass of cmod propagation converts this to
mul(8) g90<1>F g88<8,8,1>F 0x40400000F /* 3F */
...
mov.sat.XX.f0(8) g90<1>F g90<8,8,1>F
Without this commit, XX is G. With this commit, XX is NZ. Saturate
propagation moves the saturate:
mul.sat(8) g90<1>F g88<8,8,1>F 0x40400000F /* 3F */
...
mov.XX.f0(8) g90<1>F g90<8,8,1>F
Without this commit (but with "intel/fs: cmod propagate from MOV with
any condition"), the G gets propagated:
mul.sat.g.f0(8) g90<1>F g88<8,8,1>F 0x40400000F /* 3F */
With this commit (with or without "intel/fs: cmod propagate from MOV
with any condition"), the NZ gets propagated:
mul.sat.nz.f0(8) g90<1>F g88<8,8,1>F 0x40400000F /* 3F */
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
47f0cdc449
intel/fs: cmod propagate from MOV with any condition
...
There were tests related to propagating conditional modifiers from a MOV
to an instruction with a .SAT modifier for a very long time, but they
were #if'ed out.
There are restrictions later in the function that limit the kinds of MOV
instructions that can propagate. This avoids the dangers of
type-converting MOVs that may generate flags in different ways.
v2: Update the added comment to look more like the existing comment.
That makes the small differences between the two cases more obvious.
Noticed by Marcin.
All Intel platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 19827127 -> 19826924 (<.01%)
instructions in affected programs: 62024 -> 61821 (-0.33%)
helped: 201
HURT: 0
helped stats (abs) min: 1 max: 2 x̄: 1.01 x̃: 1
helped stats (rel) min: 0.13% max: 0.60% x̄: 0.35% x̃: 0.36%
95% mean confidence interval for instructions value: -1.02 -1.00
95% mean confidence interval for instructions %-change: -0.36% -0.34%
Instructions are helped.
total cycles in shared programs: 954655879 -> 954655356 (<.01%)
cycles in affected programs: 1212877 -> 1212354 (-0.04%)
helped: 155
HURT: 6
helped stats (abs) min: 1 max: 6 x̄: 3.65 x̃: 4
helped stats (rel) min: <.01% max: 0.17% x̄: 0.07% x̃: 0.07%
HURT stats (abs) min: 2 max: 12 x̄: 7.00 x̃: 8
HURT stats (rel) min: 0.04% max: 0.23% x̄: 0.14% x̃: 0.15%
95% mean confidence interval for cycles value: -3.60 -2.90
95% mean confidence interval for cycles %-change: -0.07% -0.05%
Cycles are helped.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
a9120eccff
intel/compiler: Move type_is_unsigned_int to brw_reg_type.h
...
...and rename it to brw_reg_type_is_unsigned_integer. It is now next to
brw_reg_type_is_floating_point and brw_reg_type_is_integer.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
b23432c540
intel/fs: Fix a cmod prop bug when the source type of a mov doesn't match the dest type of scan_inst
...
We were previously operating with the mindset "a MOV is just a compare
with zero." As a result, we were trying to share as much code between
the MOV path and the CMP path as possible. However, MOV instructions
can perform type conversions that affect the result of the comparison.
There was some code added to better handle this for cases like
and(16) g31<1>UD g20<8,8,1>UD g22<8,8,1>UD
mov.nz.f0(16) null<1>F g31<8,8,1>D
The flaw in these changed special cases is that it allowed things like
or(8) dest:D src0:D src1:D
mov.nz(8) null:D dest:F
Because both destinations were integer types, the propagation was
allowed. The source type of the MOV and the destination type of the OR
do not match, so type conversion rules have to be accounted for.
My solution was to just split the MOV and non-MOV paths with completely
separate checks. The "else" path in this commit is basically the old
code with the BRW_OPCODE_MOV special case removed.
The new MOV code further splits into "destination of scan_inst is float"
and "destination of scan_inst is integer" paths. For each case I
enumerate the rules that I belive apply. For the integer path, only the
"Z or NZ" rules are listed as only NZ is currently allowed (hence the
conditional_mod assertion in that path). A later commit relaxes this
and adds the rule.
The new rules slightly relax one of the previous rules. Previously the
sizes of the MOV destination and the MOV source had to be the same. In
some cases now the sizes can be different by the following conditions:
- Floating point to integer conversion are not allowed.
- If the conversion is integer to floating point, the size of the
floating point value does not matter as it will not affect the
comparison result.
- If the conversion is float to float, the size of the destination
must be greater than or equal to the size of the source.
- If the conversion is integer to integer, the size of the destination
must be greater than or equal to the size of the source.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
0797388dc2
intel/fs: Add many cmod propagation tests involving MOV instructions
...
Of particular interest are the tests where the MOV performs a type
conversion. If the restriction on conditional modifier for a MOV is
ever relaxed, some of these cases must still be disallowed.
v2: s/NZ/Z/ in one of the comments. Notice by Marcin.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
4f6c5da025
intel/fs: Remove redundant inst->opcode checks in cmod prop
...
This foreach_inst_in_block_reverse_starting_from loop only applies
CMP, MOV, and AND. AND instructions break out of the loop before this
point.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Ian Romanick
3afefb0818
intel/fs: Refactor some cmod propagation tests
...
This will simplify some later changes to these tests.
v2: Combine test_positive_saturate_prop and test_negative_saturate_prop
into a single function. Suggested by Marcin.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12045 >
2021-08-30 14:00:14 -07:00
Mike Blumenkrantz
66fa676e8d
radv: ignore dynamic line stipple if line stipple isn't enabled
...
==244108== Conditional jump or move depends on uninitialised value(s)
==244108== at 0x48498D5: bcmp (vg_replace_strmem.c:1129)
==244108== by 0x1C37B7DD: radv_bind_dynamic_state (radv_cmd_buffer.c:237)
==244108== by 0x1C388027: radv_CmdBindPipeline (radv_cmd_buffer.c:4794)
==244108== by 0x14E9C01E: bool update_gfx_pipeline<true>(zink_context*, zink_batch_state*, pipe_prim_type) (zink_draw.cpp:406)
==244108== by 0x14E9AAB9: void zink_draw_vbo<(zink_multidraw)1, (zink_dynamic_state)1, (zink_dynamic_state2)1, (zink_dynamic_vertex_input)1, true>(pipe_cont>
==244108== by 0x14B017EB: tc_call_draw_single (u_threaded_context.c:3033)
==244108== by 0x14AF9C0E: tc_batch_execute (u_threaded_context.c:190)
==244108== by 0x14AFA24F: _tc_sync (u_threaded_context.c:341)
==244108== by 0x14B006E7: tc_texture_subdata (u_threaded_context.c:2549)
==244108== by 0x14238F8C: st_TexSubImage (st_cb_texture.c:2134)
==244108== by 0x14239931: st_TexImage (st_cb_texture.c:2363)
==244108== by 0x1453698A: teximage (teximage.c:3154)
==244108== by 0x1453698A: teximage_err (teximage.c:3181)
==244108== by 0x145388BD: _mesa_TexImage2D (teximage.c:3252)
==244108== by 0x5E88D4: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x5E9527: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x5E9B72: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x5F1092: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x5F10AC: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x48CC66: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x48DDC7: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x40D525: ??? (in /home/zmike/src/piglit/tesseract/bin_unix/linux_64_client)
==244108== by 0x4FF7B74: (below main) (in /usr/lib64/libc-2.33.so)
==244108== Uninitialised value was created by a stack allocation
==244108== at 0x14ECDF55: zink_create_gfx_pipeline (zink_pipeline.c:53)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12618 >
2021-08-30 19:24:29 +00:00
Mike Blumenkrantz
90a0556c27
radv: use pool stride when copying single query results
...
the specified stride is irrelevant for this case since there's only one
result to write
Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12619 >
2021-08-30 19:02:40 +00:00
Samuel Pitoiset
906f7f4296
radv: advertise VK_EXT_primitive_topology_list_restart
...
Everything should be already supported, except patch list.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12611 >
2021-08-30 18:39:20 +00:00
Samuel Pitoiset
d465095fc0
vulkan: Update the XML and headers to 1.2.190
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12611 >
2021-08-30 18:39:20 +00:00
Neha Bhende
98fded8a39
svga/drm: use pb_usage_flags instead of pipe_map_flags in vmw_svga_winsys_buffer_map
...
This patch basically maps pipe_map_flags to pb_flags. Since we are mapping it,
STATIC_ASSERTS won't be required.
Fixes: 00c30dad78 ("gallium: renumber PIPE_MAP_* enums to remove holes")
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12606 >
2021-08-30 17:32:11 +00:00
Samuel Pitoiset
2d1b85fe22
radv: add support for clearing multi layers with normal gfx clear path
...
Allow to clear range of layers with vkCmdClear{Color,DepthStencil}Image().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12557 >
2021-08-30 16:19:29 +00:00
Rohan Garg
a6a89aaa2f
ci: Fix a minor issue in prepare-artifacts.sh script
...
bash is whitespace sensitive.
https://github.com/koalaman/shellcheck/wiki/SC1020
This was noticed from the logs of a CI job
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/13158779
There was no fallout from this bug as not having this variable defined
leads to the right behavior, and defining it to 1 leads to a error
which consequently also leads to the right behaviour.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12562 >
2021-08-30 14:52:08 +00:00
Rhys Perry
9df9fe7dfa
aco: include utility in isel
...
For std::exchange().
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: c1d11bb92c ("aco: Add loop creation helpers.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5301
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12614 >
2021-08-30 14:28:00 +00:00
Timur Kristóf
548b383310
nir: Fix local_invocation_index upper bound for non-compute-like stages.
...
The lowered LS and NGG stages use local_invocation_index and they
can benefit from the unsigned upper bound because they can emit a
less expensive integer multiplication instruction.
This was working in the past, but accidentally borked by a refactor.
Fossil DB changes on Sienna Cichlid:
Totals from 956 (0.74% of 128647) affected shaders:
CodeSize: 2354172 -> 2344712 (-0.40%)
Instrs: 434359 -> 434327 (-0.01%)
Latency: 1883949 -> 1876814 (-0.38%)
InvThroughput: 762638 -> 757405 (-0.69%)
Fossil DB changes on Sienna Cichlid (with NGGC enabled):
Totals from 57873 (44.99% of 128647) affected shaders:
CodeSize: 155844192 -> 155607064 (-0.15%)
Instrs: 29799184 -> 29799152 (-0.00%)
Latency: 130959764 -> 130814224 (-0.11%); split: -0.11%, +0.00%
InvThroughput: 21100300 -> 20928635 (-0.81%); split: -0.81%, +0.00%
Fixes: 8af6766062
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12558 >
2021-08-30 14:05:33 +00:00
Timur Kristóf
a25fd1787a
nir: Add unsigned upper bound for extract opcodes.
...
This helps with some cases of extract, such as:
- Emitting more optimal integer multiplications
- Better address calculation
- Possibly others
Fossil DB results on Sienna Cichlid:
Totals from 4064 (3.16% of 128647) affected shaders:
VGPRs: 262040 -> 262032 (-0.00%)
CodeSize: 28856648 -> 28811892 (-0.16%); split: -0.18%, +0.02%
Instrs: 5370279 -> 5367827 (-0.05%); split: -0.08%, +0.04%
Latency: 74230112 -> 74016671 (-0.29%); split: -0.29%, +0.01%
InvThroughput: 12082532 -> 12036365 (-0.38%); split: -0.39%, +0.01%
VClause: 108506 -> 108721 (+0.20%); split: -0.03%, +0.22%
SClause: 217731 -> 216602 (-0.52%); split: -0.67%, +0.15%
Copies: 265689 -> 270811 (+1.93%); split: -0.26%, +2.19%
PreSGPRs: 201982 -> 204907 (+1.45%); split: -0.01%, +1.46%
PreVGPRs: 236099 -> 236079 (-0.01%)
Fossil DB results on Sienna Cichlid with NGGC enabled:
Totals from 60375 (46.93% of 128647) affected shaders:
VGPRs: 2212576 -> 2212568 (-0.00%)
CodeSize: 180870420 -> 179684816 (-0.66%); split: -0.66%, +0.00%
Instrs: 34386715 -> 34213682 (-0.50%); split: -0.51%, +0.01%
Latency: 199676290 -> 198987998 (-0.34%); split: -0.35%, +0.00%
InvThroughput: 32288299 -> 31736433 (-1.71%); split: -1.71%, +0.00%
VClause: 621521 -> 621743 (+0.04%); split: -0.00%, +0.04%
SClause: 900447 -> 899392 (-0.12%); split: -0.16%, +0.04%
Copies: 3439529 -> 3445305 (+0.17%); split: -0.02%, +0.19%
PreSGPRs: 2216297 -> 2219220 (+0.13%); split: -0.00%, +0.13%
PreVGPRs: 1842887 -> 1842867 (-0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12558 >
2021-08-30 14:05:33 +00:00
Timur Kristóf
76b9dd6266
aco: Unset 16 and 24-bit flags from operands in apply_extract.
...
Consider the following sequence in a shader:
b = p_extract a
c = v_mad_u32_u16 b, X, 0
The optimizer applies extract, resulting in:
c = v_mad_u32_u16 a, X, 0 (correct)
Then it mistakenly turns that into:
c = v_mul_u32_u24 a, X, 0 (incorrect)
In this case, the p_extract is applied to v_mad_u32_u16 by
apply_extract. After this, we can no longer be sure that
the operands are still 16 or 24-bit, so we have to remove
this flag.
No Fossil DB changes.
Fixes: 54292e99c7
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12558 >
2021-08-30 14:05:33 +00:00
Mike Blumenkrantz
849033e6d8
zink: implement PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY when resizable bar not present
...
this helps in some cases to avoid allocating and mapping large staging resources
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12579 >
2021-08-30 13:46:04 +00:00
Mike Blumenkrantz
9a8960de53
zink: determine whether the gpu has a resizable BAR at startup
...
this can be used to make different allocation and mapping decisions
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12579 >
2021-08-30 13:46:04 +00:00
Tomeu Vizoso
1c9b0b853e
panvk/ci: Build-test panvk
...
We still need to implement quite some functionality before it would make
sense to run dEQP in CI, but it will be already useful to build-test it.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12612 >
2021-08-30 09:59:39 +02:00
Samuel Pitoiset
23ef0fb277
radv: do not allocate a clear value for images that support comp-to-single
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12565 >
2021-08-30 07:18:19 +00:00
Samuel Pitoiset
df688e6941
radv: do not load/store the clear value for comp-to-single images
...
Images that are fast cleared with the comp-to-single mode clears DCC
to 0x10 which tells the hardware to get the clear value from the
main surface instead of the reg.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12565 >
2021-08-30 07:18:19 +00:00
Samuel Pitoiset
0c550a5fe6
radv: disable DCC image stores on Navi12-14 for displayable DCC corruption
...
DCC image stores require 128B but 64B is used for displayable DCC.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5265
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5106
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12521 >
2021-08-30 08:28:37 +02:00
Dave Airlie
a069b4e9b9
vulkan/wsi/sw: add mit-shm support for pixmap allocation
...
This allocate the mit-shm pixmap instead of dri3 pixmaps and
uses the present paths when mit-shm is enabled
Acked-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12482 >
2021-08-29 20:26:13 +00:00
Dave Airlie
1f55f9a97a
vulkan/wsi/sw: add support for using host_ptr for shm pixmaps.
...
This pipes the allocation of the MIT-SHM pixmap into the wsi common
code to callback to the x11 path to allocate things in the right place.
Acked-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12482 >
2021-08-29 20:26:13 +00:00
Dave Airlie
b5c390c113
vulkan/wsi: add support for detecting mit-shm pixmaps.
...
This just adds the xcb bits to detect is the host supports shared
shm pixmaps or whether the old paths should be used.
shm pixmaps will only be used if dri3 is available
Acked-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12482 >
2021-08-29 20:26:13 +00:00
Rob Clark
eacf50c27b
freedreno/ci: Take fd farm offline for moving day
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12602 >
2021-08-28 13:08:05 +00:00
Rob Clark
8f784c8fed
freedreno/ci: Add a status variable for CI farm
...
Make it a one-line change to disable freedreno CI jobs if the farm is
offline.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12602 >
2021-08-28 13:08:05 +00:00
Caio Marcelo de Oliveira Filho
b34f9740ca
spirv: Implement non-Multiview parts of SPV_NV_mesh_shader
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:43 +00:00
Caio Marcelo de Oliveira Filho
10a03e30cf
nir: Allow Task/Mesh to lower compute system values
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:43 +00:00
Caio Marcelo de Oliveira Filho
4f52681a2d
nir: Don't lower Task/Mesh I/O to temporaries
...
These won't work since a workgroup can span more than one thread, and
the temporaries are not shared memory.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:43 +00:00
Caio Marcelo de Oliveira Filho
27697d5eb8
nir/divergence_analysis: Handle Task/Mesh shaders
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:42 +00:00
Caio Marcelo de Oliveira Filho
bf5f6add01
nir/lower_io: Identify Mesh output as arrayed
...
Mesh shader outputs are either:
- non-array builtins
- array builtins that are either per-primitive or per-vertex
- user-defined outputs that must be either per-primitive or per-vertex
So we can identify any array output as "arrayed" for the purposes of
I/O lowering.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:42 +00:00
Caio Marcelo de Oliveira Filho
9631d24c3f
compiler: Add Task/Mesh to shader_info
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:42 +00:00
Caio Marcelo de Oliveira Filho
813d41829d
compiler: Add new non-Multiview Task/Mesh builtins
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:42 +00:00
Caio Marcelo de Oliveira Filho
cd394017c8
nir: Add per-primitive I/O intrinsics
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:42 +00:00
Caio Marcelo de Oliveira Filho
f95daad3a2
nir: Add a way to identify per-primitive variables
...
Per-primitive is similar to per-vertex attributes, but applies to all
fragments of the primitive without any interpolation involved.
Because they are regular input and outputs, keep track in shader_info
of which I/O is per-primitive so we can distinguish them after deref
lowering. These fields can be used combined with the regular
`inputs_read`, `outputs_written` and `outputs_read`.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:42 +00:00
Caio Marcelo de Oliveira Filho
927584fa67
nir: Update documentation for location to mention Task/Mesh
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600 >
2021-08-28 03:56:42 +00:00
Jason Ekstrand
3c3b75a2b7
isl/docs/tiling: Add Tile4 docs
...
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12550 >
2021-08-28 02:49:18 +00:00
Timur Kristóf
cfb0d931f2
aco: Emit zero for the derivatives of uniforms.
...
Observed in a shader from Resident Evil Village.
This also helps prevent emitting invalid IR.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12599 >
2021-08-27 20:34:22 +00:00
Mike Blumenkrantz
1454955e5d
zink: only update inlinable constants when they change
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12577 >
2021-08-27 20:16:49 +00:00
Daniel Schürmann
2eeaaabb8e
aco/optimizer: combine v_pk_mul_u16 + v_pk_add_u16 -> v_pk_mad_u16
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11678 >
2021-08-27 19:57:59 +00:00
Daniel Schürmann
be16ebc5ca
aco/optimizer: fuse v_mul_f64 + v_add_f64 -> v_fma_f64
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11678 >
2021-08-27 19:57:59 +00:00
Daniel Schürmann
8e27ca9953
aco/optimizer: combine v_mul_lo_u16 + v_add_u16 -> v_mad_u16
...
Totals from 192 (0.13% of 150170) affected shaders: (GFX10.3)
CodeSize: 1027224 -> 1019872 (-0.72%)
Instrs: 174784 -> 173863 (-0.53%)
Latency: 4235742 -> 4232177 (-0.08%); split: -0.11%, +0.03%
InvThroughput: 1777026 -> 1775945 (-0.06%); split: -0.09%, +0.03%
Copies: 34098 -> 34099 (+0.00%); split: -0.03%, +0.03%
PreVGPRs: 4920 -> 4850 (-1.42%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11678 >
2021-08-27 19:57:59 +00:00
Daniel Schürmann
23d5865f42
aco: refactor nir_op_imul selection
...
Previously, the optimization to use v_mul_lo_u16 for
32bit multiplications was done in instruction_selection.
This was moved to the optimizer to ease some case distinctions.
The mixed results are due to increased use of SDWA.
Totals from 2616 (1.74% of 150170) affected shaders: (GFX10.3)
VGPRs: 143888 -> 143872 (-0.01%); split: -0.02%, +0.01%
CodeSize: 5604032 -> 5604080 (+0.00%); split: -0.01%, +0.01%
Instrs: 1086798 -> 1083915 (-0.27%); split: -0.27%, +0.01%
Latency: 8215793 -> 8213023 (-0.03%); split: -0.10%, +0.07%
InvThroughput: 20765157 -> 20773766 (+0.04%); split: -0.02%, +0.06%
VClause: 35256 -> 35260 (+0.01%); split: -0.02%, +0.03%
SClause: 29021 -> 29024 (+0.01%); split: -0.00%, +0.01%
Copies: 74163 -> 74306 (+0.19%); split: -0.05%, +0.24%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11678 >
2021-08-27 19:57:59 +00:00
Daniel Schürmann
d8eef134d8
aco: only apply extract if not used more than 4 times
...
Totals from 61 (0.04% of 150170) affected shaders: (GFX10.3)
CodeSize: 1087732 -> 1087380 (-0.03%); split: -0.22%, +0.18%
Instrs: 192343 -> 192205 (-0.07%); split: -0.16%, +0.09%
Latency: 7231670 -> 7148073 (-1.16%); split: -1.19%, +0.04%
InvThroughput: 3436715 -> 3394926 (-1.22%); split: -1.25%, +0.04%
VClause: 4831 -> 4833 (+0.04%)
Copies: 50130 -> 49934 (-0.39%); split: -0.67%, +0.28%
Branches: 5945 -> 5948 (+0.05%)
PreSGPRs: 3486 -> 3472 (-0.40%)
PreVGPRs: 5154 -> 5152 (-0.04%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11678 >
2021-08-27 19:57:59 +00:00
Mike Blumenkrantz
b8c26e89fe
freedreno: ci updates
...
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12600 >
2021-08-27 19:38:19 +00:00
Mike Blumenkrantz
9c6938dbfd
freedreno: remove primconvert
...
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12600 >
2021-08-27 19:38:19 +00:00
Mike Blumenkrantz
744ef862b8
freedreno: export supported primtypes
...
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12600 >
2021-08-27 19:38:19 +00:00
Jeremy Newton
80b5f4ff08
Fix building AMD MM/GL with EL7
...
This partially reverts commit 4d9acfa533 .
The original patch said:
"Python 3 handles unicode strings by default, so we can drop all that."
But this breaks building on RHEL 7 (or similiar) since python3 support
on is much more limited than newer distros. Backporting all the needed
python 3 libraries to EL7 is a pretty big task, and isn't very easy to
maintain.
For workstation purposes, we need the AMD MM/GL driver building on RHEL
7, so only src/util/driconf_static.py needs to be reverted.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12549 >
2021-08-27 19:05:25 +00:00
Erik Faye-Lund
4b8f2b99e8
zink: avoid generating nonsensical code
...
With this code, we end up generating code such as:
if (!strcmp(extensions[i].extensionName, "VK_KHR_maintenance1")) {
if (VK_MAKE_VERSION(1,2,0) >= screen->vk_version) {
info->have_KHR_maintenance1 = true;
} else {
info->have_KHR_maintenance1 = true;
}
}
That's clearly nonsense, as it does the same thing in the true and false
case. So let's instead try to walk the Vulkan versions up to the one
we're using in a separate pass, and add all extensions that were made core
in that version.
CID: 1473289
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12593 >
2021-08-27 18:55:19 +00:00
Erik Faye-Lund
a00fccce0c
zink: reduce scope of version-struct hack
...
Without this, we'll end up checking against the wrong version when
enabling core features in the next commit.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12593 >
2021-08-27 18:55:19 +00:00
Erik Faye-Lund
2b82f2b78b
zink: clean up const-value handling for get_ssbo_size
...
nir_src_as_const_value can return null pointers, and in other places we
at least assert for this. So let's do that here as well, which makes
Coverity a bit less paranoid.
While we're at it, avoid duplicating the nir_src_as_const_value call to
the same source.
CID: 1444291
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12594 >
2021-08-27 18:43:31 +00:00
Erik Faye-Lund
3e22fc27af
zink: remove incorrect ASSERTED macro
...
The documentation for ASSERTED in macros.h says:
> Use ASSERTED to indicate that an identifier is unused outside of an `assert()`,
> so that assert-free builds don't get "unused variable" warnings.
We're using this variable outside of assert, so this shouldn't apply
here.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12594 >
2021-08-27 18:43:31 +00:00
Erik Faye-Lund
a3092bc719
zink: remove needless scope
...
There's no variables declared in here, so there's no point in having
this slightly awkward scope here.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12594 >
2021-08-27 18:43:31 +00:00
Erik Faye-Lund
f417a4c1ba
zink: give each major intrinsic it's own emit function
...
It's so much easier to follow this code if there's not any big blocks of
emitting in the middle of the code that figures out exactly what to do.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12594 >
2021-08-27 18:43:31 +00:00
Erik Faye-Lund
55e8857a80
zink: avoid checking if src is const twice
...
nir_src_as_const_value also checks if the src is const, and not
checking that it returned null makes Coverity go paranoid thinking we
could dereference a null-pointer. But because it's slightly better to
check once than to check twice, let's rewrite this to avoid the
double-check, making it obvious what's going on here.
CID: 1485624
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12594 >
2021-08-27 18:43:31 +00:00
Erik Faye-Lund
75b5f12407
zink: avoid memcmping null pointers
...
memcmping NULL pointers is not allowed, and would lead to a crash here.
So let's check that the first isn't NULL; we've already checked that
they're not *both* NULL, so checking one is enough.
CID: 1484801, 1484810
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
d3a795b528
zink: remove needless NULL-check
...
This NULL-check makes Coverity paranoid because we just dereferenced the
pointer a few lines above.
But we never call this function with a NULL-pointer here, so the NULL
check isn't needed. Let's just remove it, to calm Coverity down a bit.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
077a9c7478
zink: return false on failure
...
We do this in the other pipe_buffer_map_range failure case, so it makes
sense that we need to do it here as well. If we don't, we'll end up
taking a crash in the check_query_results function, which will
dereference that pointer.
We also need to unmap the buffer if we fail, otherwise we'll leak.
CID: 1475925
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
40f704f2f3
zink: pctx can't be null here
...
We're checking if pctx is null here, but that can't be true. If it
could, then the code that follows would have immediately crashed.
A quick peek at other drivers seems to indicate that this is a safe
assumption.
CID: 1474410, 1474554
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
4cc3554d85
zink: do not dereference null-pointer
...
The "locations" pointer can be null here, and memcpying from a null
pointer is not okay.
CID: 1485978
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
3fde1c4242
zink: do not try to dereference null-key
...
We can't do any of this logic if key is NULL, because that means we'll
dereference memory close to a NULL-pointer.
While we're at it, add some asserts to the zink_fs_key and zink_vs_key
functions who would otherwise be responsible for giving us invalid
non-null pointers out of null-pointers.
CID: 1475973, 1475983
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
e3239dff05
zink: avoid overflow when calculating size
...
If we multiply before we (implicitly) cast the result to the target
type, we needlessly risk overflowing the result.
CID: 1490790, 1475922
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
c96afa9fc8
zink: initialize pQueueFamilyIndices
...
This silences a Coverity warning about an uninitialized variable.
CID: 1490800
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559 >
2021-08-27 18:32:03 +00:00
Erik Faye-Lund
64c558ab83
zink: do not warn about rare features until used
...
We currently cause the following scary warning to be printed on
start-up for *every* application regardless if that feature is being
used or not when run on top of ANV:
> WARNING: Some incorrect rendering might occur because the selected
> Vulkan device (Intel(R) UHD Graphics 620 (KBL GT2)) doesn't support
> base Zink requirements: line_rast_feats.stippledRectangularLines
> line_rast_feats.stippledSmoothLines
There's no need to scare the users about this, as most applications
don't care about these combinational features. So let's instead emit a
warning when these features are attempted (but failed) to be used
instead.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12587 >
2021-08-27 18:21:08 +00:00
Erik Faye-Lund
28b3563a95
Revert "zink: always init bordercolor value for sampler"
...
This reverts commit 336dea90f0 .
This change was incorrect for two reasons:
1. We already initialize this field on line 334
2. Unconditionally setting this to
VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK breaks rendering with e.g
opaque white borders, because we've already matched those to a
non-custom enum value first.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12591 >
2021-08-27 18:09:51 +00:00
Lepton Wu
bcd9db327d
i965: Enable RGBX8888_SRGB format.
...
This is required by Android. Some Android games like nier reincarnation
show a black screen without this.
Signed-off-by: Lepton Wu <lepton@chromium.org >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12393 >
2021-08-27 17:00:34 +00:00
Timur Kristóf
589ccf3d77
aco: Consider maximum number of workgroups per CU/WGP on Navi.
...
No Fossil DB changes.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12517 >
2021-08-27 16:41:08 +00:00
Timur Kristóf
c8698199a1
aco: Consider LDS usage by PS inputs in MaxWaves calculation.
...
Before PS waves are launched, PS inputs are moved from PC to LDS
and the corresponding part of the PC is deallocated.
Each PS input occupies 3 * vec4 (3 * 16 = 48 bytes) of LDS space.
See Figure 10.3 in the GCN3 ISA manual.
These limit occupancy the same way as other stages' LDS usage does.
Note that PS can request additional LDS space via EXTRA_LDS_SIZE,
so that also must be taken into account here.
No Fossil DB changes.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12517 >
2021-08-27 16:41:08 +00:00
Mike Blumenkrantz
9bc61108d7
zink: remove extra program ref from cached descriptor updates
...
this happens in draw/compute now
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12582 >
2021-08-27 16:30:08 +00:00
Mike Blumenkrantz
5c3db42d1d
zink: avoid pulling in unused push descriptors for cached ubo0
...
instead of just reading the template bufferinfo data, ensure that only
buffers which will be read are added to the set to avoid stale cache entries
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12582 >
2021-08-27 16:30:08 +00:00
Tomeu Vizoso
9e314a6822
iris/ci: Correctly set freq governors to max
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12598 >
2021-08-27 17:34:01 +02:00
Tomeu Vizoso
1f1dc49531
freedreno/ci: Correctly set freq governors to max
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12598 >
2021-08-27 17:34:01 +02:00
Boris Brezillon
5a4fcb42f7
panvk: Fix panvk_copy_fb_desc()
...
We should not skip the copy when the batch is attached a framebuffer
descriptor, quite the opposite. Let's drop the check instead of reversing
it since we are guaranteed to have an FB attached when
panvk_copy_fb_desc() is called.
Fixes: 792a0ab0b1 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12590 >
2021-08-27 16:38:45 +02:00
Boris Brezillon
d84dedc48f
panvk: Make the per-arch static lib depend on panvk_entrypoints.h
...
The panvk_entrypoints.h header is included by all panvk_vX_xxx.c
source files, without this dependency the build can fail.
Fixes: 792a0ab0b1 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Fabio Pedretti <pedretti.fabio@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12590 >
2021-08-27 16:37:36 +02:00
Mike Blumenkrantz
3990f95822
zink: more effectively utilize batch_usage for query destruction
...
there's no need to track the number of batches that a query is referenced on,
as all the tracking is already done by the batch_usage mechanism, so this
can be simplified to manage destruction based on whether batch_usage exists
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578 >
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
0f40ac286b
zink: don't try to sync previous timestamp query qbo values
...
this makes no sense, so don't explode the qbo by trying
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578 >
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
4421180fe3
zink: move time query ending out to zink_end_query
...
time queries only need to be ended when the api ends them, not per-cmdbuf
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578 >
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
68c1b1b0e3
zink: improve threadsafe qbo access
...
these should be staging resources since they're being read from often,
and this allows dropping the UNSYNCHRONIZED flag from map since it should
be inferred
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578 >
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
4a5dfabb12
zink: make zink_gfx_pipeline_state::vertices_per_patch a bitfield
...
this is clamped to MAX_PATCH_VERTICES
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
7b3dfea6c1
zink: repack zink_gfx_pipeline_state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
9c5a2ab6a9
zink: convert rasterizer pipeline components to bitfield
...
this reduces the hashed pipeline key size by 53 bits
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
c73adf8c90
zink: steal a bit from rast_samples in pipeline state
...
zink only handles values up to 64, so this still has an extra bit
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
9260b86905
zink: add clip_halfz to rasterizer hw state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
0e5ba2a508
zink: repack zink_rasterizer_hw_state
...
this is now 11 bits
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
827fcb7e32
zink: zero viewport and scissor count in pipeline with dynamic state1
...
this is illegal
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
cab68281ba
zink: move viewport count into dynamic state1 part of pipeline hash
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
94e9091ba2
zink: move dynamic state1 pipeline members into substruct
...
this is a bit easier to manage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586 >
2021-08-27 10:52:59 +00:00
Boris Brezillon
19e29960e9
panfrost: v7 does not support RGB32_UNORM textures
...
Cc: mesa-stable
Fixes: c6bdd976e6 ("panfrost: Split out v6/v7 format tables")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12588 >
2021-08-27 08:21:14 +00:00
Yevhenii Kharchenko
b945262773
iris: fix layer calculation for TEXTURE_3D ReadPixels() on mip-level>0
...
Fixes assert when ReadPixels() called to read from FBO to
GL_PIXEL_PACK_BUFFER, on mip-level > 0, since num_layers
wasn't properly calculated with mip-level.
v2: patched 'iris_create_sampler_view' function instead of
'resolve_sampler_views'. Just like it was suggested in this
function's comment.
The logic of fix is similar to one in 'update_image_surface' function
of i965 driver, which is introduced in commit
f9fd0cf479 .
With a slight change: setting array_len=1, like it was done in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5808 ,
since minifying depth fails KHR-GLES2.texture_3d.filtering tests.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4145
Fixes: 3c979b0e ('iris: add some draw resolve hooks')
Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9253 >
2021-08-27 08:07:10 +00:00
Samuel Pitoiset
d90a8c79df
radv: remove unecessary radv_finishme() for invalid color formats
...
Something really bad happen (likely driver bug) if this is triggered.
Replace with some assertions to catch an eventual issue in debug build.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12556 >
2021-08-27 07:29:17 +00:00
Samuel Pitoiset
df90bb3f88
radv: remove useless check about number of samples in the HW resolve path
...
Although this can likely hang, this is invalid and should be caught
by the validation layers. There is many ways to hang the GPU with VK,
this check alone is useless.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12556 >
2021-08-27 07:29:17 +00:00
Samuel Pitoiset
b05c2023cc
radv: remove outdated radv_finishme() in the HW resolve path
...
Resolving layered MSAA images is actually implemented by the HW
resolve path but never used because the driver uses the compute path.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12556 >
2021-08-27 07:29:17 +00:00
Mike Blumenkrantz
aab95f1bdf
zink: set primitive restart with extended dynamic state2
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
9c2fe8e621
zink: bump dynamic pipeline state count
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
53da55ac87
zink: template for VK_EXT_extended_dynamic_state2
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
7811037de5
zink: hook up VK_EXT_extended_dynamic_state2
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
5b5201f0fd
zink: no-op prim changes for pipeline recalc
...
this is no longer part of pipeline hash since we're using dynamic state
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
0cec4d581c
zink: consolidate pipeline hash tables
...
with dynamic prim type, pipelines can now be grouped by base prim type
instead of requiring a different pipeline for overall prim type
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
305966ca75
zink: use dynamic prim type
...
this is part of dynamic state but wasn't used since it required
actual work to effectively make use of it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
3674839d11
zink: batch mem barrier hooks
...
memory barriers are redundant, so batch them and apply based on actual
usage to be slightly more efficient
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12576 >
2021-08-27 02:59:24 +00:00
Mike Blumenkrantz
115935cc53
zink: slim down streamout component of mem barrier hook
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12576 >
2021-08-27 02:59:24 +00:00
Mike Blumenkrantz
c095a32026
zink: remove query flush from memory barrier hook
...
qbos are separate buffers with their own barriers, so this just stalls
pointlessly
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12576 >
2021-08-27 02:59:24 +00:00
Mike Blumenkrantz
ce87300412
zink: use ctx gfx prim mode for draw comparisons
...
just being consistent
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572 >
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
95a9ea54f3
zink: init ctx->gfx_prim_mode to nonzero value to trigger pipeline changes
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572 >
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
b06ef86020
zink: reorder gfx program/pipeline/descriptor binds if dynamic state is present
...
this enables deferring the heavy lifting until the rest of the state updates are
done
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572 >
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
c2aa47a708
zink: remove extra unsetting of ctx->vertex_state_changed
...
this is already managed in zink_get_gfx_pipeline
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572 >
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
8a4681aea5
zink: pass current program's shader array, not ctx array
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572 >
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
ab08dcd895
zink: remove attachment count from pipeline hash
...
this is redundant
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572 >
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
1bb9704bce
zink: declare ctx var during blend state bind
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572 >
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
960e776f24
zink: assert precise queries are occlusion queries
...
this should always be the case
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12583 >
2021-08-27 02:26:17 +00:00
Mike Blumenkrantz
9d9e197d74
zink: require occlusionQueryPrecise for occlusion queries
...
ensure this is present to avoid driver explosions
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12583 >
2021-08-27 02:26:17 +00:00
Mike Blumenkrantz
336dea90f0
zink: always init bordercolor value for sampler
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12574 >
2021-08-27 02:01:02 +00:00
Mike Blumenkrantz
b192b9c88a
zink: implement PIPE_QUERY_GPU_FINISHED
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12573 >
2021-08-26 21:28:42 -04:00
Ella-0
1e921e5098
v3dv: Implement VK_EXT_pipeline_creation_feedback
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12371 >
2021-08-26 21:04:42 +00:00
Erik Faye-Lund
c8581d0fae
microsoft/compiler: trivial fixes to error-handling
...
We're really bad at making sure we report errors when we fail to
allocate memory. This makes us a bit better...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541 >
2021-08-26 18:57:40 +00:00
Erik Faye-Lund
e0f3133447
microsoft/compiler: return errors from get_n_src
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541 >
2021-08-26 18:57:40 +00:00
Erik Faye-Lund
2c166a27fc
microsoft/compiler: remove needless error-returns
...
There's no root error-conditions in this code, just code that assumes
they exist and tries to handle them.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541 >
2021-08-26 18:57:40 +00:00
Filip Gawin
46f3582c6f
nir: fix ifind_msb_rev by using appropriate type
...
As you can see comparion "x < 0" doesn't make
sense if x is unsigned.
Fixes: a5747f8a ("nir: add opcodes for *find_msb_rev and lowering ")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12548 >
2021-08-26 18:35:31 +00:00
Filip Gawin
9083e9a483
nir: fix shadowed variable in nir_lower_bit_size.c
...
Fixes: 6d79298992 ("nir/lower_bit_size: fix lowering of {imul,umul}_high")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12527 >
2021-08-26 18:04:22 +00:00
Yiwei Zhang
3538b5af6d
venus: conditionally enable async descriptor set allocation
...
When VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is not used to
create the pool, set allocation is guaranteed to not return
VK_ERROR_FRAGMENTED_POOL, and we can safely move set allocation to async
after doing resource tracking in the driver.
Enable after fully tested with assert(false) in the failure case.
Tested with:
- dEQP-VK.api.descriptor*
- dEQP-VK.api.object_management.*
- dEQP-VK.binding_model.descriptor*
- dEQP-VK.descriptor_indexing.*
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
288ce1b033
venus: check descriptor allocations against pool resource
...
Only kick in when async_set_allocation is enabled.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
70b03e96f9
venus: descriptor set to track descriptor count of last binding
...
Track the descriptor count to be used instead of the variable descriptor
count to avoid duplicate checks in later accounting.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
a1e91b1163
venus: descriptor pool to track pool state
...
It also tracks whether async set allocation is enabled.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
d2b1a7c2bb
venus: layout to track variable descriptor count binding info
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
d8e89b4e33
venus: descriptor layout to track more binding infos
...
Rename existing max_binding to last_binding to be consistent.
1. layout to track last binding index
2. binding to track descriptor type
3. binding to track descriptor count
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
ad934eb680
venus: add vn_descriptor_set_layout_init
...
Just a refactoring without functional changes.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Yiwei Zhang
d4878636fe
venus: refactor failure path for sets allocation
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501 >
2021-08-26 17:56:19 +00:00
Sergii Melikhov
71e748ad24
dri2: Fix Null pointer dereferences
...
Fix defect reported by Coverity Scan CID-1490794
Fixes: 0d42033b26 ("glx/dri2: Require the driver to support v4 of __DRI_DRI2")
Signed-off-by: Sergii Melikhov <sergii.v.melikhov@globallogic.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12563 >
2021-08-26 17:09:23 +03:00
Christian Gmeiner
84fa286602
etnaviv: remove primconvert
...
This is no longer used.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12516 >
2021-08-26 10:44:04 +00:00
Christian Gmeiner
a3d6aa43a6
etnaviv: export supported prim types
...
This is now handled by gallium, so the related codepaths can be dropped.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12516 >
2021-08-26 10:44:04 +00:00
Juan A. Suarez Romero
b22ba69615
broadcom/qpu: remove duplicated opcode variable
...
`opcode` is wrote twice.
Fixes CID 1490798: Incorrect expression (EVALUATION_ORDER).
Fixes: 8a5f2228db ("broadcom/qpu: add new lookup opcode description helper")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12554 >
2021-08-26 10:12:35 +00:00
Timur Kristóf
626b125857
aco: Use workgroup size from input shader info.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Timur Kristóf
c4ca08548b
radv: Remove superfluous workgroup size calculations.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Timur Kristóf
9fd36bbacd
radv: Calculate workgroup sizes in radv_pipeline.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Timur Kristóf
395c0c52c7
ac: Calculate workgroup sizes of HW stages that operate in workgroups.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321 >
2021-08-26 09:46:18 +00:00
Samuel Pitoiset
66b5f05727
ci: update the list of skipped tests for Fiji/RADV
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12553 >
2021-08-26 09:09:47 +00:00
Tomeu Vizoso
203f9da167
panvk: Initialize timestamp for disk cache
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12552 >
2021-08-26 08:53:45 +00:00
Boris Brezillon
587046ed25
panfrost: Make pan_blit() return the tiler job pointer
...
The Vulkan driver needs to patch job headers when re-issueing a command
buffer. Return the tiler job pointer to allow that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12552 >
2021-08-26 08:53:45 +00:00
Boris Brezillon
e466e0ecd2
panfrost: Fix pan_blit_ctx_init() when start > end
...
This can happen when one wants to obtain a mirrored view. We need
to make sure the min <= max before emitting the viewport.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12552 >
2021-08-26 08:53:45 +00:00
Boris Brezillon
1c953ba212
panfrost: Prepare indirect draw helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
1447db0d51
panfrost: Prepare indirect dispatch helpers to per-gen XML
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
792a0ab0b1
panvk: Prepare per-gen split
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
c14c246439
panfrost: Only emit special attribute buffer entries on pre-v6 hardware
...
There's no special attributes on Bifrost.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
56a4aa9332
panfrost: Move panfrost_modifier_to_layout() to pan_texture.c
...
This function is not used outside pan_texture.c.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
5ca93f3599
panfrost: Get rid of all _packed structs in pan_context.h
...
Such that pan_context.h remains generic even after the per-gen XML
switch.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
0400c4ca1b
pan/gen_pack: Add parens around packed1/2 vars in pan_merge()
...
This way we can pass *desc instead of (*desc).
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
fe1d33daaf
panfrost: Add generic mappings for the gen-specific tiler descriptor macros
...
This way the transition to per-gen XML files gets simpler.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
5f3910a343
panfrost: Get rid of the mali_xxx enum redefinitions
...
The gen_macros.h header should include the common header file when
PAN_ARCH is undefined, thus making those redefinitions useless.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
13c13efcac
panfrost: s/[idep_]midgard_pack/[idep_]pan_packers/
...
We will soon have per-gen pack headers. Let's rename the meson variables
to reflect that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
908dde360a
panfrost: Stop including midgard_pack.h directly
...
Include gen_macros.h instead so we can smoothly transition to per-gen
XMLs.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
f96a30cea5
pan/gen_macros: Include midgard_pack.h from gen_macros.h
...
This way we will only have a single entry point, thus making the
transition to per-gen XML files easier.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
f29b45f934
pan/gen_macros: Map {TEXTURE,SAMPLER} to the arch-specific descriptor
...
This will ease the transition to per-arch XML files. While at it, patch
pan_cmdstream.c to use this new macro and avoid an #if section.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
2092f60ec1
pan/gen_macros: Move the TEXTURE definition to gen_macros.h
...
So we can use the same trick in panvk.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
8a058a9190
panfrost: Move the polygon list init logic to pan_cmdstream.c
...
This logic is Midgard specific and we need move the
panfrost_scoreboard_initialize_tiler() call to a per-arch file so
we can make panfrost_scoreboard_initialize_tiler a per-arch function.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:17 +02:00
Boris Brezillon
423f67c1bd
pan/gen_pack: Add pan_size() and pan_align() macros
...
And replace all references to MALI_xxx_{LENGTH,ALIGN} by
pan_{size,alignment}(xxx) calls so we can give generic alias to
midgard/bifrost specific descriptors.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:16 +02:00
Boris Brezillon
d7ff3973e9
panvk: Add missing midgard_pack dependency
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:16 +02:00
Boris Brezillon
188a2d3691
pan/gen_pack: Generalize the PREFIX() trick
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551 >
2021-08-26 10:35:16 +02:00
Marcin Ślusarz
e0533ebf16
intel/compiler: INT DIV function does not support source modifiers
...
BSpec says that for all generations.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5281
CC: mesa-stable
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12518 >
2021-08-26 07:51:44 +00:00
Timur Kristóf
346eb08a3d
radeonsi: Change GS vertex offset arguments to use gs_vtx_offset array.
...
This makes RadeonSI behave like RADV, and hence makes it possible to
use the NIR based ESGS I/O lowering and NGG lowering.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12511 >
2021-08-26 05:20:15 +00:00
Timur Kristóf
5b7446d74c
radv, ac, aco: Use indices 0-2 of gs_vtx_offset argument array on GFX9+.
...
Previously, indices 0, 2, 4 were used.
This worked, but it was somewhat unintuitive.
This commit changes it to use indices 0, 1, 2 instead, which
makes the code easier to understand.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12511 >
2021-08-26 05:20:15 +00:00
Ilia Mirkin
18962b94d3
glsl: fix explicit-location ifc matching in presence of array types
...
We were treating each field as if it took up a single slot. However
that's not the case. And with strict matching (GLSL 4.20+ / ES 3.1+) we
would end up not matching identical interfaces.
Fixes: c4545676d7 ("glsl/linker: fix location aliasing checks for interface variables")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12479 >
2021-08-26 04:07:29 +00:00
Simon Zeni
9ca7412033
meson: stop searching for execinfo
...
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Simon Zeni
973e9e25bd
util/u_debug_symbol: remove debug_symbol_name_glibc and execinfo dependency
...
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Simon Zeni
90be0d7963
glapi/gl_gentable.py: drop call to backtrace on no op
...
The function uses glibc specific functions
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Simon Zeni
0bbb9001c2
i915: remove use of backtrace and backtrace_symbols
...
The function `debug_backtrace` relied on glibc specific functions, and is
unused unless someone manually patches the source to set DEBUG_BACKTRACE_SIZE
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108 >
2021-08-26 01:47:30 +00:00
Nanley Chery
565f9105b7
anv/image: Don't assert that HiZ can be added
...
HiZ isn't yet enabled for Tile4/64.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
0022a11ff4
iris: Disable tiled memcpy for Tile4
...
ISL's tiled memcpy functions don't support it yet.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Jordan Justen
fd509ef59d
iris: Disable the Y-tiled modifiers on XeHP+
...
I915_FORMAT_MOD_Y_TILED_CCS was already disabled for Xe+ due to a change
in the CCS layout. Disable the remaining Y-tiled modifiers since XeHP
lacks support for Y-tiling.
Rework:
* Nanley: Include Anuj's fix for the non-CCS modifiers.
* Nanley: Split out Anuj's fix into a separate if statement.
* Nanley: Rewrite commit message.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
bd516c6581
intel/isl: Disable I915_FORMAT_MOD_Y_TILED on XeHP+
...
XeHP lacks support for Y-tiling.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
af40104e7d
intel: Add underscores to HALIGN and VALIGN enums
...
The HALIGN enums for XeHP already have underscores. Make the other
HALIGN and VALIGN enums conform.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
3d1f6342c0
intel: Update surface states for XeHP alignments
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
fbde743b07
intel/isl: Use a switch for HALIGN/VALIGN encoding
...
Avoid using a sparse and relatively large array for HALIGN encoding.
Additionally, this provides validation of the input alignment values.
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
2e464e69b9
intel/isl: Fix halign/valign of uncompressed views
...
We're going to start asserting for valid halign/valign values during
surface state emission. Pre-SKL, isl_surf_get_uncompressed_surf creates
uncompressed surfaces with invalid halign/valign values - 1x1. Fix this
by replacing the call to isl_surf_get_image_surf with isl_surf_init,
passing in the uncompressed format up-front.
As we're no longer using isl_surf_get_image_surf, we also need to get
the x and y offset of the image ourselves. Instead of getting a
sample-based offset, then converting to elements later on, we use
isl_surf_get_image_offset_B_tile_el to get the offset in elements
up-front.
With the above two changes, the generic code after the else-block is no
longer needed for the single-layer-view code path. We move it and
specialize it to the if-block (which is executed SKL+ and handles
multi-layer views).
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
c7bcbc950c
intel/blorp: Fix Gfx7 stencil surface state valign
...
Stencil on Gfx7 has a vertical alignment element of 8, but the largest
its surface state can express is 4. Apply the Gfx6 solution of changing
the alignment in blorp_surf_retile_w_to_y.
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
1f62cddaf5
intel/blorp: Fix faked RGB image alignment on XeHP
...
On XeHP, NPOT and POT formatted surfaces will use different image
alignment units when emitting surface states. When BLORP fakes an RGB
image as RED, update the image alignment to prevent assert failures when
emitting surface states.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
79ad9cda48
intel: Support Tile4/64 in surface states
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
dd9ae2dc7b
intel: Support Tile4/64 in depth/stencil state
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
f54de77c3a
intel/isl: Update tiling filter functions for XeHP
...
Enable the XeHP-specific tilings and restrict them to that platform.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
0ab2fa18e4
intel/isl: Use an allow-list in gfx6_filter_tiling
...
Try to avoid having to update isl_gfx6_filter_tiling when new tilings
are added for new platforms. Note that the allow-list uses
ISL_TILING_ANY_Y_MASK and thus assumes that no new Y-tilings will be
added in the future.
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
602f597bc1
intel/isl: Drop ISL_SURF_USAGE_DISPLAY_*_BIT
...
We haven't used these since their introduction.
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
ac37d7801c
intel/isl: Drop extra assert on array_pitch_el_rows
...
ISL already asserts that the variable is a multiple of the tile height
via isl_assert_div.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
4309012774
intel/isl: Size Tile64 surfaces with 4 dimensions
...
In order to size Tile64 surfaces correctly, make sure that the total
physical extent is arrayed. The code should handle 3D surfaces as well,
but is untested for now.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
8fd7678241
intel/isl: Update image alignments on XeHP
...
Implement the new XeHP alignment rules for surface layout.
RENDER_SURFACE_STATE objects still need updating, but that's left for a
separate commit.
Rework:
* Nanley: Include Sagar's VALIGN fix for D16_UNORM.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
0bcfa2d8fb
intel/isl: Define ISL_TILING_4/64 for XeHP
...
XeHP defines new tiling formats, Tile4 and Tile64. They are needed in
order to support depth/stencil surfaces and multisampling. Create new
ISL enums and define some initial tiling information in order to enable
them later on.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Nanley Chery
44ef425ce8
intel/isl: Add msaa_layout param to isl_tiling_get_info
...
The additional parameter will be used by Tile64.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Jason Ekstrand
e307d46eab
intel/isl: Add more parameters to isl_tiling_get_info
...
They are not used yet but the layout of Yf and Ys tiles are dependent on
these parameters. While we're here, better document the function.
Rework:
* Nanley: Update crocus.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132 >
2021-08-25 22:39:30 +00:00
Mike Blumenkrantz
5200a99062
zink: only remove programs from hash tables on shader deletion if needed
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:10 -04:00
Mike Blumenkrantz
c12a985894
zink: set inlinable_uniforms_mask first when binding a shader
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:10 -04:00
Mike Blumenkrantz
ec814f7d36
zink: add some null checks for shader variant key generation
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:10 -04:00
Mike Blumenkrantz
e7b0541d45
zink: stop using dirty_shader_stages for shader binds
...
by only using this mask for variant updates, we can begin to do some
neat things
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:10 -04:00
Mike Blumenkrantz
191ae5193c
zink: simplify a bitmask init
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:10 -04:00
Mike Blumenkrantz
5f3cb4c490
zink: create compute programs on bind
...
this simplifies the launch_grid codepath and gets shader binds out
the shader update bitmask
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:10 -04:00
Mike Blumenkrantz
e14ecb903b
zink: avoid hashing shader stages multiple times for new gfx programs
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:10 -04:00
Mike Blumenkrantz
4b5e26e678
zink: split gfx shader cache based on stages present
...
this makes the pool of progs in a given hash smaller and also minimizes
the hashing required for a given program
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:29:08 -04:00
Mike Blumenkrantz
2d54e8da50
zink: track mask of bound gfx shader stages
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:27:45 -04:00
Mike Blumenkrantz
ad6847cf53
zink: inline program cache structs
...
derefs--
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12532 >
2021-08-25 17:27:45 -04:00
Mike Blumenkrantz
bdbcf256a1
zink: return early when getting resource modifer if no modifier is used
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12534 >
2021-08-25 21:14:11 +00:00
Mike Blumenkrantz
325fbc3fd2
zink: verify program key sizes before checking for default variant
...
currently keys for shaders are always the same size, but this will change
in the future, at which point the keysize becomes relevant
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12547 >
2021-08-25 21:01:27 +00:00
Michael Tang
4a3395f35a
microsoft/compiler: Miscellaneous fixes from running clang-format
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12513 >
2021-08-25 20:19:05 +00:00
Michael Tang
1aca20be14
microsoft/compiler: Emit a flat interpolation method for SV_SampleIndex
...
We do not want to set an interpolation method for vertex shader inputs.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12513 >
2021-08-25 20:19:05 +00:00
Michael Tang
74a24f4f1c
microsoft/compiler: Set the SampleFrequency runtime metadata
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12513 >
2021-08-25 20:19:05 +00:00
Michael Tang
88220083cf
microsoft/compiler: More robustly handle setting Register=-1
...
This is the 'N/A mask' case in the DXIL disassembly.
This logic is taken from: 7c9e487afd/tools/clang/tools/dxcompiler/dxcdisassembler.cpp (L106)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12513 >
2021-08-25 20:19:05 +00:00
Michael Tang
62c3492d0b
microsoft/compiler: Add support for SV_SampleIndex intrinsic
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12513 >
2021-08-25 20:19:05 +00:00
Alyssa Rosenzweig
c4b5921d55
pan/bi: Fix format specifiers in disassembler
...
Flagged by cppcheck.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530 >
2021-08-25 20:03:08 +00:00
Alyssa Rosenzweig
589f365d05
pan/bi: Remove unused clause_start field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530 >
2021-08-25 20:03:08 +00:00
Alyssa Rosenzweig
1c2bc67fac
pan/bi: Assert l != NULL in bi_ra
...
Confuses cppcheck; indeed, the proof is confusing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530 >
2021-08-25 20:03:08 +00:00
Alyssa Rosenzweig
b1aa15d582
pan/bi: Simplify condition
...
Flagged by cppcheck.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530 >
2021-08-25 20:03:08 +00:00
Alyssa Rosenzweig
c08423699c
panfrost: Remove unused functions
...
Flagged by cppcheck.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530 >
2021-08-25 20:03:08 +00:00
Alyssa Rosenzweig
e9afd245f4
panfrost: Remove stale TODOs and XXXs
...
These don't meaningfully apply but their comments never got updated.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530 >
2021-08-25 20:03:08 +00:00
Alyssa Rosenzweig
8f25a606b4
panfrost: Remove CACHE_LINE_SIZE #define
...
Not only is it unused, it's totally wrong. Not even a little right.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530 >
2021-08-25 20:03:08 +00:00
Erik Faye-Lund
6e05f68924
llvmpipe: rip out cylindrical wrap support
...
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12505 >
2021-08-25 19:37:16 +00:00
Erik Faye-Lund
e9cc7f1ae4
softpipe: rip out cylindrical wrap support
...
This is never used, so let's just remove it.
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12505 >
2021-08-25 19:37:16 +00:00
Erik Faye-Lund
7b0bda2e55
gallium/tgsi: rip out cylindrical wrap support
...
We never enable this feature, so let's rip it out completely.
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12505 >
2021-08-25 19:37:16 +00:00
Erik Faye-Lund
526f7d7790
gallium/tgsi: rip out cylindrical wrap from ureg
...
We always pass zero to these arguments, so this feature isn't in use.
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12505 >
2021-08-25 19:37:16 +00:00
Erik Faye-Lund
bd93364ea2
gallium/tgsi: remove unused helper
...
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12505 >
2021-08-25 19:37:16 +00:00
Erik Faye-Lund
e26fd607ca
draw/llvmpipe: correct exponent calculation for negative z
...
If the z components here contain negative values, we'll end up with the
wrong maximum value.
This updated equation is taken from the D3D11 functional spec (section
15.10 Depth Bias), which is a bit more clear than the OpenGL spec.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12443 >
2021-08-25 19:12:12 +00:00
Samuel Pitoiset
0f05c84bba
radv: allow storage images with VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 on GFX10.3+
...
It should be supported.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12543 >
2021-08-25 16:27:46 +00:00
Rob Clark
74d1052537
freedreno/a6xx: Fix a6xx gen4 compute shaders
...
I believe the addition of these new regs is related to the changes made
for LPAC ring, so let's key off of that.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Rob Clark
12a9adbb3b
freedreno/a6xx: Register updates for a6xx gen4
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Rob Clark
ab37109d23
freedreno/a6xx: Updates for tess_use_shared
...
The formula for calculating these two values seems to depend on
tess_use_shared, ie. a6xx_gen3 and a6xx_gen4 match. The existing
calculation matches a6xx_gen1 and a6xx_gen2.
The new formula is based on traces varying # of output (from VS)
varyings from (1..31)*vec4 and vertices from (1..31) and coming up
with something that matches the blob. Once hs_input_size*4 divided
by tcs_vertices_out goes above 64, this deviates a bit from the
blob, but AFAICT it is safe to pick a larger values.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Rob Clark
31835ac3b8
freedreno/a6xx: Fix streamout with tess_use_shared
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Rob Clark
219e12b7f3
freedreno/a6xx: Rast updates for a6xx gen3
...
Not really sure what these new regs are, but blob emits them as part of
rasterizer state starting with a650.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Rob Clark
677dbb0e52
freedreno/a6xx: Register updates for a6xx gen3
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Rob Clark
28c5384cf9
freedreno/a6xx: Set type for PC_HS_INPUT_SIZE
...
It is an unsigned integer.. display it as such.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Rob Clark
8dff5356ff
freedreno/common: Fix comment typo
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12497 >
2021-08-25 15:24:19 +00:00
Alyssa Rosenzweig
d051b06a48
panfrost: Raise maximum texture size
...
The hardware can handle much larger textures than we allowed. The game
"Cathedral" requires larger textures for some bizarre reason. Raise the
limit so the game runs, syncing MAX_MIP_LEVELS, the comments, and the CAPs.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Closes : #5203
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12312 >
2021-08-25 13:49:17 +00:00
Daniel Schürmann
cd489e5388
aco: remove redundant s_and exec after nir_op_inot
...
Totals from 22585 (15.04% of 150170) affected shaders: (GFX10.3)
VGPRs: 1474048 -> 1473904 (-0.01%)
CodeSize: 155238876 -> 155187688 (-0.03%); split: -0.06%, +0.03%
MaxWaves: 385086 -> 385122 (+0.01%)
Instrs: 29297735 -> 29284442 (-0.05%); split: -0.08%, +0.04%
Latency: 675841742 -> 675764151 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 174859037 -> 174854796 (-0.00%); split: -0.01%, +0.01%
VClause: 479790 -> 479781 (-0.00%); split: -0.01%, +0.00%
SClause: 1106900 -> 1106615 (-0.03%); split: -0.03%, +0.01%
Copies: 1829037 -> 1828042 (-0.05%); split: -0.09%, +0.03%
Branches: 859971 -> 859967 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 1341850 -> 1342356 (+0.04%); split: -0.01%, +0.04%
PreVGPRs: 1327322 -> 1327034 (-0.02%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11573 >
2021-08-25 12:43:50 +00:00
Timur Kristóf
abcc83e713
aco: Fix to_uniform_bool_instr when operands are not suitable.
...
Don't attempt to transform uniform boolean instructions when
their operands are unsuitable. This can happen eg. due to other
optimizations that combine SALU instructions which clear out
the uniform instruction labels.
Cc: mesa-stable
Fixes: 8a32f57fff
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11573 >
2021-08-25 12:43:50 +00:00
Lionel Landwerlin
a13e79843e
nir: prevent peephole from generating invalid NIR
...
We can't append instructions following a return/halt instruction
because the control flow helpers will modify the successor of the
block containing the return/halt. And the NIR validator enforces that
the return/halt must have the end of the function as successor.
This tends to happen following lower_shader_calls lowering which
inserts halts. This probably doesn't prevent the optimization, it'll
just happen in one of the return shaders after the halt has been
removed.
v2: Move prev block ending check earlier in the function (Daniel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12506 >
2021-08-25 11:38:21 +00:00
Samuel Pitoiset
e0a703af11
ci: update the list of expected failures/skips for RADV
...
Against CTS 1.2.7.0.
Tested chips are Pitcairn, Polaris10, Navi14 and Sienna Cichlid.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12539 >
2021-08-25 13:00:07 +02:00
Tomeu Vizoso
3f5053b899
iris/ci: Add manual jobs for tracking performance
...
Use Piglit's replay profile to measure and store the time that frames
take to render in the GPU.
This job won't run automatically in regular pipelines, but will be
triggered automatically by a script for every successful pre-merge
pipeline.
This is because we want to generate performance data for every relevant
commit merged in main, but we don't want to keep a device busy during
the pre-merge run.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12236 >
2021-08-25 09:32:17 +02:00
Samuel Pitoiset
cff106c4b6
nir/opt_algebraic: optimize fmax(-fmin(b, a), b) -> fmax(fabs(b), -a)
...
and fmin(-fmax(b, a)) to fmin(-fabs(b), -a).
fossils-db (Sienna Cichlid):
Totals from 34 (0.02% of 150170) affected shaders:
CodeSize: 388540 -> 387748 (-0.20%)
Instrs: 74621 -> 74423 (-0.27%)
Latency: 1039407 -> 1039011 (-0.04%)
InvThroughput: 208364 -> 208150 (-0.10%)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12519 >
2021-08-25 07:18:24 +02:00
Dave Airlie
ad78643061
crocus: add missing fs dirty on reduced prim change.
...
the reduced prim is used to decide some line antialiasing settings.
this fixes mesa-demos antialias
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12536 >
2021-08-25 03:30:16 +00:00
Dave Airlie
6b7a68b7c2
crocus: add missing line smooth bits.
...
Just noticed this in passing.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12536 >
2021-08-25 03:30:16 +00:00
Mike Blumenkrantz
560dc4f790
zink: fix pipeline caching
...
this was apparently always broken, but in a very, very subtle way
where the hash table would compare the current pipeline state against
itself instead of using the cache entry's state
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12535 >
2021-08-25 03:11:41 +00:00
Mike Blumenkrantz
712a4d2fd2
zink: fix program init flag
...
this was accidentally !! instead of ! as intended
Fixes: c4702204bc ("zink: optimize shader recalc")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12535 >
2021-08-25 03:11:41 +00:00
Michael Tang
4237aa3a7e
spirv_to_dxil: Run nir_lower_tex during compilation
...
We need this to get e.g. a default lod for some instructions when it is
not provided.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12462 >
2021-08-24 22:18:30 +00:00
Dave Airlie
4c260f017c
crocus: drop u_primconvert header.
...
This is just leftover.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12531 >
2021-08-24 21:38:27 +00:00
Mike Blumenkrantz
ea18b0930b
zink: add better TODO note for surface swizzles
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12529 >
2021-08-24 21:23:45 +00:00
Mike Blumenkrantz
6ff5eaa7d5
zink: make void swizzle clamping util public
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12529 >
2021-08-24 21:23:45 +00:00
Mike Blumenkrantz
52032d5efa
zink: make component mapping function a static inline
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12529 >
2021-08-24 21:23:45 +00:00
Mike Blumenkrantz
08bad3b2b8
zink: move void format detection function to zink_format
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12529 >
2021-08-24 21:23:45 +00:00
Mike Blumenkrantz
e645e3c523
nine: replace unnecessary dynamic-sized array with bitfield
...
PIPE_MAX_VERTEX_STREAMS is 4, so this can be simplified to reduce cpu usage
Reviewed-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12523 >
2021-08-24 20:38:41 +00:00
Alyssa Rosenzweig
16b4916432
panfrost: Take a ctx when submitting/destroying
...
This reduces the number of batch->ctx shenanigans we do, and in turn
should reduce raciness.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12366 >
2021-08-24 20:20:29 +00:00
Ian Romanick
fe956d0182
spirv: Add support for SPV_KHR_integer_dot_product
...
v2 (Ivan): Add missing capability enum handling.
v3 (idr): Properly handle cases where dest_size != 32.
v4 (idr): Rewrite most of the error checking to use vtn_fail_if. Use
nir_ssa_def with vtn_push_nir_ssa instead of vtn_ssa_value with
vtn_push_ssa_value. All suggested by Jason. Massive rewrite of the
handling of packed 4x8 saturating opcodes. Based on some observations
made by Jason.
v5 (idr): Remove some debugging cruft accidentally added in v4. Noticed
by Jason.
v6: Emit packed versions of vectored instructions when possible.
Suggested by Jason.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Ian Romanick
652d304ee9
spirv: Update headers and metadata from latest Khronos commit
...
This corresponds to e7b49d7 ("Implement SPV_INTEL_optnone extension
(#230 )") in https://github.com/KhronosGroup/SPIRV-Headers .
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Ian Romanick
a6db40605e
nir/algebraic: Add some extract optimizations
...
These help quite a bit when vectored versions of SpvOpSDotKHR and
friends are emitted as packed versions and then lowered.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Ian Romanick
839495efc6
nir/algebraic: Add lowering for dot_4x8 instructions
...
v2: Fix copy-and-paste bugs in lowering patterns.
v3: Add has_sudot_4x8 flag. Requested by Rhys.
v4: Since the names of the opcodes changed from dp4 to dot_4x8, also
change the names of the lowering helpers. Suggested by Jason.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Ian Romanick
0f809dbf40
intel/compiler: Basic support for DP4A instruction
...
v2: Very significant rebase on changes to previous commits.
Specifically, brw_fs_nir.cpp changes were pretty much rewritten from
scratch after changing the NIR opcode names and types.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Ian Romanick
806cd2341c
nir/algebraic: Basic patterns for dot_4x8
...
v2: Add and modify patterns to let constant folding do better.
v3: Remove '(is_not_zero)' from the patterns that try to combine
addends. I honestly don't know why I had it there in the first place,
and nothing in my deep git logs could help clue me in. Noticed by
Alyssa. Remover patterns that detect open-coded udot_4x8. Suggested by
Alyssa and Jason. Add missing sudot_4x8 patterns.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Ian Romanick
6c18a3b497
nir/opcodes: Add integer dot-product opcodes
...
Six opcodes are added: sdot_4x8_iadd, udot_4x8_uadd, sudot_4x8_iadd,
sdot_4x8_iadd_sat, udot_4x8_uadd_sate, and sudot_4x8_iadd_sat. These
represent the combinations of integer dot-product and add that operate
on packed source vectors. That is, the four 8-bit values for each
vector is stored in a single 32-bit integer.
Some hardware may prefer to operate on unpacked byte vectors. When such
hardware comes to Mesa, we'll have to figure out how to name things.
v2: Add nir_op_iudp4a and nir_op_iudp4a_sat instructions. These opcodes
are not 2-source commutative.
v3: Rename all opcodes to be more like some existing 4x8 opcodes.
Suggested by Timur. Change type of packed vector sources to uint32,
change types of constant folding variables to have explicit size, and
delete some extra casts. All suggested by Jason.
v4: Fix typo previously noticed by Alyssa but missed in v2.
v5: Add has_sudot_4x8 flag. Requested by Rhys.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Ian Romanick
7d8bf7c167
nir/lower_bit_size: Support add_sat and sub_sat
...
Without this, lowered saturating ALU instructions would only clamp to
the range of the new type instead of the range of the old type.
v2: Use nir_iclamp. Suggested by Jason. Use new
u_{int,uint}N_{min,max}() helpers.
Fixes: 090e282407 ("nir: Add a saturated unsigned integer add opcode")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12142 >
2021-08-24 19:58:57 +00:00
Alyssa Rosenzweig
8503cab2e0
panfrost: Replace writers pointer with hash table
...
This ensures each context can have a separate batch writing a resource
and we don't race trying to flush each other's batches. Unfortunately
the extra hash table operations regress draw-overhead numbers by about
8% but I'd rather eat the overhead and have an obviously correct
implementation than leave known buggy code in tree.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Alyssa Rosenzweig
afebbadda8
panfrost: Remove writer = NULL assignments
...
These already happened.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Alyssa Rosenzweig
e7eb28fed0
panfrost: Remove rsrc->track.users
...
No longer needed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Alyssa Rosenzweig
e98aa55413
panfrost: Prefer batch->resources to rsrc->users
...
This expresses the semantic of the flush only applying to batches within
the context, not globally, in line with OpenGL's multithreading rules.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Alyssa Rosenzweig
5c4fbae571
panfrost: Add foreach_batch iterator
...
Using the active mask.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Alyssa Rosenzweig
79dd1a4e63
panfrost: Maintain a bitmap of active batches
...
This is on the context, so no concurrency issues. This will allow us to
efficiently iterate active batches.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Alyssa Rosenzweig
b8da5b1b7f
panfrost: Cache number of users of a resource
...
This can be tracked efficiently with atomics, and reduces the places we
use the rsrc->track.users bitmap which has concurrency issues.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Alyssa Rosenzweig
2f63ccd080
panfrost: Switch resources from an array to a set
...
This will help us reduce shared state and simplify multithreading, at
the expense of additional CPU overhead.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528 >
2021-08-24 19:39:51 +00:00
Mike Blumenkrantz
8e2159a57f
zink: stop referencing framebuffers
...
this is a waste of cycles now that surfaces are accurately tracked;
no-attachment fbs are still deferred to avoid premature deletion
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12429 >
2021-08-24 19:23:48 +00:00
Mike Blumenkrantz
1af6618694
zink: defer deletion of no-attachment framebuffers
...
the ref on these is owned by the context, so defer deletion to avoid
premature destruction if the fb might be in use
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12429 >
2021-08-24 19:23:48 +00:00
Alyssa Rosenzweig
3622562e44
panfrost: Inline add_fbo_bos
...
Only used once, it's just complicating the batch cache interface.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12525 >
2021-08-24 14:31:55 -04:00
Alyssa Rosenzweig
4991e17297
panfrost: Remove get_fresh_batch
...
Unused, and of dubious value.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12525 >
2021-08-24 14:31:54 -04:00
Alyssa Rosenzweig
bd15e5e6af
panfrost: Move bo->label assignment into the lock
...
We already took the lock, we just unlocked too early. Since the label is
reset in the BO cache, this is racy. Minimal impact in practice but is
still /wrong/ and caught by helgrind.
Fixes: 3fa1f93dac ("panfrost: Label all BOs in userspace")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12525 >
2021-08-24 14:31:54 -04:00
Alyssa Rosenzweig
e6924be737
panfrost: Don't use ralloc for resources
...
ralloc is not thread safe, so we cannot use a pipe_screen as a ralloc
context unless we lock the screen. The allocation patterns for resources
are trivial, so just use malloc/calloc/free directly instead of ralloc.
This fixes a segfault in:
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copytexsubimage2d.1
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12525 >
2021-08-24 14:31:54 -04:00
Alyssa Rosenzweig
9307028255
panfrost: Simplify get_fresh_batch_for_fbo
...
Makes the code easier to read, too.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12525 >
2021-08-24 14:31:54 -04:00
Alyssa Rosenzweig
81a76d9e42
panfrost: Remove null check in batch_cleanup
...
Shouldn't happen.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12525 >
2021-08-24 14:31:54 -04:00
Alyssa Rosenzweig
40edc87956
panfrost: Protect the variants array with a lock
...
Without a lock, two threads may bind the same shader CSO simultaneously,
allocate the same variant simultaneously, and then race each other in
the compiler. This manifests in various ways, most commonly failing the
assertion that UBO pushing has only run once. The simple_mtx_t solution
is used in Iris. Fixes the crash in:
dEQP-EGL.functional.sharing.gles2.multithread.simple.buffers.bufferdata_render
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12525 >
2021-08-24 14:31:54 -04:00
Alyssa Rosenzweig
67821af1de
panfrost/ci: Don't skip matrix inverse tests
...
Older versions of these tests were buggy and failed on Bifrost. The test
bug has been resolved upstream, but the skip list was not updated when
dEQP was uprevved with the fix. Run the tests.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12313 >
2021-08-24 18:12:14 +00:00
Alyssa Rosenzweig
324a32ac14
panfrost/ci: Switch to suite support
...
Use the new deqp-runner suite support to combine our dEQP-GLES2,
dEQP-GLES3, and dEQP-GLES31 jobs into a single job. This simplifies load
balancing, enabling us to expand our test coverage without impacting
wall clock time.
With the new infrastructure in place, we add KHR-GLES* jobs for Mali
G52. This would have caught some recent regressions. Once we hit
conformance it's essential we remain conformant.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12313 >
2021-08-24 18:12:14 +00:00
Rhys Perry
3d228b6926
nir/gcm: pin some instructions which require uniform sources
...
fossil-db (Sienna Cichlid, GCM enabled):
Totals from 6192 (4.12% of 150170) affected shaders:
VGPRs: 548392 -> 542040 (-1.16%)
SpillSGPRs: 3702 -> 3990 (+7.78%); split: -0.54%, +8.32%
CodeSize: 62418488 -> 62481516 (+0.10%); split: -0.07%, +0.17%
MaxWaves: 70582 -> 71718 (+1.61%)
Instrs: 11768497 -> 11795079 (+0.23%); split: -0.07%, +0.30%
Latency: 445891848 -> 523561297 (+17.42%); split: -0.07%, +17.49%
InvThroughput: 115675481 -> 121494913 (+5.03%); split: -0.09%, +5.12%
VClause: 164914 -> 164934 (+0.01%); split: -0.05%, +0.06%
SClause: 405991 -> 395302 (-2.63%); split: -2.64%, +0.00%
Copies: 907216 -> 926429 (+2.12%); split: -1.11%, +3.23%
Branches: 456373 -> 457478 (+0.24%); split: -0.13%, +0.38%
PreSGPRs: 648030 -> 642953 (-0.78%); split: -0.88%, +0.10%
PreVGPRs: 522425 -> 516355 (-1.16%); split: -1.16%, +0.00%
Seems to affect Detroit: Become Human and Cyberpunk 2077. The Cyberpunk
2077 changes look like a fixed bug. At least some of the Detroit: Become
Human changes could probably be removed with better divergence analysis.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12444 >
2021-08-24 16:52:31 +00:00
Rhys Perry
884ac52eaa
nir: consider push constant loads as always dynamically uniform
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12444 >
2021-08-24 16:52:31 +00:00
Daniel Schürmann
a3110c308f
radv: call nir_lower_flrp() after the first radv_optimize_nir()
...
instead of inside the optimization loop
Totals from 2504 (1.67% of 150170) affected shaders: (GFX10.3)
VGPRs: 162592 -> 162416 (-0.11%); split: -0.12%, +0.01%
CodeSize: 18399756 -> 18383552 (-0.09%); split: -0.10%, +0.01%
MaxWaves: 42654 -> 42748 (+0.22%)
Instrs: 3499404 -> 3497075 (-0.07%); split: -0.08%, +0.01%
Latency: 87087238 -> 87064270 (-0.03%); split: -0.06%, +0.03%
InvThroughput: 21159621 -> 21150546 (-0.04%); split: -0.05%, +0.01%
VClause: 56653 -> 56667 (+0.02%); split: -0.00%, +0.03%
Copies: 226332 -> 226423 (+0.04%); split: -0.15%, +0.19%
Branches: 110027 -> 110025 (-0.00%); split: -0.05%, +0.04%
PreSGPRs: 168087 -> 168076 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 160814 -> 160705 (-0.07%)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12061 >
2021-08-24 16:10:30 +00:00
Daniel Schürmann
2cf164feb9
nir/opt_algebraic: optimize flrp(fadd, fadd, x) only if fadd are used_once
...
Totals from 201 (0.13% of 150170) affected shaders: (GFX10.3)
VGPRs: 13880 -> 13856 (-0.17%)
CodeSize: 1517328 -> 1518124 (+0.05%); split: -0.04%, +0.10%
MaxWaves: 3184 -> 3192 (+0.25%)
Instrs: 285487 -> 285569 (+0.03%); split: -0.06%, +0.08%
Latency: 7774066 -> 7780877 (+0.09%); split: -0.10%, +0.19%
InvThroughput: 1936341 -> 1935287 (-0.05%); split: -0.07%, +0.02%
SClause: 11446 -> 11448 (+0.02%); split: -0.01%, +0.03%
Copies: 17500 -> 17506 (+0.03%); split: -0.51%, +0.55%
Branches: 8174 -> 8180 (+0.07%); split: -0.13%, +0.21%
PreVGPRs: 12507 -> 12427 (-0.64%)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12061 >
2021-08-24 16:10:30 +00:00
Daniel Schürmann
89a842b2b6
nir/loop_analyze: consider instruction cost of nir_op_flrp
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12061 >
2021-08-24 16:10:30 +00:00
Chia-I Wu
572ed22494
venus: use uint32_t in vn_ring_submit
...
And in vn_ring_write_buffer as well, to fix the assert in
vn_ring_write_buffer.
The ring code uses 32-bit unsigned integers and relies on that their
overflow/underflow behavior is well-defined. When ring->shared.head is
about to overflow and ring->cur has overflowed, this expression
ring->cur + size - vn_ring_load_head(ring)
gives an incorrect result when size is 64-bit.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12494 >
2021-08-24 08:56:16 -07:00
Marek Olšák
db9ffc5561
glthread: implement glGetUniformLocation without syncing
...
We already have the infrastructure for querying shader program properties
without syncing. This just uses it. _mesa_error_glthread_safe sets a GL
error from the producer thread.
This decreases CPU overhead for viewperf/snx.
Reviewed-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12490 >
2021-08-24 15:24:07 +00:00
Marek Olšák
625f00d37c
gallium: change pipe_draw_info::mode to uint8_t on MSVC to make it 1 byte large
...
needed by u_threaded_context
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12480 >
2021-08-24 10:43:44 -04:00
Marek Olšák
8886bf9a47
gallium: use a packed enum to make pipe_prim_mode 1-byte large with __GNUC__
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12480 >
2021-08-24 10:43:44 -04:00
Mike Blumenkrantz
06ca0fc3b1
zink: only force all buffer rebinds if rebinds exist on other contexts
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12425 >
2021-08-24 14:17:51 +00:00
Mike Blumenkrantz
8d9891088f
zink: rebind all buffers on replacement
...
in theory it's possible to trigger cases where rebinds aren't based on the
current context, so ensure that (very unlikely) case is handled
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12425 >
2021-08-24 14:17:50 +00:00
Mike Blumenkrantz
1e362da3df
zink: count streamout rebinds when doing buffer rebinds
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12425 >
2021-08-24 14:17:50 +00:00
Mike Blumenkrantz
95a67ede54
zink: add bind counts for so bindings
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12425 >
2021-08-24 14:17:50 +00:00
Mike Blumenkrantz
0802d307f6
zink: split out buffer rebinds to helper functions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12425 >
2021-08-24 14:17:50 +00:00
Mike Blumenkrantz
e08edc8294
zink: make descriptor update functions return the updated resource
...
convenience++
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12425 >
2021-08-24 14:17:50 +00:00
Mike Blumenkrantz
a9ccef9bc7
zink: clear out all ubo rebinds first if they exist
...
these are the second most common rebind, so iterate them all first
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12425 >
2021-08-24 14:17:50 +00:00
Rhys Perry
94ed2ab3a1
radv: use nir_vector_insert_imm in lower_intrinsics
...
This creates a single nir_op_vecn instead of a nir_op_vecn and several
copies.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12469 >
2021-08-24 10:35:19 +00:00
Rhys Perry
aeb1b4c30c
nir/lower_io: use nir_vector_insert_imm()
...
This creates a single nir_op_vecn instead of a nir_op_vecn and several
copies.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12469 >
2021-08-24 10:35:19 +00:00
Guilherme Gallo
83ca8145e9
gitlab-ci: Fix octopus device type and tag
...
* This month, the octopus device was renamed on Collabora's LAVA lab, so
we need to update it to get it working again on Mesa CI.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12507 >
2021-08-24 09:32:51 +00:00
Samuel Pitoiset
f4b858e746
Revert "nir/opt_algebraic: optimize fmax(-fmin(b, a), b) -> fmax(b, -a)"
...
This is wrong for negative values.
This reverts commit 07cd30ca29 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12515 >
2021-08-24 08:58:38 +00:00
Erik Faye-Lund
a16f3963d3
lavapipe: fix reported subpixel precision for lines
...
We have no reason to report a subpixel precision of 4 for lines; in fact
LLVMpipe uses 8 subpixel bits for lines, similar to other primitives.
But let's use the pipe-cap for this instead of hard-coding it.
Fixes: 9fbf6b2abf ("lavapipe: implement VK_EXT_line_rasterization")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12277 >
2021-08-24 08:45:20 +00:00
Vinson Lee
0a4c4f4459
broadcom/compiler: Fix qpu.flags.muf typo.
...
Fix defect reported by Coverity Scan.
Same on both sides (CONSTANT_EXPRESSION_RESULT)
pointless_expression: The expression inst->qpu.flags.auf !=
V3D_QPU_UF_NONE || inst->qpu.flags.auf != V3D_QPU_UF_NONE does not
accomplish anything because it evaluates to either of its identical
operands, inst->qpu.flags.auf != V3D_QPU_UF_NONE.
Fixes: 3f2c54a27f ("broadcom/compiler: rewrite partial update liveness tracking")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12385 >
2021-08-24 08:30:59 +00:00
Erik Faye-Lund
4d6e18b6cb
llvmpipe: improve polygon-offset precision
...
This performs the polygon offset addition after interpolation, which
prevents floating-point cancellation issues completely.
This does mean that we have to perform a single floating-point addition
more per fragment than before, unless we also want to spend a bit in
the fragment-shader variant key to avoid this.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12442 >
2021-08-24 07:36:31 +00:00
Erik Faye-Lund
1fa61483de
llvmpipe: split coefficient calculation and store
...
This will be used for some underhanded smuggling of values in the next
commit.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12442 >
2021-08-24 07:36:31 +00:00
Erik Faye-Lund
8565333669
llvmpipe: clamp z to 0..1 range when using polygon offset
...
The OpenGL 4.6 compatibility spec, section 14.6.5 (Depth Offset) says
the following:
> For fixed-point depth buffers, fragment depth values are always
> limited to the range [0,1] by clamping after offset addition is
> performed. Fragment depth values are clamped even when the depth
> buffer uses a floating-point representation.
So we need to properly clamp the result here.
This fixes the following dEQP failures, that the CI has missed:
- dEQP-GLES3.functional.polygon_offset.default_result_depth_clamp
- dEQP-GLES3.functional.polygon_offset.default_factor_1_slope
- dEQP-GLES3.functional.polygon_offset.fixed24_result_depth_clamp
- dEQP-GLES3.functional.polygon_offset.fixed24_factor_1_slope
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12442 >
2021-08-24 07:36:31 +00:00
Dave Airlie
63138c42c5
crocus: copy views before adjusting
...
The current code overwrote the original view which meant if we
had to reemit a surface the second emit would be wrong.
This fixes cubemaps on gm45 and maybe some issues with 3D textures
elsewhere.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12514 >
2021-08-24 02:21:01 -04:00
Vinson Lee
4fc2a6cbdb
freedreno: Require C++17.
...
Commit 3a772be026 ("freedreno: Add perfetto renderpass support")
uses C++17 init-statement feature.
GCC
../src/gallium/drivers/freedreno/freedreno_perfetto.cc: In lambda function:
../src/gallium/drivers/freedreno/freedreno_perfetto.cc:148:11: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’
148 | if (auto state = tctx.GetIncrementalState(); state->was_cleared) {
| ^~~~
Clang
../src/gallium/drivers/freedreno/freedreno_perfetto.cc:148:11: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
if (auto state = tctx.GetIncrementalState(); state->was_cleared) {
^
Intel C++ Compiler
../src/gallium/drivers/freedreno/freedreno_perfetto.cc(148): error: expected a ")"
if (auto state = tctx.GetIncrementalState(); state->was_cleared) {
^
Fixes: 3a772be026 ("freedreno: Add perfetto renderpass support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5193
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Acked-by: Rob Clark <robdclark@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12293 >
2021-08-23 21:15:48 -07:00
Jason Ekstrand
31fdd26d01
intel/compiler: Add unified barrier support for CS
...
Program CS barrier message fields for producers/consumers.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11963 >
2021-08-24 01:31:48 +00:00
Jordan Justen
6a950bab0c
intel/compiler: Add unified barrier support for TCS
...
Program the producers/consumer fields for TCS Barrier messages.
Producer and consumer fields are set to number of TCS threads.
Ref: Bspec 54006 for Barrier Data Payload
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11963 >
2021-08-24 01:31:48 +00:00
Jordan Justen
b4055a020f
intel/compiler: Regroup TCS barrier code paths
...
Rearrange if/else fragments to unify case for Gen11 or later
platforms. This will help the code look cleaner for adding
unified barrier support to TCS.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11963 >
2021-08-24 01:31:48 +00:00
Alyssa Rosenzweig
0606af1d4a
panfrost: Rip out primconvert code
...
This is handled in common Gallium code if we set the appropriate CAP.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12509 >
2021-08-24 00:53:38 +00:00
Alyssa Rosenzweig
2d31d469f7
panfrost: Fix NULL dereference in allowlist code
...
If a user attempts to run Panfrost on an unsupported GPU (e.g. Mali
T604), Panfrost will refuse to load and will destroy the screen
immediately, allowing for a graceful fallback to a software rasterizer.
However, the screen destroy code calls a screen_destroy function in the
GenXML vtbl -- and this function is still NULL when the allowlist is
checked. This manifests as crashes on unsuported GPUs.
Issue tracked down with Icecream95's mad Ghidra skills.
Closes : #5269
Fixes: 88dc4db6be ("panfrost: Init/destroy blitter from per-gen file")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reported-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12512 >
2021-08-24 00:38:31 +00:00
Nanley Chery
2944f49610
intel: Parse INTEL_NO_HW for devinfo construction
...
This commit does several things:
* Unify code common to several drivers by evaluating INTEL_NO_HW within
intel_get_device_info_from_fd (suggested by Jordan).
* For drivers that keep a copy of the intel_device_info struct, a
separate copy of the no_hw field is now unnecessary. Remove them.
* Minimize kernel queries when INTEL_NO_HW is true. This is done for
code simplification, but we may find reason to undo this later on.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12007 >
2021-08-24 00:12:47 +00:00
Nanley Chery
7d59a66e3a
intel: Use env_var_as_boolean for INTEL_NO_HW
...
The prior method of checking the result of getenv() for NULL would cause
the feature to be enabled for INTEL_NO_HW=0.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12007 >
2021-08-24 00:12:47 +00:00
Alyssa Rosenzweig
e245468eb4
panfrost: Port v5 blend shader issue to blitter
...
This is a presumed erratum workaround. Fixes INSTR_INVALID_PC faults on
some draw_buffers_indexed.* cases on Midgard, where a blend shader is
required to pack RT n > 0.
Backport the workaround from the GL driver. The helper is now in common
code for panvk to use as well; it has the same bug.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:34 +00:00
Alyssa Rosenzweig
3113dbd837
panfrost: Zero initialize blend_shaders
...
Fixes an invalid read caught by valgrind when there is a hole in the
valid render target mask:
==6749== Conditional jump or move depends on uninitialised value(s)
==6749== at 0x5E88EC0: panfrost_prepare_fs_state (pan_cmdstream.c:417)
==6749== by 0x5E88EC0: panfrost_emit_frag_shader (pan_cmdstream.c:501)
==6749== by 0x5E88EC0: panfrost_emit_frag_shader_meta (pan_cmdstream.c:573)
==6749== by 0x5E88EC0: panfrost_update_state_fs (pan_cmdstream.c:2593)
==6749== by 0x5E8B0BF: panfrost_direct_draw (pan_cmdstream.c:2839)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Fixes: a124c47b9f ("panfrost: Fix NULL derefs in pan_cmdstream.c")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:34 +00:00
Alyssa Rosenzweig
5c4b54ce96
pan/mdg: Handle swapped 565 and 1010102 unorm
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:34 +00:00
Alyssa Rosenzweig
82a6b38d8c
pan/lower_framebuffer: Don't open-code pan_unpacked_type_for_format
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:34 +00:00
Alyssa Rosenzweig
5fe35012c9
pan/lower_framebuffer: Don't open-code pad_vec4
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:34 +00:00
Alyssa Rosenzweig
58e96e4aa2
pan/lower_framebuffer: Don't treat UNORM 4 special
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:34 +00:00
Alyssa Rosenzweig
0169f7aac8
pan/lower_framebuffer: Unify UNORM handling
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:34 +00:00
Alyssa Rosenzweig
851620562a
pan/lower_framebuffer: Use fmul_imm
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Alyssa Rosenzweig
eda3e7f32c
pan/lower_framebuffer: Don't replicate so much
...
We need to replicate to deal with multisampling, but not otherwise.
Simplify the logic substantially.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Alyssa Rosenzweig
f45ceb8182
pan/mdg: Insert moves before writeout when needed
...
Otherwise we end up accessing overwritten registers. Fixes
dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_enable_buffer_enable
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Alyssa Rosenzweig
7cc3a7ff45
panfrost: Delete unpacks for blendable formats
...
Unnecessary.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Alyssa Rosenzweig
2cf581b195
panfrost: Use blendable check for tib read check
...
These are the same! Either you're blendable and can use f32/f16
conversion, or you're raw and you can only get raw. It's that simple!
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Alyssa Rosenzweig
85ab479d24
panfrost: Fix UNORM 10 sizes
...
Fixes: 56047fb64d ("panfrost: Fix UNORM 16 rendering")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Alyssa Rosenzweig
6dfdeea213
panfrost: Remove unneeded quirks from T760
...
Will cause trouble later in the series when we start garbage collecting
unneeded code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Boris Brezillon
6b7b8eb046
panfrost: Add explicit padding to pan_blend_shader_key
...
So the hash function doesn't end up hashing uninitialized values.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reported-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Fixes: bbff09b952 ("panfrost: Move the blend shader cache at the device level")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Tomeu Vizoso
27367cf018
panfrost: Add padding to pan_blit_blend_shader_key
...
So the hashtable helpers know the correct size of the struct.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383 >
2021-08-23 20:54:33 +00:00
Kenneth Graunke
9cc303ffbb
iris: Mark the aux table buffers with EXEC_OBJECT_CAPTURE.
...
Having these could be useful when tracking down GPU hangs.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12420 >
2021-08-23 13:28:23 -07:00
Kenneth Graunke
7bb4ada8e0
iris: Bypass the BO cache when allocating buffers for aux map tables
...
When freeing a buffer, we may return a non-idle buffer to the cache,
which means we cannot unmap aux entries at that time. Instead, we
defer unmapping the stale aux entry until we reuse a BO from the cache.
Unfortunately, this can lead to a recursive locking issue:
1. intel_aux_map_add_mapping wants to set up a new aux entry
It takes the intel_aux_map_context::mutex lock, then calls:
add_mapping -> get_aux_entry -> add_sub_table -> add_buffer ->
intel_aux_map_buffer_alloc -> iris_bo_alloc
2. iris_bo_alloc tries to allocate a BO from the cache, doing:
alloc_bo_from_cache -> intel_aux_map_unmap_range ->
intel_aux_unmap_range
...which then tries to take the intel_aux_map_context::mutex lock.
But it is already locked.
One solution would be to rework the aux map handling code to allocate
BOs without holding its lock, but that looks to be painful. Another
is to make the lock recursive, but we try and avoid that. A third
option wuold be to add a BO_ALLOC flag that makes alloc_bo_from_cache
skip any buffers with aux_map_address != 0 so we don't have to unmap,
making the less cache effective but fixing the recursive lock.
A fourth option is to simply bypass the BO cache altogether for the
buffers that hold the aux map itself. Allocating new BOs for the aux
tables should be relatively rare, so there's probably not a lot of
benefit in using the BO cache.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5191
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12420 >
2021-08-23 13:28:22 -07:00
Yiwei Zhang
e9be86adda
venus: scrub ignored fields of pipeline info when rasterization is disable
...
v2: use vk_alloc instead of vk_zalloc because of full memcpy
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com > (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12499 >
2021-08-23 20:00:58 +00:00
Yiwei Zhang
b816167312
venus: fix all missing vn_object_base_fini
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12498 >
2021-08-23 18:51:38 +00:00
Matt Turner
c600494a8e
tu: Enable VK_KHR_uniform_buffer_standard_layout
...
This extension relaxes the alignment requirements to allow the GL std430
layout to be used. freedreno/ir3 already supports this (via
PIPE_CAP_LOAD_CONSTBUF).
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12495 >
2021-08-23 18:30:22 +00:00
Samuel Pitoiset
07cd30ca29
nir/opt_algebraic: optimize fmax(-fmin(b, a), b) -> fmax(b, -a)
...
Found with Cyberpunk 2077.
fossils-db (GFX10.3):
Totals from 128 (2.34% of 5465) affected shaders:
CodeSize: 769720 -> 767656 (-0.27%); split: -0.27%, +0.00%
Instrs: 145748 -> 145229 (-0.36%)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11604 >
2021-08-23 17:53:38 +00:00
Dave Airlie
0cddfba328
vulkan/wsi/sw: wait for image fence before submitting to queue
...
With hw devices, when you submit a present, implicit sync will
make sure the work submitted to the gpu on the client will end
up happening before the present work submitted on the server.
However with sw paths there is no real GPU, the lavapipe fake
GPU thread is client side only and presenting is done directly
from the pixmap (or later shared pixmap). In order for this to
make sense the wsi common code should wait for the fence on the
image before queueing the submit to the server so that all
client works has been flushed to the pixmap before the copy or
present operation is submitted.
Fixes: 8004fa9c95 ("vulkan/wsi: add sw support. (v2)")
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12502 >
2021-08-24 03:30:17 +10:00
Rhys Perry
b23a9dd1f6
aco/scheduler: allow moving down VMEM stores to below VMEM loads
...
fossil-db (Vega10):
Totals from 93 (0.06% of 150305) affected shaders:
SGPRs: 4832 -> 4768 (-1.32%)
VGPRs: 4084 -> 4144 (+1.47%)
CodeSize: 316080 -> 317208 (+0.36%); split: -0.11%, +0.47%
MaxWaves: 589 -> 580 (-1.53%)
Instrs: 60229 -> 60511 (+0.47%); split: -0.15%, +0.61%
Latency: 636477 -> 540029 (-15.15%); split: -15.26%, +0.10%
InvThroughput: 293027 -> 283043 (-3.41%); split: -4.21%, +0.80%
VClause: 2557 -> 2716 (+6.22%); split: -0.35%, +6.57%
SClause: 1381 -> 1395 (+1.01%); split: -0.14%, +1.16%
Copies: 9424 -> 9728 (+3.23%); split: -0.74%, +3.97%
fossil-db (Sienna Cichlid):
Totals from 88 (0.06% of 150170) affected shaders:
VGPRs: 3840 -> 3872 (+0.83%)
CodeSize: 300544 -> 300960 (+0.14%); split: -0.09%, +0.23%
Instrs: 53714 -> 53871 (+0.29%); split: -0.05%, +0.35%
Latency: 489854 -> 462001 (-5.69%); split: -6.30%, +0.61%
InvThroughput: 100307 -> 95142 (-5.15%); split: -5.50%, +0.35%
VClause: 2322 -> 2564 (+10.42%); split: -0.39%, +10.81%
SClause: 1345 -> 1358 (+0.97%); split: -0.15%, +1.12%
Copies: 4113 -> 4351 (+5.79%); split: -0.66%, +6.44%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12211 >
2021-08-23 16:48:31 +00:00
Erik Faye-Lund
eb60d8c7b9
llvmpipe: use preferred attribute interpolation for wide lines
...
When rasterizing legacy-lines, OpenGL defines the width as being an
extrusion along the minor axis, repeating varyings. While the spec
*does* allow for an alternative method that matches our current results,
the OpenGL ES CTS doesn't allow these results even if OpenGL ES has the
same wording of an alternative method.
This is technically speaking a bug in the OpenGL ES CTS, but it seems
like nobody else is using the alternative formulation, at least not
while passing the OpenGL ES CTS. On top of this, the OpenGL specification
explicitly lists the extrusion results as the preferred method.
So it seems like a good idea for us to do this the way the OpenGL
specification prefers regardless; it's going to give less surprising
results to applications, and it's helping us pass some tests.
This math to set these up would "trivially" be:
dx = (dx * dx + dy * dy) / dx
dy = 0
and:
dy = (dx * dx + dy * dy) / dy
dx = 0
...but since we've already calculated dxdy, we can reformulate this to
save a division.
This fixes the following dEQP test-cases:
- dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide
- dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide
- dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide
- dEQP-GLES2.functional.rasterization.interpolation.projected.line_loop_wide
- dEQP-GLES2.functional.rasterization.interpolation.projected.line_strip_wide
- dEQP-GLES2.functional.rasterization.interpolation.projected.lines_wide
- dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.interpolation.lines_wide
- dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.lines_wide
- dEQP-GLES3.functional.rasterization.interpolation.basic.line_loop_wide
- dEQP-GLES3.functional.rasterization.interpolation.basic.line_strip_wide
- dEQP-GLES3.functional.rasterization.interpolation.basic.lines_wide
- dEQP-GLES3.functional.rasterization.interpolation.projected.line_loop_wide
- dEQP-GLES3.functional.rasterization.interpolation.projected.line_strip_wide
- dEQP-GLES3.functional.rasterization.interpolation.projected.lines_wide
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11315 >
2021-08-23 15:43:48 +00:00
Rhys Perry
2201f5a58c
aco: remove label_extract if the extract is used by a non-VALU
...
If an extract is used by a non-VALU instruction, it can't be applied to
all instructions, so it's not beneficial to try to apply it.
This check isn't needed because can_apply_extract()/can_use_SDWA() should
already handle non-VALU instructions.
fossil-db (Sienna Cichlid):
Totals from 1020 (0.68% of 150170) affected shaders:
SpillSGPRs: 1577 -> 1571 (-0.38%)
CodeSize: 7863668 -> 7858336 (-0.07%); split: -0.07%, +0.00%
Instrs: 1431583 -> 1431083 (-0.03%); split: -0.04%, +0.01%
Latency: 25891250 -> 25890916 (-0.00%); split: -0.01%, +0.01%
InvThroughput: 7248683 -> 7248655 (-0.00%); split: -0.01%, +0.01%
SClause: 49072 -> 49071 (-0.00%)
Copies: 126649 -> 126580 (-0.05%); split: -0.11%, +0.06%
Branches: 39129 -> 39120 (-0.02%); split: -0.03%, +0.01%
PreSGPRs: 53071 -> 52943 (-0.24%); split: -0.26%, +0.02%
PreVGPRs: 57437 -> 57435 (-0.00%); split: -0.01%, +0.01%
fossil-db (Polaris10):
Totals from 654 (0.43% of 151696) affected shaders:
CodeSize: 5814552 -> 5811568 (-0.05%); split: -0.05%, +0.00%
Instrs: 1105783 -> 1105049 (-0.07%); split: -0.07%, +0.00%
Latency: 20261458 -> 20259744 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 9011785 -> 9011749 (-0.00%); split: -0.00%, +0.00%
Copies: 104693 -> 103904 (-0.75%); split: -0.76%, +0.00%
PreSGPRs: 36105 -> 36095 (-0.03%); split: -0.03%, +0.01%
PreVGPRs: 43813 -> 43809 (-0.01%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12212 >
2021-08-23 14:56:37 +01:00
Samuel Pitoiset
e0353296da
radv: allocate shaders to 32-bit address to skip PGM_HI
...
This reduces the number of emitted registers.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12466 >
2021-08-23 11:28:21 +00:00
Samuel Pitoiset
2dc90ca8a4
radv: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x
...
Seems it make the perf worse.
Ported from RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12466 >
2021-08-23 11:28:21 +00:00
Daniel Schürmann
77ffdf41b1
aco: add more validation rules for SDWA operands
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Daniel Schürmann
077776a866
aco/opcodes: remove definition_size[]
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Daniel Schürmann
f6b281a1c2
aco/validate: simplify get_subdword_bytes_written()
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Daniel Schürmann
ec1bbfa608
aco/ra: refactor subdword operand stride
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Daniel Schürmann
c75138ed64
aco/ra: refactor subdword definition info
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Daniel Schürmann
e11b23f7cd
aco: add instr_is_16bit() helper function
...
to indicate whether some instruction writes partial registers, only.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Daniel Schürmann
3d6ca41e44
aco: use VOPC_SDWA on GFX9+
...
Totals from 5138 (3.42% of 150170) affected shaders: (GFX10.3)
VGPRs: 409520 -> 409416 (-0.03%); split: -0.03%, +0.00%
CodeSize: 43056360 -> 43035696 (-0.05%); split: -0.06%, +0.02%
MaxWaves: 69296 -> 69310 (+0.02%)
Instrs: 8161016 -> 8153365 (-0.09%); split: -0.10%, +0.01%
Latency: 109397002 -> 109756208 (+0.33%); split: -0.05%, +0.38%
InvThroughput: 23238920 -> 23310761 (+0.31%); split: -0.11%, +0.42%
VClause: 135141 -> 135100 (-0.03%); split: -0.05%, +0.02%
SClause: 349511 -> 349489 (-0.01%); split: -0.01%, +0.00%
Copies: 388107 -> 387754 (-0.09%); split: -0.48%, +0.38%
Branches: 184629 -> 184503 (-0.07%); split: -0.08%, +0.01%
PreSGPRs: 258807 -> 258839 (+0.01%)
PreVGPRs: 372561 -> 372184 (-0.10%); split: -0.10%, +0.00%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Daniel Schürmann
60e171af06
aco/print_ir: fix printing of VOPC_SDWA definitions
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364 >
2021-08-23 10:31:40 +00:00
Rhys Perry
8852c5448d
aco: fix vectorized 16-bit load_input/load_interpolated_input
...
Seems we haven't encountered this before because
nir_lower_io_to_scalar_early usually scalarizes this.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12486 >
2021-08-23 10:11:36 +00:00
Samuel Pitoiset
e4e2d45cc6
radv: remove useless DISABLE_{ZMASK,SMEM}_EXPCLEAR_OPTIMIZATION state
...
This has no effect without enabling EXPCLEAR.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12326 >
2021-08-23 09:52:51 +02:00
Samuel Pitoiset
98d10eed48
radv: remove unused fast depth-stencil gfx clear path with expclear
...
This has never been used because it requires to know the previous
clear values which is not really possible in Vulkan.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12326 >
2021-08-23 09:52:48 +02:00
Michel Zou
8bb9e9e76f
lavapipe: fix missing VKAPI_CALL attribute
...
Fixes build on mingw
Fixes: c198adf7
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12484 >
2021-08-21 16:46:43 +02:00
Ian Romanick
2b4b31044d
util/xmlconfig: Test values set via the environment
...
driconf options can also be set via environment variables. This is a
simple touch-test of that feature.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12477 >
2021-08-21 00:53:18 +00:00
Ian Romanick
1a6d1e9309
util/xmlconfig: Make unit tests more resilient against user env settings
...
Before this, setting 'vblank_mode=0' in the environment would cause a
unit test to fail.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12477 >
2021-08-21 00:53:18 +00:00
Marek Olšák
8f935317e6
frontend/dri: add environment variable DRI_NO_MSAA for performance comparisons
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12491 >
2021-08-21 00:30:59 +00:00
Marek Olšák
aad7a1d79a
radeonsi: remove vertices_per_patch parameter from draw-related functions
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12351 >
2021-08-21 00:08:11 +00:00
Marek Olšák
10a46226b1
gallium: remove vertices_per_patch, add pipe_context::set_patch_vertices
...
We would like draw-only display lists to have immutable draw info and
this is the only GL non-draw state in pipe_draw_info (not counting
view_mask).
It also allows removing some code from draw_vbo for tessellation.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12351 >
2021-08-21 00:08:11 +00:00
Connor Abbott
6d76112624
tu: Remove some stale bypass xfails
...
These were fixed by 09e0b29bb6 which was
missed during the suite conversion. For the remaining still-valid fail,
there is a CTS patch in progress.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12488 >
2021-08-20 22:28:56 +00:00
Rob Clark
d889f5f282
freedreno/crashdec: Quiet spammy print in query mode
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12489 >
2021-08-20 22:01:49 +00:00
Rob Clark
dbea4bb970
freedreno/crashdec: Decode full RB in verbose mode
...
This is useful to get a better view of previous commands in the
ringbuffer.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12489 >
2021-08-20 22:01:49 +00:00
Rob Clark
ed8d3095ab
freedreno/cffdec: Fix gpuaddr comparision
...
gpuaddrs are 64b, and they can be more than 2^^32 apart.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12489 >
2021-08-20 22:01:49 +00:00
Rob Clark
32f13cb9bc
freedreno/cffdec: Fix indentation
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12489 >
2021-08-20 22:01:49 +00:00
Icecream95
295807e666
pan/bi: Extend bi_add_nop_for_atest for tilebuffer loads
...
Fixes framebuffer_fetch and blend_equation_advanced dEQP tests on v6.
v2: Use clause dependencies rather than comparing the message type
v3: Shift the BIFROST_SLOT_* constants before using them as a mask
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12375 >
2021-08-20 21:38:01 +00:00
Matt Turner
e0bc11d9d2
tu: Free device->bo_idx and device->bo_list on init failure
...
Two related changes:
- in tu_device.c:tu_CreateDevice we need to free both pointers in the
teardown path after tu_bo_finish(global_bo), which uses the pointers.
They are allocated in the first call to tu_bo_init(), which happens
when global_bo is allocated.
- in tu_drm.c:tu_bo_init we need to free bo_list if the bo_idx
allocation fails. Convert to the goto teardown pattern as well.
Fixes the following dEQP-VK tests:
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail
dEQP-VK.api.object_management.alloc_callback_fail.device
dEQP-VK.api.object_management.alloc_callback_fail.device_group
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12481 >
2021-08-20 20:30:14 +00:00
Alyssa Rosenzweig
61c8e39649
pan/bi: Use CLPER_V6 on Mali G31
...
Apparently, CLPER_V7 is missing from Mali G31, but CLPER_V6 works. Fixes
INSTR_INVALID_ENC faults and failures in
dEQP-GLES3.functional.shaders.derivate.* on Dvalin.
Technically not an errata but an implementation difference. I suspect
Mali G51 will need this as well, should we ever allowlist it.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
bfd3ae35c9
pan/bi: Use ST_TILE for multisampled blend output
...
ST_TILE lets us specify an explicit sample, whereas BLEND replicates to
all samples. This fully fixes the interaction between blend shaders and
multisampling on Bifrost, manifesting as
dEQP-GLES3.functional.fragment_ops.random.* failures with the
configuration rgba8888d24s8ms4.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
4a51366144
panfrost: Evaluate blend shaders per-sample
...
This varies the sample ID value, which will be used in the next commit.
This is less complicated than keying blend shaders to the content of
this flag and trying to make mega blend shaders covering all samples at
once ... complexity I'd rather not think about right now. The DDK does
it this way.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
16394dc71a
pan/bi: Set the sample ID for blend shader LD_TILE
...
Use the explicit sample mode and set the sample ID in the pixel indices
structure to the current sample ID. This fixes tilebuffer loads in blend
shaders on multisampled framebuffers.
Make sure the new routine is broken out to a helper for use with ST_TILE
in the next commit.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
9f19a883bc
pan/bi: Extract load_sample_id to a helper
...
Will be reused in the next commit.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
5c2a4eb1c2
pan/bi: Correct the sr_count on +ST_TILE
...
Otherwise we'll get validator fails when emitting +ST_TILE.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
710498e424
pan/bi: Don't set td in blend shaders
...
This breaks screen-space derivatives in a shader that uses multiple
render targets, if the derivative calculation is scheduled after a BLEND
instruction calling into a blend shader.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
0a26ec78b1
pan/bi: Set eldest_colour dependency for ST_TILE
...
I don't think we'll ever hit this in practice, since it's not needed for
blend shaders, but better to correct the code anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Alyssa Rosenzweig
a7f7d74137
panfrost: Disable shader-assisted indirect draws
...
Although it is passing all of dEQP-GLES31, it is failing a few
KHR-GLES31.* tests. It also has performance issues at the moment. Invert
the existing noindirect debug flag to become a indirect debug flag. Set
this flag for dEQP-GLES31 CI on G52, to make sure the code doesn't bit
rot on the hope someone will pick this up later on.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478 >
2021-08-20 20:13:27 +00:00
Leandro Ribeiro
8107f67171
vulkan/wsi/wayland: memset members of image to zero
...
struct wsi_wl_image is only used as member of the swapchain, and during
the swapchain creation the image is already initialized to zero. So we
have no problems with members of the image being used uninitialized.
But for consistency, memset the members of this struct to zero in
wsi_wl_image_init(). This can help to avoid problems in the future.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12451 >
2021-08-20 18:51:36 +00:00
Leandro Ribeiro
4cd187e71e
vulkan/wsi/wayland: create swapchain using vk_zalloc()
...
In wsi_wl_surface_create_swapchain() we have a piece of code to init
some members of the chain to 0, in order to allow us to call
wsi_wl_swapchain_destroy() for cleanup.
Instead, we can use vk_zalloc() to allocate the chain, as it initializes
all members of the struct to zero. This help us to avoid problems when
people add new members to the struct and forget to initialize them.
Also, it makes the code look better.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12451 >
2021-08-20 18:51:36 +00:00
Emma Anholt
03e457bb1a
ci/lavapipe: Add a fractional run with ASan
...
This catches use-after-frees and buffer overflows, but not leaks (which we
disable the checking for since the library gets dlclose()d and we end up
with useless backtraces).
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8889 >
2021-08-20 18:22:30 +00:00
Connor Abbott
47996b951e
tu: Add a650-specific CCU flush workaround
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12475 >
2021-08-20 18:03:26 +00:00
Connor Abbott
abf0ae014a
tu: Properly handle waiting on an earlier pipeline stage
...
I never really implemented this properly, because I wasn't aware of the
clusters when doing the original pipeline barrier implementation. It
turns out that the Vulkan stages we get as part of the barriers are
actually good for something, because it turns out that the pipeline
state is split into stages, so earlier stages can run ahead of later
stages and sometimes we need to wait when an earlier stage depends on
the result of a later stage. This happens most often whenever a shader
reads the result of a color/depth attachment write, because attachment
writes happen in a logically later stage. However this could also happen
for a FS -> VS dependency.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12475 >
2021-08-20 18:03:26 +00:00
Nanley Chery
4003f2d48d
anv: Optimize genX(cmd_buffer_emit_gfx12_depth_wa)
...
Only emit the workaround as needed.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
ab4d411387
iris: Optimize genX(emit_depth_state_workarounds)
...
Only emit the workaround as needed.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
e86fb61106
iris: Use constants for emitting cso_z->packets
...
This should be a bit faster and easier to follow.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
2ae70329f5
intel: Move the D16 workarounds out of ISL
...
Implement the workarounds in anv and iris instead.
Before this commit, ISL unconditionally modified workaround registers
while filling out depth stencil state. To account for this, drivers
unconditionally stalled prior to emitting depth stencil packets. This
hurt performance.
By having the drivers perform the workarounds, they can choose when to
modify the relevant registers. The drivers now avoid emitting the
workaround for NULL depth buffers. This reduces stalls and leads to
better performance.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com > (the ISL/Anv bits)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org > (the Iris bits)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
9fd3baf34b
iris: Update clear_params only when HiZ is enabled
...
This more closely matches ISL.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
de7d8e53b7
iris: Emit clear_params as part of cso_z->packets
...
This should be a bit faster.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
78376a450b
iris: Update the clear value in cso_z->packets
...
Enables emitting the packets all at once later on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
f131e8917a
iris: Add genX(emit_depth_state_workarounds)
...
This will replace the workaround built into ISL.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Nanley Chery
14b3732b84
anv: Add genX(cmd_buffer_emit_gfx12_depth_wa)
...
This will replace the workaround built into ISL.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454 >
2021-08-20 17:50:35 +00:00
Samuel Pitoiset
be6bdb0918
radv: fix copying depth+stencil images on compute
...
Using separate aspects is required.
Fixes few CTS failures (dEQP-VK.api.copy_and_blit.*) when the compute
path is forced in the driver. Note that CTS coverage of compute queue
is rather limited.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12287 >
2021-08-20 16:43:22 +00:00
Timothy Arceri
02b394023b
glsl: fix variable scope for instructions inside case statements
...
Fixes: 665d75cc5a ("glsl: Fix scoping bug in if statements.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5247
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12435 >
2021-08-20 16:13:56 +00:00
Samuel Pitoiset
067599f8bc
radv: remove incorrect comment about compressed writes to HTILE on GFX10+
...
This seems to be unsupported.
COMPRESSION_EN=1 and WRITE_COMPRESS_ENABLE=1 don't update HTILE
with image stores.
Note that there is no issue because depth/stencil images will be
decompressed for image stores, and TC-compat HTILE is disabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12450 >
2021-08-20 15:53:32 +00:00
Samuel Pitoiset
1c26751969
radv: remove unnecessary check in radv_layout_is_htile_compressed()
...
The driver doesn't enable TC-compat HTILE for storage images, so this
was actually always TRUE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12450 >
2021-08-20 15:53:32 +00:00
Marek Olšák
86fd7f5484
st/mesa: move handling CubeMapSeamless into st_convert_sampler where it belongs
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12334 >
2021-08-20 15:04:20 +00:00
Marek Olšák
feda6e9c5d
st/mesa: set take_ownership = true in set_sampler_views
...
update_textures_local is removed because the only thing it did was
unreferencing sampler views, which is being removed.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12334 >
2021-08-20 15:04:20 +00:00
Marek Olšák
bb89cf4bf3
gallium: add take_ownership into set_sampler_views to skip reference counting
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12334 >
2021-08-20 15:04:20 +00:00
Marek Olšák
556c10c02c
ac/surface: allow arbitrary swizzle modes for displayable DCC
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12430 >
2021-08-20 14:28:36 +00:00
Marek Olšák
94d261029e
radv: allow arbitrary swizzle modes for displayable DCC
...
by adding retile pipeline variants
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12430 >
2021-08-20 14:28:36 +00:00
Marek Olšák
6fc38d3b07
radeonsi: allow arbitrary swizzle modes for displayable DCC
...
by adding retile shader variants
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12430 >
2021-08-20 14:28:36 +00:00
Danylo Piliaiev
ee9f0e78c1
ir3: prohibit folding of half->full conversion into mul.s24/u24
...
mul.s24/u24 always return 32b result regardless of its sources size,
hence we cannot guarantee the high 16b of dst being zero or sign extended.
Fixes cts tests on a650:
dEQP-VK.spirv_assembly.type.scalar.i16.mul_test_high_part_zero_*
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12471 >
2021-08-20 11:46:14 +00:00
Connor Abbott
10bf0c51d4
freedreno/ci: Add spillall tests
...
Only test shader tests, because the others are unlikely to have
interesting shaders.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
0b39f4ab42
ir3, turnip, freedreno: Report stp/ldp in shader stats
...
This is important after spilling, so that we get an indication when a
change causes spilling.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
58b54157ee
ir3: Fix getting stp/ldp components in ir3_info
...
Noticed by inspection when adding stp_count/ldp_count.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
613eaac7b5
ir3: Initial support for spilling non-shared registers
...
Support for spilling shared registers to normal registers is still TODO.
There are also several improvements to be made, like rematerialization.
Note, there is one behavior change to register pressure accounting: we
now include half registers in the current full pressure directly in
mergedregs mode, rather than adding the max half pressure to the max
full pressure afterwards, which might result in lower calculated max
pressure in some cases with half registers. This is needed for spilling,
since we need to make sure the total pressure including half registers
is below the maximum at each instruction. Because the entire pass is
rewritten, including the register pressure calculating parts, it didn't
seem worth it to separate out this change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
6a5312bf86
ir3: Fix compress_regs_left accounting for half-regs
...
This was just wrong - we need to check against the entire register file,
and we need to include removed full regs even if the register we're
trying to insert is a half-reg, or else we could run out of space when
reinserting full regs after it. There does need to be an additional
check so that we don't try to insert a half-reg beyond the half-reg
limit, but that has to happen in addition to the normal check.
This fixes KHR-GLES31.core.arrays_of_arrays.InteractionArgumentAliasing6
once spilling is added.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
cca2e0fc14
ir3: Properly validate pcopy reg sizes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
dd4e2f507a
ir3: Fix RA debug printing
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
e8d2253bf6
ir3: Add ra_foreach_src_n/ra_foreach_dst_n
...
I found ra_foreach_src_n useful in one place in the spiller. But this
also aligns RA with the rest of the compiler and stops us from
reinventing the iterators.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
be3ab7ded4
ir3: Add loop depth to ir3_block
...
And while we're at it, fix adding loop_id for the continue block.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
7d3e5dc487
ir3/ra: Make ir3_reg_interval_remove_all() useful for spilling
...
RA uses this to pop and then reinsert intervals when shuffling around
registers. For spilling, we want to remove the interval and also mark
all its descendants as removed. Since "remove_all" sounds more like the
latter, rename the old "remove_all" to "remove_temp". "remove_all" was
already exposed in ir3_ra.h, so there's no need to add it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
efb34d6ee6
ir3/ra: Handle huge merge sets
...
It can happen that we create an enormous merge set, even larger than the
entire register file, in which case find_best_gap() would loop
infinitely. This seems to be triggered more often with
IR3_SHADER_DEBUG=spillall, since it actually happened with a CTS test.
Just bail out in that case.
Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
70c22d3894
ir3/ra: Fix available bitset for live-through collect srcs
...
When we mark live-through sources that are merged with the destination
as killed, we kept the bitsets in sync, but we forgot to keep them in
sync when unmarking them after allocating the destination. The result
was that "available" wasn't correct for any instruction afterwards. This
resulted in a bad register allocation with IR3_SHADER_DEBUG=spillall for
a dEQP-VK test.
While we're changing this, use ra_foreach_src().
Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
eae36b4850
ir3/ra: Reinitialize interval when inserting
...
Otherwise when an interval is removed and then re-inserted it could
have an invalid/corrupted parent link and child tree. I think RA
happened to never do this, but spilling will.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
4b0eba9cb1
ir3/merge_regs: Set wrmask for pcopy destinations
...
This was wrong, and with spilling we can now create vector phi's in rare
circumstances.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
f59816b815
ir3/print: Use mesa_stream_log_printf for (kill)
...
This was missed during the conversion.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
efa3600306
ir3: Print physical successors/predecessors
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
d25cf483cb
ir3: Copy-propagate single-source phis
...
These can be created when removing unreachable control flow, and it
seems easier to remove them than to add special code to handle them when
spilling.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
f40baf33e6
ir3/ra: Remove logical_unreachable
...
This reverts 394c597b1b , although I had to
manually do it due to the reformatting.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Connor Abbott
2768a35e41
ir3: Add pass to remove unreachable blocks
...
Rather than continue to add special cases for these, just clean them up.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033 >
2021-08-20 10:37:36 +00:00
Erik Faye-Lund
b74c7aae79
draw: improve numerical stability in clipper
...
Floats have much better precision close to zero than close to one, so
let's make sure we compute an interpolation factor that goes in the
direction that discards the fewest bits.
This makes a big difference when interpolating from very small to very
large values for screen-space positions.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12355 >
2021-08-20 09:26:41 +00:00
Guilherme Gallo
a51678ffce
gitlab-ci: Fix trace expectations for iris devices
...
By checking the output images against the reference ones on the failed
trace jobs, I looked for artifacts via naked eye and image diffs. No
significant change was found. So the trace produced by the failed jobs
can be considered valid.
Updated devices' traces:
* Intel Comet Lake: iris-cml-traces
* Intel Gemini Lake: iris-glk-traces
* Intel Kaby Lake: iris-kbl-traces
* Intel Whiskey Lake: iris-whl-traces
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12394 >
2021-08-20 09:11:01 +00:00
Guilherme Gallo
edee0da880
gitlab-ci: enable testing on Intel Comet Lake (experimental)
...
* Integrate sarien Chromebook devices from Collabora lab
* Based on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11162
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12394 >
2021-08-20 09:11:01 +00:00
Guilherme Gallo
e2d7309973
gitlab-ci: enable testing on Intel Whiskey Lake (experimental)
...
* Integrate sarien Chromebook devices from Collabora lab
* Based on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11162
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12394 >
2021-08-20 09:11:01 +00:00
Ilia Mirkin
7fbb773c0d
mesa: rgb10_a2 is never color-renderable in gles2
...
Fixes
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb10_a2 on
GLES2 drivers which support RGB10_A2 textures.
GL_OES_required_internalformat does not make it a color-renderable
format.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4972
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12464 >
2021-08-19 21:20:07 -04:00
Emma Anholt
e6776148c1
freedreno/a6xx: Sync TFB BO access against prior TFB writes.
...
CTS draw_indirect usage of TFB output was flaking due to the TFB writes
possibly not having completed. Since GL TFB doesn't require any other
barrier between TFB and use of the BO (as seen by the CTS not emitting any
memory barrier), we have to do it ourselves.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12457 >
2021-08-19 23:27:15 +00:00
Emma Anholt
83e9a7fbcf
freedreno/ir3: Align driver param upload size/offset for indirect uploads.
...
For indirect draws, we have to upload some of the params as indirect
references, which have a more strict size requirement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12455 >
2021-08-19 14:43:06 -07:00
Emma Anholt
5d192c2036
freedreno/ir3: Apply the a6xx samgq workaround to TES/TCS/GS as well.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12454 >
2021-08-19 21:21:45 +00:00
Jason Ekstrand
a6a449837b
anv: Set CONTEXT_PARAM_RECOVERABLE to false
...
We want the kernel to ban our context immediately instead of foolhardily
attempting to recover.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12476 >
2021-08-19 19:37:03 +00:00
Rhys Perry
4a7714ab7b
aco/tests: add tests for post-RA DPP combining
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
12be7c8feb
aco/tests: add tests for pre-RA DPP combining
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
4ac47ad1cd
aco: combine DPP into VALU after RA
...
Mostly helps a bunch of Cyberpunk 2077 shaders.
fossil-db (Siena Cichlid):
Totals from 26 (0.02% of 150170) affected shaders:
CodeSize: 83208 -> 81528 (-2.02%)
Instrs: 14728 -> 14308 (-2.85%)
Latency: 48041 -> 47793 (-0.52%)
InvThroughput: 10836 -> 10578 (-2.38%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
2e6834d4f6
aco: combine DPP into VALU before RA
...
Mostly helps a bunch of Cyberpunk 2077 shaders. Catches some of the cases
that the post-RA can't optimize because of register assignment.
fossil-db (Siena Cichlid):
Totals from 25 (0.02% of 150170) affected shaders:
CodeSize: 78808 -> 75764 (-3.86%)
Instrs: 14311 -> 13547 (-5.34%)
Latency: 278697 -> 277885 (-0.29%)
InvThroughput: 63428 -> 62754 (-1.06%)
Copies: 1348 -> 1349 (+0.07%); split: -0.07%, +0.15%
PreVGPRs: 1035 -> 1011 (-2.32%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
b97cfd72af
aco: handle DPP in the optimizer
...
There are a bunch of optimizations that are broken when DPP is involved.
fossil-db (Sienna Cichlid):
Totals from 100 (0.07% of 150170) affected shaders:
CodeSize: 325204 -> 325192 (-0.00%); split: -0.06%, +0.05%
Instrs: 62773 -> 62664 (-0.17%); split: -0.18%, +0.00%
Latency: 295348 -> 295266 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 73990 -> 73946 (-0.06%); split: -0.06%, +0.01%
Copies: 1650 -> 1609 (-2.48%); split: -2.55%, +0.06%
PreSGPRs: 3554 -> 3520 (-0.96%)
Fossil-db changes are probably because v_sub_f32_dpp(v_mul_f32) is no
longer being combined into MAD and then split back into separate
instructions.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
2e56e23420
aco: make optimize_postRA() work across blocks
...
fossil-db (Sienna Cichlid):
Totals from 46 (0.03% of 150170) affected shaders:
CodeSize: 103672 -> 103488 (-0.18%)
Instrs: 21968 -> 21922 (-0.21%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
1d894a8c85
aco: move a bunch of helpers into aco_ir.h/aco_ir.cpp
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
3db3196379
aco: add can_use_DPP() and convert_to_DPP()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Rhys Perry
a9562fd0d6
aco: fix validation of DPP v_cndmask_b32/v_addc_co_u32
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11924 >
2021-08-19 18:17:33 +00:00
Emma Anholt
6494b08407
i915g: clang-format fixup.
...
I really need to get clang-format into CI so I can stop doing fixups.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12436 >
2021-08-19 17:28:14 +00:00
Emma Anholt
c38cb5d4d8
i915g: Add comments explaining various xfails.
...
I haven't gone through every test (particularly ones I think are loop
unrolling or instruction-count-related ones I think), but this gives a
better picture of what's going on in this driver.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12436 >
2021-08-19 17:28:14 +00:00
Emma Anholt
ab2645b54c
i915g: Clear some xfails that are now skips.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12436 >
2021-08-19 17:28:14 +00:00
Emma Anholt
e00a749759
i915g: Reduce ARB_fp max tex indirections to match i915c.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12436 >
2021-08-19 17:28:14 +00:00
Emma Anholt
8ebd0f8317
i915g: Correct PIPE_SHADER_CAP_MAX_TEMPS.
...
This is the value that i915c reported, too, and is required for ARB_fp.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12436 >
2021-08-19 17:28:14 +00:00
Emma Anholt
da3f20a3ab
i915g: Fix polygon offset by telling draw the Z format.
...
This is what initializes the MRD for draw's polygon offset calculations.
Closes : #4976
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12436 >
2021-08-19 17:28:14 +00:00
Boyuan Zhang
8e5e70bb3d
frontends/va: add num_temporal_layers check
...
Fixes: 51935d59
temporal_id check is valid only if the num_temporal_layers is set (>0).
When num_temporal_layers is 0, we shouldn't check temporal_id and return
error.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Thong Thai <thong.thai@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12463 >
2021-08-19 14:25:09 +00:00
Boyuan Zhang
4081516b3e
radeon/vcn: set min value for num_temporal_layers
...
Fixes: 51935d59
In the case where num_temporal_layers is not set (0), set it using the
minimum value 1, otherwise the rate control settings will be missing.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Thong Thai <thong.thai@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12463 >
2021-08-19 14:25:09 +00:00
Daniel Schürmann
59f2c85845
nir: return false for loops in contains_other_jump()
...
Allows to unwrap more loops.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12473 >
2021-08-19 13:51:17 +00:00
Simon Ser
8de086e12f
v3d: implement resource_get_param
...
Prior to this commit, the stride, offset and modifier were fetched
via WINSYS_HANDLE_TYPE_KMS. However we can't make such a query
succeed if the buffer couldn't be imported to the KMS device.
Instead, implement the resource_get_param hook to allow users to
fetch this information without WINSYS_HANDLE_TYPE_KMS.
A tiny helper function is introduced to compute the modifier of a
resource.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 7bcb223639 ("v3d, vc4: Fix dmabuf import for non-scanout buffers")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12370 >
2021-08-19 13:12:51 +00:00
Simon Ser
b1fbceac6f
vc4: implement resource_get_param
...
Prior to this commit, the stride, offset and modifier were fetched
via WINSYS_HANDLE_TYPE_KMS. However we can't make such a query
succeed if the buffer couldn't be imported to the KMS device.
Instead, implement the resource_get_param hook to allow users to
fetch this information without WINSYS_HANDLE_TYPE_KMS.
A tiny helper function is introduced to compute the modifier of a
resource.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 7bcb223639 ("v3d, vc4: Fix dmabuf import for non-scanout buffers")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12370 >
2021-08-19 13:12:51 +00:00
Simon Ser
99fc6f7271
panfrost: implement resource_get_param
...
Prior to this commit, the stride, offset and modifier were fetched
via WINSYS_HANDLE_TYPE_KMS. However we can't make such a query
succeed if the buffer couldn't be imported to the KMS device.
Instead, implement the resource_get_param hook to allow users to
fetch this information without WINSYS_HANDLE_TYPE_KMS.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 4c092947df ("panfrost: fail in get_handle(TYPE_KMS) without a scanout resource")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12370 >
2021-08-19 13:12:51 +00:00
Simon Ser
b5919b0b10
etnaviv: add stride, offset and modifier to resource_get_param
...
Prior to this commit, the stride, offset and modifier were fetched
via WINSYS_HANDLE_TYPE_KMS. However we can't make such a query
succeed if the buffer couldn't be imported to the KMS device.
Instead, extend the resource_get_param hook to allow users to fetch
this information without WINSYS_HANDLE_TYPE_KMS.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 9da901d2b2 ("etnaviv: fail in get_handle(TYPE_KMS) without a scanout resource")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12370 >
2021-08-19 13:12:51 +00:00
Erik Faye-Lund
63529782d3
gallium/nir/tgsi: initialize file_max for inputs
...
When this was rewritten to support Vulkan, we stopped initializing
file_max to -1 in the case of no inputs. This causes the draw module
to go down a needlessly pessimistic case, printing an error while we're
at it.
Fixes: 42b5cfdbd2 ("gallivm/nir: fix vulkan vertex inputs")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12440 >
2021-08-19 10:51:01 +00:00
Erik Faye-Lund
4674698008
gallium/nir/tgsi: fixup indentation
...
This was using mixed tabs and spaces, let's fix that before we start
modifying the code.
Fixes: 42b5cfdbd2 ("gallivm/nir: fix vulkan vertex inputs")
Reviewed-by: default avatarDave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12440 >
2021-08-19 10:51:01 +00:00
Danylo Piliaiev
bb4db22ff4
turnip: apply workaround for depth bounds test without depth test
...
On some GPUs when:
- depth bounds test is enabled
- depth test is disabled
- depth attachment uses UBWC in sysmem mode
GPU hangs. As a workaround we should enable z test. That's what blob
is doing for a630. And since we enable z test we should make it always pass.
Blob doesn't emit this workaround on a650 and a660. Untested on a640.
Fixes:
dEQP-VK.pipeline.extended_dynamic_state.two_draws_static.depth_bounds_test_disable
dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.depth_bounds_test_disable
dEQP-VK.dynamic_state.ds_state.depth_bounds_1
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12407 >
2021-08-19 10:25:58 +00:00
Danylo Piliaiev
7faee1430a
freedreno: rename Z_TEST_ENABLE->Z_READ_ENABLE, Z_ENABLE->Z_TEST_ENABLE
...
This makes their interaction with Z_BOUNDS_ENABLE more understandable.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12407 >
2021-08-19 10:25:58 +00:00
Erik Faye-Lund
d37aa08f61
draw: fix stippling of fractional lines
...
The OpenGL 4.6 specification, section 14.5.2.1 (Line Stipple) says:
> The masking is achieved using three parameters: the 16-bit line
> stipple p, the line repeat count r, and an integer stipple counter s.
This is pretty clear that the stipple counter shouldn't carry fractional
parts. But we also don't really do anything useful with the fractional
part anyway, apart from skewing the third or later line-segments
Properly carrying over the fractional parts as the Vulkan specification
allows for rectangular lines is trickier than this and would require us
to use a shorter output-line at the start of the following
line-segments.
But let's just do what the OpenGL specification describes, and the
Vulkan specification allows for now.
This, combined with the following patch for the vulkan CTS makes the
last two rasterization-tests pass for me:
https://github.com/KhronosGroup/VK-GL-CTS/pull/279
Fixes the "spec/!opengl 1.1/linestipple/line strip" piglit-test.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12327 >
2021-08-19 09:44:16 +00:00
Marcin Ślusarz
a3d400a016
turnip: use nir_shader_instructions_pass in tu_lower_io
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12467 >
2021-08-19 08:15:41 +00:00
Marcin Ślusarz
8892d276d2
r600: preserve all metadata when passes don't make progress
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12467 >
2021-08-19 08:15:41 +00:00
Marcin Ślusarz
956d6461ef
r600: use nir_shader_instructions_pass in r600_nir_lower_atomics
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12467 >
2021-08-19 08:15:41 +00:00
Marcin Ślusarz
e2917ef9ef
freedreno/ir3: use nir_metadata_none instead of its value
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12467 >
2021-08-19 08:15:41 +00:00
Samuel Pitoiset
ab35a63dea
radv: do not allocate the FCE predicate for images that use comp-to-single
...
Images that support comp-to-single don't have to be fast-cleared at
all, so the predicate is unnecessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12323 >
2021-08-19 07:50:50 +00:00
Samuel Pitoiset
ef546cf96f
radv: remove useless check about the FCE predicate offset
...
radv_update_fce_metadata() already prevents that.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12323 >
2021-08-19 07:50:50 +00:00
Samuel Pitoiset
dc58b0112f
radv: determine if an image support comp-to-single at creation time
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12323 >
2021-08-19 07:50:49 +00:00
Juan A. Suarez Romero
c65e2eed32
broadcom/ci: use deqp-runner suites for gles
...
Glue together all the GLES related jobs using the suites feature.
This allow us to reduce the total number of devices required, moving
some of them to help in other jobs, and the remaining free for other
pipelines in parallel.
Reviewed-by: Emma Anholt <emma@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12453 >
2021-08-19 07:31:07 +00:00
Marcin Ślusarz
e3b4c77ed3
glsl: refactor code to avoid static analyzer noise
...
Clang analyzer thinks struct_base_offset can be used uninitialized
because it doesn't know that glsl_type_is_struct_or_ifc returns
the same value for the same type.
Refactor the code to make it clear what is going on. As a side effect
this should be faster because glsl_get_length and
glsl_type_is_struct_or_ifc will be called only once (they are not
inline functions).
This is an alternative approach to
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12399 .
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12403 >
2021-08-19 06:59:01 +00:00
Qiang Yu
e6790d4a31
nir/inline_uniforms: support loop
...
Be able to inline uniforms in loop for unrolling it.
Nested loop/if is also supported.
Some example:
for (i = 0; i < count; i++)
...
uniform "count" will be inlined. But note this does not
make sure the loop will be unrolled (ie. count = 1000).
for (i = 0; i < count; i++)
for (j = init; j < 10; j++)
if (type == 2)
...
uniform "count", "init" and "type" will be inlined.
It is intentional to not be too aggressive to add uniforms
to avoid false positive case while be able to support most
common usage.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11950 >
2021-08-19 02:17:35 +00:00
Qiang Yu
3c93ebbae5
nir/loop_analyze: skip unsupported induction variable early
...
Instead of fail in trip count calculation, just don't mark such
kind of variable as induction from the beginning.
Don't bother inline uniform to deal with such kind of variable
either.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11950 >
2021-08-19 02:17:35 +00:00
Qiang Yu
0b9639c35d
nir/loop_analyze: record induction variables for each loop
...
For being used by uniform inline lowering pass.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11950 >
2021-08-19 02:17:35 +00:00
Qiang Yu
c86ec09d11
nir/loop_analyze: move nir_is_supported_terminator_condition() to header
...
To be shared with uniform inline.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11950 >
2021-08-19 02:17:35 +00:00
Qiang Yu
a406fff78a
nir/inline_uniforms: support vector uniform
...
Collect per vector component dependency and lower vector uniform
load to scalar if any component need to be inlined.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11950 >
2021-08-19 02:17:35 +00:00
Qiang Yu
9d796b21ac
nir/inline_uniforms: add uniforms in condition atomically
...
Unless all uniforms in the condition can be inlined we can
lower the if/loop. So we rollback added uniforms when one
of uniforms in a if condition fail to be added.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11950 >
2021-08-19 02:17:35 +00:00
Ilia Mirkin
bce19b3a77
mesa: don't return errors for gl_* GetFragData* queries
...
There is nothing in the spec about this. BindFragDataLocation* is
supposed to return an error, but not Get.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5221
Fixes: 59012c3133 ("mesa: Implement glGetFragDataLocation")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12333 >
2021-08-19 01:52:46 +00:00
Alyssa Rosenzweig
07cc5fd893
panfrost: Add unit tests for non-dithered clears
...
Would have exposed the bug fixed in the previous commit. This is gnarly
stuff, let's not regress it.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12460 >
2021-08-18 23:32:40 +00:00
Alyssa Rosenzweig
22538b89b3
panfrost: Handle non-dithered clear colours
...
In b9c095cc2c ("panfrost: Rewrite the clear colour packing code"),
packing of clear colours was corrected to use the tilebuffer's
fractional bits, fixing dithering of the clear colour with formats like
RGB565. Unfortunately, that commit did so unconditionally. If the
framebuffer is dithered, but dithering is disabled at the time of
the clear, we would incorrectly dither the clear.
This is a regression, as the old (broken) code passed the relevant CTS
test. What's the catch? Depending on dither state, there are two
formulas to pack tilebuffer colours. We need to handle both. Fixes
KHR-GLES31.core.draw_buffers_indexed.color_masks.
Fixes: b9c095cc2c ("panfrost: Rewrite the clear colour packing code")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12460 >
2021-08-18 23:32:40 +00:00
Alyssa Rosenzweig
1b710d4a96
panfrost: Add dither state to the clear colour tests
...
There is a dependence on dithering state about which I was previously
unaware. All these test cases were with dithering enabled, so mark that
down.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12460 >
2021-08-18 23:32:40 +00:00
Alejandro Piñeiro
a4cb756e4d
broadcom/qpu: use and expand version info at opcode description
...
Right now opcode_desc struct, used to define data for all the
operations to pack/unpack, include a version field. In theory that
could be used to check if we are retrieving a opcode valid for our hw
version, or to get the correct opcode if a given one changed across hw
versions, or just the same if it didn't change.
In practice that field was not used. So for example, if by mistake we
asked for an opcode defined at version 41, while being on version 33
hardware, we would still get that opcode description.
This commit fixes that, and as we are here we expand the functionality
to allow to define version ranges, just in case a given opcode number
and their description is only valid for a given range.
v2 (from Iago feedback):
* Fixed some comment typos
* Simplified filtering opcode method
* Rename filtering opcode method
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12301 >
2021-08-19 01:08:14 +02:00
Alejandro Piñeiro
8a5f2228db
broadcom/qpu: add new lookup opcode description helper
...
Right now there is a helper to get the opcode description from a
packed instruction, used on unpack related instructions. This commit
adds a helper that refactors the equivalent that is already in use on
pack related instructions.
Right now the helper is small, but we plan to extend it on following
commits in order to use the opcode description version field.
To avoid any possible confusion we rename the existing lookup helper.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12301 >
2021-08-19 01:08:02 +02:00
Alejandro Piñeiro
ff74acabf5
broadcom/qpu: update/remove comments
...
* Remove one about waddr 6 being reserved, when at some point it
become NOP
* Fix one comment about reserved signals on v41 map, as 24 and 25
are in fact defined. This seems a C&P issue (see v40 map).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12301 >
2021-08-19 01:07:35 +02:00
Emma Anholt
fdf47acdc7
ci/freedreno: Flake the rest of the pbuffer/window dEQP-EGL tests.
...
I had at least 3 of these in my logs, I see no reason not to fill out the
rest at this point.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12458 >
2021-08-18 22:47:12 +00:00
Emma Anholt
0d023aaaf5
ci/freedreno: Mark a new flaky SSBO length test.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12458 >
2021-08-18 22:47:12 +00:00
Ian Romanick
5ce3bfcdf3
intel/compiler: Lower 8-bit ops to 16-bit in NIR on all platforms
...
This fixes the Crucible func.shader.shift.int8_t test on Gen8 and Gen9.
See https://gitlab.freedesktop.org/mesa/crucible/-/merge_requests/76 .
With the previous optimizations in place, this change seems to improve
the quality of the generated code. Comparing a couple Vulkan CTS tests
on Skylake had the following results.
dEQP-VK.spirv_assembly.type.vec3.i8.bitwise_xor_frag:
SIMD8 shader: 36 instructions. 1 loops. 3822 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 27 instructions. 1 loops. 2742 cycles. 0:0 spills:fills, 5 sends
dEQP-VK.spirv_assembly.type.vec3.i8.max_frag:
SIMD8 shader: 39 instructions. 1 loops. 3922 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 37 instructions. 1 loops. 3682 cycles. 0:0 spills:fills, 5 sends
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025 >
2021-08-18 22:03:37 +00:00
Ian Romanick
f0a8a9816a
nir: intel/compiler: Add and use nir_op_pack_32_4x8_split
...
A lot of CTS tests write a u8vec4 or an i8vec4 to an SSBO. This results
in a lot of shifts and MOVs. When that pattern can be recognized, the
individual 8-bit components can be packed much more efficiently.
v2: Rebase on b4369de27f ("nir/lower_packing: use
shader_instructions_pass")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025 >
2021-08-18 22:03:37 +00:00
Ian Romanick
89f639c0ca
nir/algebraic: Remove spurious conversions from inside logic ops
...
Not only does this eliminate a bunch of unnecessary type converting
MOVs, but it can also enable some SWAR. The
dEQP-VK.spirv_assembly.type.vec3.i8.bitwise_xor_frag test does
something about like:
c = a.x ^ b.x;
d = a.y ^ b.y;
e = a.z ^ b.z;
After this change, it looks more like:
uint t = i8vec3AsUint(a) ^ i8vec3AsUint(b);
c = extract_u8(t, 0);
d = extract_u8(t, 1);
e = extract_u8(t, 2);
On Ice Lake, this results in:
SIMD8 shader: 41 instructions. 1 loops. 3804 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 31 instructions. 1 loops. 2844 cycles. 0:0 spills:fills, 5 sends
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025 >
2021-08-18 22:03:37 +00:00
Ian Romanick
7c83aa0518
intel/fs: Emit better code for u2u of extract
...
Emitting the instructions one by one results in two MOV instructions
that won't be propagated. By handling both instructions at once, a
single MOV is emitted. For example, on Ice Lake this helps
dEQP-VK.spirv_assembly.type.vec3.i8.bitwise_xor_frag:
SIMD8 shader: 49 instructions. 1 loops. 4044 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 41 instructions. 1 loops. 3804 cycles. 0:0 spills:fills, 5 sends
Without "intel/fs: Allow copy propagation between MOVs of mixed sizes,"
the improvement is still 8 instructions, but there are more instructions
to begin with:
SIMD8 shader: 52 instructions. 1 loops. 4164 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 44 instructions. 1 loops. 3944 cycles. 0:0 spills:fills, 5 sends
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025 >
2021-08-18 22:03:37 +00:00
Ian Romanick
e3f502e007
intel/fs: Allow copy propagation between MOVs of mixed sizes
...
This eliminates some spurious, size-converting moves. For example, on
Ice Lake this helps dEQP-VK.spirv_assembly.type.vec3.i8.bitwise_xor_frag:
SIMD8 shader: 52 instructions. 1 loops. 4164 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 49 instructions. 1 loops. 4044 cycles. 0:0 spills:fills, 5 sends
Unfortunately, this doesn't clean everything up. Here's a subset of the
"before" assembly:
send(8) g11<1>UW g2<0,1,0>UD 0x02106e02
dp data 1 MsgDesc: ( untyped surface read, Surface = 2, SIMD8, Mask = 0xe) mlen 1 rlen 1 { align1 1Q };
mov(8) g7<4>UB g11<8,8,1>UD { align1 1Q };
mov(8) g12<1>UB g7<32,8,4>UB { align1 1Q };
send(8) g13<1>UW g2<0,1,0>UD 0x02106e03
dp data 1 MsgDesc: ( untyped surface read, Surface = 3, SIMD8, Mask = 0xe) mlen 1 rlen 1 { align1 1Q };
mov(8) g15<1>UW g12<8,8,1>UB { align1 1Q };
mov(8) g8<4>UB g13<8,8,1>UD { align1 1Q };
mov(8) g14<1>UB g8<32,8,4>UB { align1 1Q };
mov(8) g16<1>UW g14<8,8,1>UB { align1 1Q };
xor(8) g17<1>UW g15<8,8,1>UW g16<8,8,1>UW { align1 1Q };
And here's the same subset of the "after" assembly:
send(8) g11<1>UW g2<0,1,0>UD 0x02106e02
dp data 1 MsgDesc: ( untyped surface read, Surface = 2, SIMD8, Mask = 0xe) mlen 1 rlen 1 { align1 1Q };
mov(8) g7<4>UB g11<8,8,1>UD { align1 1Q };
send(8) g13<1>UW g2<0,1,0>UD 0x02106e03
dp data 1 MsgDesc: ( untyped surface read, Surface = 3, SIMD8, Mask = 0xe) mlen 1 rlen 1 { align1 1Q };
mov(8) g15<1>UW g7<32,8,4>UB { align1 1Q };
mov(8) g8<4>UB g13<8,8,1>UD { align1 1Q };
mov(8) g16<1>UW g8<32,8,4>UB { align1 1Q };
xor(8) g17<1>UW g15<8,8,1>UW g16<8,8,1>UW { align1 1Q };
There are a lot of regioning and type restrictions in
fs_visitor::try_copy_propagate, and I'm a little nervious about messing
with them too much.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Suggested-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025 >
2021-08-18 22:03:37 +00:00
Ian Romanick
a147717a93
nir/algebraic: Optimize some extract forms resulting from 8-bit lowering
...
This eliminates some spurious, size-converting moves. For example, on
Ice Lake this helps dEQP-VK.spirv_assembly.type.vec3.i8.bitwise_xor_frag:
SIMD8 shader: 56 instructions. 1 loops. 4444 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 52 instructions. 1 loops. 4164 cycles. 0:0 spills:fills, 5 sends
v2: Condition two of the patterns on !options->lower_extract_byte.
Suggested by Lionel.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025 >
2021-08-18 22:03:37 +00:00
Ian Romanick
f9665040f1
intel/compiler: Document and assert some aspects of 8-bit integer lowering
...
In the vec4 compiler, 8-bit types should never exist.
In the scalar compiler, 8-bit types should only ever be able to exist on
Gfx ver 8 and 9.
Some instructions are handled in non-obvious ways.
Hopefully this will save the next person some time.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025 >
2021-08-18 22:03:37 +00:00
Adam Jackson
fee4f7ef43
glx: Simplify context API profile computation
...
GLX_ARB_create_context_profile has some clever language that sets the
default to core profile but silently degrades back to compat for pre-3.2
GLs. We can just do that, rather than track whether the user specified a
profile.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456 >
2021-08-18 21:11:02 +00:00
Adam Jackson
a521b502b9
glx/dri: Collect the GLX context attributes in a struct
...
dri2_convert_glx_attribs had way too many arguments, let's fix that.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456 >
2021-08-18 21:11:02 +00:00
Adam Jackson
2cd0991def
glx/drisw: Remove some misplaced error checks
...
If the driver doesn't like these attributes it can reject them, it's not
libGL's job to verify them here.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456 >
2021-08-18 21:11:02 +00:00
Adam Jackson
0d42033b26
glx/dri2: Require the driver to support v4 of __DRI_DRI2
...
Mesa has supported this unconditionally since 10.1.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456 >
2021-08-18 21:11:02 +00:00
Adam Jackson
bfad9e75c0
glx: Store the context vtable on the glx screen
...
Again this is rewriting part of driX_create_context_attribs to be
caller-agnostic, so that we can eventually unify it among the DRI
backends.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456 >
2021-08-18 21:11:02 +00:00
Adam Jackson
145992890c
glx: Fix and simplify the share context compatibility check
...
We only end up with one DRI provider per screen, so the only way the
context vtable can differ is if they're not the same directness. Rewrite
the test in those terms to help us unify some of this code away in the
future. Also apply the same logic to the indirect context creation path.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456 >
2021-08-18 21:11:02 +00:00
Adam Jackson
5c71bf065f
dri: Reformat DRI context attribute #defines
...
These were confusingly sorted before.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12456 >
2021-08-18 21:11:02 +00:00
Mike Blumenkrantz
78c5cdf7e6
zink: clear current gfx/compute program upon unbinding its shaders
...
this simplifies a lot of code
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12428 >
2021-08-18 20:58:36 +00:00
Mike Blumenkrantz
c39cbd49c1
zink: do compute shader change on bind
...
we can do this update earlier to optimize the actual compute path
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12428 >
2021-08-18 20:58:36 +00:00
Mike Blumenkrantz
26b5f4c45e
zink: flag the gfx pipeline dirty and unset pipeline shader module on shader change
...
there's no need to leave this until the module updating when the info
is known much earlier
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12428 >
2021-08-18 20:58:36 +00:00
Mike Blumenkrantz
f676e6a64b
zink: remove repeated lazy batch dd casts
...
these all have an ergonomic cost
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12427 >
2021-08-18 20:46:24 +00:00
Mike Blumenkrantz
193ce77265
zink: remove redundant asserts from lazy descriptor set populate
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12427 >
2021-08-18 20:46:24 +00:00
Mike Blumenkrantz
96a6b8c808
zink: simplify get_descriptor_set_lazy params
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12427 >
2021-08-18 20:46:24 +00:00
Boyuan Zhang
35c3f5f08b
radeon/vcn: check frame size change for vp9 header flags
...
Beside show_frame and error_resilient_mode, also need to check if frame size
changes. FRAME_HDR_INFO_VP9_USE_PREV_IN_FIND_MV_REFS flag should be OFF if
frame size changes.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Acked-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12368 >
2021-08-18 19:13:33 +00:00
Boyuan Zhang
0b6f8588a2
radeon/vcn: track width and height of the last frame
...
Adding last width/height to keep tracking the size of the last frame.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Acked-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12368 >
2021-08-18 19:13:33 +00:00
Boyuan Zhang
912d78d4f2
radeon/vcn: initilize num_temporal_layers for hevc
...
Fixes: 51935d59
num_temporal_layers has not been initialized for hevc, which will cause hevc
encode failure.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Thong Thai <thong.thai@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12434 >
2021-08-18 18:06:21 +00:00
Jordan Justen
7faad66ab0
intel/pci-ids: Re-enable DG1 and add SG1
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11584 >
2021-08-18 17:35:41 +00:00
Sagar Ghuge
57bfd7122f
anv: Fix VK_EXT_memory_budget to consider VRAM if available
...
Instead of calling the OS query, re-run anv_update_meminfo to get the
latest from either the kernel memory info API or the OS as appropriate.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5173
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Co-authored-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12433 >
2021-08-18 17:13:00 +00:00
Jason Ekstrand
758662759d
anv: compute available memory in anv_init_meminfo
...
We can now detect EXT_memory_budget support based on whether or not we
have non-zero available system memory.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12433 >
2021-08-18 17:13:00 +00:00
Jason Ekstrand
5c79c545e3
anv: Rework init_meminfo
...
Instead of making LMEM the special case, unify the two paths by setting
up a fake drm_i915_query_memory_regions struct and filling it out based
on OS queries. The important functional change here is that we now pass
system memory through the same GTT size and 3/4 filter that we were
using with the OS queries. This should make behavior consistent on
integrated GPUs regardless of whether or not we have the memory region
query API.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12433 >
2021-08-18 17:13:00 +00:00
Jason Ekstrand
be216ae9d9
anv: Move compute_heap_size lower in the file
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12433 >
2021-08-18 17:13:00 +00:00
Mike Blumenkrantz
e0bd2fae8b
softpipe: fix ci rule ordering to avoid unnecessarily running jobs
...
fixes #5242
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12445 >
2021-08-18 14:11:42 +00:00
Mark Janes
09c1792d1f
anv: warn if system memory is used
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12318 >
2021-08-18 13:55:14 +00:00
Mark Janes
e610f4b5f2
anv: Allocate workaround buffer in local memory if present
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12318 >
2021-08-18 13:55:13 +00:00
Mark Janes
0afda06441
anv: Use local memory for block pool BO
...
Allocating block pool BO into local memory means indirectly it allows us to
push our aux map table into local memory too.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12318 >
2021-08-18 13:55:13 +00:00
Mike Blumenkrantz
649251ad4e
nir/lower_vectorize_tess_levels: set num_components for vectorized loads
...
this otherwise explodes when rewriting e.g., a single array component load to a vec4
Fixes: f5adf27fb9 ("nir,radv: add and use nir_vectorize_tess_levels()")
fixes zmike/mesa#94
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12419 >
2021-08-18 12:18:15 +00:00
Erik Faye-Lund
45a61f1782
gallivm: fix texture-mapping with 16-bit result
...
16bit integer support also implies using 16-bit results when sampling
textures.
Because we're returning the results in float SSA values instead of int,
we need to bitcast back to integers before truncating the values.
Fixes: 00ff60f799 ("gallivm: add 16-bit integer support")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12413 >
2021-08-18 07:55:34 +00:00
Mao, Marc
fae1e99a15
iris: declare padding for iris_vue_prog_key
...
Otherwise with some compilers/environments (Android) padding
may contain garbage and memcmp of the key will fail.
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12438 >
2021-08-18 07:17:59 +00:00
Samuel Pitoiset
b16f3261a7
radv: fix fast clearing depth images with mips on GFX10+
...
Found by inspection.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12325 >
2021-08-18 08:27:32 +02:00
Emma Anholt
c94ff7dd81
freedreno/a5xx: Reduce packet emits for SSBO state.
...
This is what I see happening in
dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.load on
pixel 2 (also where I found a buffer big enough to show how to encode the
size).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12258 >
2021-08-18 00:15:18 +00:00
Emma Anholt
f10c7c4a5d
freedreno/a5xx: Use ST4_ constants for SSBO/image state types.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12258 >
2021-08-18 00:15:18 +00:00
Eric Anholt
5b5dcbfe89
freedreno/a6xx: Skip setting up image dims constants.
...
We just use resinfo anyway. Notably, a6xx was only doing its setup in the
FS case and not CS.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12258 >
2021-08-18 00:15:18 +00:00
Eric Anholt
994793c500
freedreno/ir3: Move a6xx's get_ssbo_size shl to NIR.
...
Just cleaning up a TODO.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12258 >
2021-08-18 00:15:18 +00:00
Eric Anholt
547a2aa051
freedreno/ir3: Use the resinfo path for ssbo sizes on GL, too.
...
Less state walking at draw time, in exchange for a SHL in the lookup.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12258 >
2021-08-18 00:15:18 +00:00
Emma Anholt
513920ba82
freedreno/ir3: Only lower cube image sizes once.
...
shader variants can cause ir3_nir_finalize() to run more than once, which
would make us keep dividing the size by 6.
Fixes: a48fc88571 ("freedreno/a6xx: Apply the cube image size lowering to GL, too.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12258 >
2021-08-18 00:15:18 +00:00
Rob Clark
89ab2a7b6f
freedreno: Add a680 support
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12041 >
2021-08-17 23:24:23 +00:00
Jordan Justen
cf23fbb040
meson: Check that bin/meson_get_version.py ran without an error
...
According to https://mesonbuild.com/Reference-manual.html , the check
parameter is supported since meson 0.47.0.
This could have helped to catch the issue fixed by:
221871fb6d ("meson: Search for python3 before python for bin/meson_get_version.py")
as it would have caused the build to fail immediately.
It's still a good idea to check the result even though that issue is
now fixed.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12404 >
2021-08-17 15:18:03 -07:00
Icecream95
56ea259b42
panfrost: drm-shim support
...
Reviewed-and-tested-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12431 >
2021-08-17 22:06:17 +00:00
Mike Blumenkrantz
8b810e545f
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12423 >
2021-08-17 21:49:01 +00:00
Mike Blumenkrantz
c1d342e986
zink: enable compat contexts
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12423 >
2021-08-17 21:49:01 +00:00
Jason Ekstrand
3ed4ddf076
anv,vulkan: Add a vk_image::wsi_legacy_scanout bit
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
def2cb9808
anv,vulkan: Move drm_format_mod to vk_image
...
Even though we can't really do the parsing on behalf of the driver (it's
too complicated), storing it in the vk_image lets us provide a common
implementation of vkGetImageDrmFormatModifierPropertiesEXT(). It'll
also be useful in the next few commits for swapchain images.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
0f2afa0abc
anv,vulkan: Move ANV image layout helpers to common code
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
ea410173d6
anv: Make anv_image_view derive from vk_image_view
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
9cc004b3d0
vulkan: Add a vk_image_view struct
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
48e8efd00e
vulkan,radv: Move vk_format_depth/stencil_only to common code
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
7878d516c6
radv: Add asserts to vk_format_depth/stencil_only
...
It doesn't make sense to ask for the depth-only or stencil-only format
if there is no depth or stencil. One bit of radv_image.c did seem to
take advantage of the default case in vk_format_depth_only so throw an
`if (vk_format_has_depth(format))` around it.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Bas Nieuwenhuizen
3b00696117
radv: Check format before calling depth_only/stencil_only.
...
Breaks when we drop the fallback in those functions.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
c36ff60a52
vulkan: Refactor and better document vk_image_expand_aspect_mask
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
83b4d4f17d
anv,vulkan: Move VkImageSubresource* helpers from ANV
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
e45e4e3ba1
anv,vulkan: Move anv_image_expand_aspects to common code
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:35 +00:00
Jason Ekstrand
25d4cffabf
anv: Make anv_image derive from vk_image
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:34 +00:00
Jason Ekstrand
0e6c320a7d
vulkan: Add a vk_image struct
...
Currently, this is optional for drivers to carry around but it scrapes
up most of VkImageCreateInfo for you and parses a couple of extension
structs. We also add a few useful little helpers copied over from ANV.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:34 +00:00
Jason Ekstrand
fc5a6eedbc
anv: Delete anv_image::format
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:34 +00:00
Jason Ekstrand
951635dfe7
anv/image: Use planes[i]->primary_surface.isl.format in check_drm_format_mod
...
In theory, with linear vs. tiled differences, it could be different
(RGBA vs. RGB etc.) but it won't matter for the two checks we do with
it. Also, we probably want to be checking the real format here anyway.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023 >
2021-08-17 21:29:34 +00:00
Mike Blumenkrantz
403acd299f
zink: handle map failures more effectively
...
the transfer object needs to be destroyed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12422 >
2021-08-17 17:00:32 -04:00
Mike Blumenkrantz
afa867b973
zink: break out transfer map destroy
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12422 >
2021-08-17 17:00:32 -04:00
Mike Blumenkrantz
97545a0a1f
zink: remove unused variable from image map
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12422 >
2021-08-17 17:00:32 -04:00
Mike Blumenkrantz
c5a6ebc605
zink: split buffer and image map functions
...
this is a bit nicer to read
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12422 >
2021-08-17 17:00:32 -04:00
Mike Blumenkrantz
b19bff17f4
zink: split out zink_transfer allocation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12422 >
2021-08-17 17:00:32 -04:00
Mike Blumenkrantz
9e6916fb00
zink: remove duplicated zink_resource_object::mem member
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12421 >
2021-08-17 20:43:18 +00:00
Mike Blumenkrantz
67239cf754
zink: collapse 'dedicated' allocation into zink_bo
...
this simplifies all the map and memory management code
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12421 >
2021-08-17 20:43:18 +00:00
Mike Blumenkrantz
defeecb816
zink: flake out some tests for now
...
I can't repro these on any branch, so I'll just disable them and see if they get fixed
by some upcoming refactors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12424 >
2021-08-17 20:26:16 +00:00
Emma Anholt
a48fc88571
freedreno/a6xx: Apply the cube image size lowering to GL, too.
...
Fixes KHR-GLES31.core.texture_cube_map_array.texture_size_compute_sh.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12256 >
2021-08-17 20:00:49 +00:00
Emma Anholt
09942227f6
ci/freedreno: Move freedreno's deqp testing to suite support.
...
Using suites makes load-balancing our jobs much easier, keeps the CPU busy
handling the a630_gles_others.sh test sets (and improves the output and
baseline handling for them), and makes it trivial to add in more short
test sets.
a306: still 5 jobs, and we add KHR-GLES2 (KHR-GLES3 is unstable)
a530: still 5 jobs, added KHR-GLES*
a630_gl: 5 jobs becomes 4, and we add KHR-GLES*
a630_vk: still 3 jobs, now 1/3 of all VK instead of 1/4.
a630_vk_full: still 2 jobs, now includes full bypass testing, partial
no-force testing, and testing of pre-merge-skipped tests.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12256 >
2021-08-17 20:00:49 +00:00
Emma Anholt
57b041574d
ci/turnip: Add a new flake from running more of the CTS.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12256 >
2021-08-17 20:00:49 +00:00
Mike Blumenkrantz
97d04c2bc5
zink: rejigger PIPE_MAP_ONCE for internal qbo reads
...
DONTBLOCK is only used internally for this case, and promoting it over
the staging buffer case ensures that it's always reached when it should be
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410 >
2021-08-17 19:40:27 +00:00
Mike Blumenkrantz
7d39ef49bd
zink: remove PIPE_MAP_ONCE from subdata
...
subdata calls that happen once for a buffer are likely to happen again,
so just leave them mapped
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410 >
2021-08-17 19:40:27 +00:00
Mike Blumenkrantz
daff597940
zink: make map_count useful for dedicated image allocations
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410 >
2021-08-17 19:40:27 +00:00
Mike Blumenkrantz
89e2591e8d
zink: split mem unmap logic for images and buffers
...
buffers should only be unmapped if they're explicitly marked for unmap,
but images should only be unmapped when running in 32bit, in which case
they need to always be unmapped
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410 >
2021-08-17 19:40:27 +00:00
Mike Blumenkrantz
6001ebc1b6
zink: split transfer_unmap for images and buffers
...
these should be separate
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410 >
2021-08-17 19:40:27 +00:00
Mike Blumenkrantz
5fedce7bfb
zink: stop zeroing structs during resource allocation
...
some of these show up in profiling
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410 >
2021-08-17 19:40:27 +00:00
Mike Blumenkrantz
2857267b88
zink: repack zink_resource_object struct
...
this makes better use of cachelines and eliminates holes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410 >
2021-08-17 19:40:27 +00:00
Danylo Piliaiev
4d7f759e43
turnip: provide dummy CmdSetLogicOpEXT and CmdSetPatchControlPointsEXT
...
Fixes: fd62e0b799 "tu: enable VK_EXT_extended_dynamic_state2"
Fixes dEQP-VK.api.version_check.entry_points
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5243
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12417 >
2021-08-17 19:19:53 +00:00
Connor Abbott
2df5387e38
tu: Consider depth/stencil for implicit dependencies
...
Noticed by inspection.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12386 >
2021-08-17 18:33:17 +00:00
Connor Abbott
09e0b29bb6
tu: Fix logic errors with subpass implicit dependencies
...
We were adding them if there was an external dep instead of if there
wasn't, and we were skipping the entire subpass which would've resulted
in attachments not getting marked as used.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12386 >
2021-08-17 18:33:17 +00:00
Matt Turner
dcf1d8d7a4
util: Replace recursive DFS with iterative implementation
...
Doesn't fix, but improves the situation in issue #5163 . The
VK.spirv_assembly.instruction.graphics.spirv_ids_abuse.lots_ids_* tests
emit about 160k instructions. ir3_sched blows out the stack after
dag_traverse_bottom_up_node reaches a depth of about 130k frames.
This patch replaces the recursively-implemented post-order traversal
with an iterative implementation using a stack, allowing us to process
DAGs as large as memory can hold.
Definitely makes you appreciate the elegance of recursion...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12232 >
2021-08-17 17:54:09 +00:00
Matt Turner
9261a02028
util: Add unit tests for dag
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12232 >
2021-08-17 17:54:09 +00:00
Connor Abbott
d9c90eee8b
freedreno: Decode a650+ CP_START_BIN/CP_END_BIN packets
...
The blob uses them for GMEM renderpasses.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12184 >
2021-08-17 16:53:40 +00:00
Erik Faye-Lund
726fdf3385
st/mesa: correct point_tri_clip for gles2
...
The OpenGL ES 2.0 (and later) specifications, section 2.13 (Primitive
Clipping) say the following about point-clipping:
> If the primitive under consideration is a point, then clipping
> discards it if it lies outside the near or far clip plane; otherwise
> it is passed unchanged.
This matches the D3D convention, and we already have a rasterizer-state
bit for it. So let's set that bit when the API is OpenGL ES 2.
We can set this inside the PointSprite-conditional block, because that's
always enabled on GLES 2, and it's undefined to enable this state
without also enabling point_quad_rasterization.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12350 >
2021-08-17 15:01:04 +00:00
Erik Faye-Lund
48b1b159ff
llvmpipe: take intersection with bbox for non-legacy points
...
When I updated this code for multi-sampling, I missed one detail; if we
want to be able to support pipe_rasterizer_state::point_tri_clip, we
need to use the intersection of the bbox (clipped to the viewport
rectangle) and the generated primitive, otherwise we won't end up doing
x/y viewport clipping at all.
Because we've adjusted some of the parts of the bbox when adjusting for
inclusiveness/exclusiveness and fill-rule, we also need to reverse the
adjustment.
Fixes: f530e72ea0 ("llvmpipe: do not always use pixel-rounded coordinates for points")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12350 >
2021-08-17 15:01:04 +00:00
Jason Ekstrand
782f75cb52
intel/isl: Use uint64_t for computed byte offsets
...
This is mostly a bit of future-proofing. We never end up with offsets
that don't fit in 32 bits today because, thanks to driver limitations
caused by relocations, we don't allocate buffers bigger than 2GB today.
However, if we ever did, it's possible to create a surface on modern
platforms that consumes more than 4GB and we would end up with wrapping
in our offset calculations.
Acked-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11765 >
2021-08-17 09:36:13 -05:00
Jason Ekstrand
eb7c28bf24
intel/isl: Add a missing assert in isl_tiling_get_intratile_offset_sa
...
Fixes: a4dafe1fad "intel/isl: Make the offset helpers four dimensional"
Acked-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11765 >
2021-08-17 09:14:39 -05:00
Jason Ekstrand
7d521bc104
intel/isl: Better document isl_tiling_get_intratile_offset_*
...
The docs weren't updated when we switched it to 4D. Also, the new docs
are way better. While we're here, use the parameter name offset_B to be
more consistent.
Acked-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11765 >
2021-08-17 09:14:39 -05:00
Jason Ekstrand
9ab2f7d489
intel/isl: Add units to view dimensions in isl_surf_get_uncompressed_surf
...
This makes things a bit more clear.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com >
Acked-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11765 >
2021-08-17 09:14:39 -05:00
Jason Ekstrand
3702406154
intel/isl: Explicitly set offset_B = 0 in get_uncomp_surf for arrays
...
The only user of this case is iris which initializes offset_B to 0 so
there's no real bug here. However, it is unexpected from an API PoV.
Fixes: 9946120d2b "intel/isl: Add more cases to isl_surf_get_uncompressed_surf"
Acked-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11765 >
2021-08-17 09:14:39 -05:00
Mike Blumenkrantz
40fdb3212c
zink: add a suballocator
...
this is an aux/pipebuffer implementation borrowing heavily from the
one in radeonsi. it currently has the following limitations, which
will be resolved in a followup series:
* 32bit address space still explodes
* swapchain images still have separate memory handling
performance in games like Tomb Raider has been observed to increase by
over 1000%
SQUASHED: simplify get_memory_type_index()
now that the heaps are enumerated, this can be reduced to a simple
array index with a fallback
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12146 >
2021-08-17 13:21:28 +00:00
Andreas Baierl
5df677e996
lima: CI: Enable GL_R8 and GL_RG8 texture formats
...
This is fixed in deqp now. See https://github.com/KhronosGroup/VK-GL-CTS/pull/241
Since CI is using deqp version > vulkan-cts-1.2.6.0, this isn't an issue anymore.
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12409 >
2021-08-17 14:49:51 +02:00
Erico Nunes
574bff9087
ci: enable CI for lima again
...
Enable CI for lima again on meson-gxl-s805x-libretech-ac boards
with Mali-450.
These boards are managed by a LAVA instance and so follow the LAVA CI
workflow in Mesa.
The goal is to have coverage for deqp-gles2, as lima is a GLES2-only
driver.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11789 >
2021-08-17 11:22:59 +00:00
Filip Gawin
46d0126deb
radv: improve rounding of zmin
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12388 >
2021-08-17 11:03:59 +00:00
Roman Stratiienko
5ec6b6e9bb
lima: Implement lima_resource_get_param() callback
...
Currently stride, offset, modifier is obtained by invoking
lima_resource_get_handle() with WINSYS_HANDLE_TYPE_KMS.
Before commit 47f000c170 this path was working. Obtained handle
was simply ignored by DRI frontend and only requested data used.
After commit 47f000c170 such requests started to fail when
DRI is initialized using KMSRO and resource has no scanout data.
When lima_resource_get_param() is implemented, it will be used in
a first place to obtain resource data.
Fixes: 47f000c170 ("lima: fail in get_handle(TYPE_KMS) without a scanout resource")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12362 >
2021-08-17 10:50:51 +00:00
Jordan Justen
221871fb6d
meson: Search for python3 before python for bin/meson_get_version.py
...
Most systems have either dropped the python executable, or made it
python3.
But it is still possible to configure a system such that python runs
python2. https://www.python.org/dev/peps/pep-0394/
Or, some developers may still be running older distributions where
python is python2.
Since bin/meson_get_version.py now requires python3, we should search
for python3 before python.
Fixes: f1eae2f8bb ("python: drop python2 support")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12400 >
2021-08-17 09:45:54 +00:00
Juan A. Suarez Romero
adfd3f8cd4
v3d/ci: add piglit flake
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12401 >
2021-08-17 09:29:59 +00:00
Marcin Ślusarz
89bc8ff408
glsl/opt_algebraic: disable invalid optimization
...
When operators other than eq and ne are involved we can't really
move operands around and negate them because such transformation
may change the value of the whole expression.
Some examples:
For unsigned var:
0 >= 1u + var would eventually become 0xffffffff >= var,
which would always evaluate to true, when original expression
was true only for var == 0xffffffff.
For signed var:
0 >= 1 + var would become -1 >= var, which would evaluate to
false for var == 2147483647, when original expression evaluated
to true (because signed overflow is defined to wrap around in
glsl, 1 + 2147483647 == -2147483648, so 0 >= -2147483648).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5226
Fixes: 34ec1a24d6 ("glsl: Optimize (x + y cmp 0) into (x cmp -y).")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12359 >
2021-08-17 08:17:52 +00:00
Marcin Ślusarz
f9e3ae6a01
intel/error-decode: printout INSTDONE_GEOM register for Gfx12.5
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12392 >
2021-08-17 08:05:45 +00:00
Marcin Ślusarz
4f4f3b1072
genxml: add INSTDONE_GEOM register for Gfx12.5
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12392 >
2021-08-17 08:05:45 +00:00
Lionel Landwerlin
c8ff8a66cf
intel/error-decode: printout more registers
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12392 >
2021-08-17 08:05:45 +00:00
Lionel Landwerlin
bee7bff48e
genxml: add more INSTDONE registers for Gfx12.5
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12392 >
2021-08-17 08:05:45 +00:00
Ella-0
123590b88c
v3dv: Implement VK_EXT_provoking_vertex
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12382 >
2021-08-17 07:49:41 +00:00
Samuel Pitoiset
80e5e059fa
radv: fix pre-computing viewport xform when setting new viewports
...
viewportCount is the number of viewports in pViewports while
firstViewport is the index.
Fixes new CTS dEQP-VK.draw.depth_clamp.*_clamp_four_viewports
Fixes: a2ef92d7a5 ("radv: pre-calculate viewport transforms")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12353 >
2021-08-17 08:20:02 +02:00
Timothy Arceri
edfcc4f022
nir: fix GCM when GVN enabled
...
Enabling GVN uncovered a bug where we would crash if the pass
thinking about pushing something into a loop.
Fixes: 6538b3e566 ("nir: add heuristic for instructions in loops with GCM")
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12242 >
2021-08-17 03:15:49 +00:00
Vinson Lee
104aa6b5d1
nv50/ir: Add FlatteningPass constructor.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor for this
class does not initialize gpr_unit.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12295 >
2021-08-17 01:40:14 +00:00
Vinson Lee
ac1ddfba35
zink: Remove unnecessary null checks.
...
Fix defects reported by Coverity Scan.
Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking sa suggests that it may be null,
but it has already been dereferenced on all paths leading to the
check.
check_after_deref: Null-checking sb suggests that it may be null,
but it has already been dereferenced on all paths leading to the
check.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12298 >
2021-08-17 01:25:00 +00:00
Filip Gawin
e6d996f8ff
radeonsi: improve rounding of zmin
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12389 >
2021-08-17 01:09:51 +00:00
Dave Airlie
9e6f414766
llvmpipe: init renderer string once to avoid races.
...
In a multithreads clover run the get_name call would race against
itself and sometimes an empty device name would occur.
Just init it once.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12285 >
2021-08-16 23:20:00 +00:00
Dave Airlie
ff99270923
gallivm: fix non-32 bit popcounts.
...
Fixes
OpenCL CTS integer_ops popcount
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12285 >
2021-08-16 23:20:00 +00:00
Dave Airlie
9922ea7e66
gallivm: fix idiv/irem for 8/16/64-bit and 32-bit INT_MIN/-1
...
This fixes integer division for non-32bit but also fixes the
32-bit case where INT_MIN/-1 causes an exception.
Fixes CL CTS
./integer_ops/test_integer_ops quick_long_math
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12285 >
2021-08-16 23:20:00 +00:00
Dave Airlie
ff2d838c7a
llvmpipe/cl: limit kernel input size.
...
Fixes:
api min_max_parameter_size
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12285 >
2021-08-16 23:20:00 +00:00
Dave Airlie
c3bede9c96
gallivm: don't lower local invocation index in frontend
...
The frontend can't handle variable block sizes properly,
so just lower it here in the backend.
Fixes CTS basic local_linear_id + get_linear_ids
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12285 >
2021-08-16 23:20:00 +00:00
Emma Anholt
baf800b236
i915g: Implement cube/3d texture_subdata() as a series of per-layer maps.
...
i915 doesn't lay out the images such that one could use a layer_stride to
step between them, and the individual maps should be just as good at
uploading.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12384 >
2021-08-16 22:48:54 +00:00
Emma Anholt
9b51204d8f
i915g: Fix 3D texture layouts for width != height.
...
Obvious typo here.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12384 >
2021-08-16 22:48:54 +00:00
Ella-0
dad0c16782
v3dv: Implement VK_EXT_pipeline_creation_cache_control
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12381 >
2021-08-16 20:41:03 +00:00
Dave Airlie
8f72268fc9
llvmpipe: enable GL compatibility profiles
...
The two rasterpos fails looks related to GLSL linking, the vertex
shader is linked with the geometry shader which doesn't use any
of it's outputs so they seem to get removed, which stops the rasterpos
from working.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12374 >
2021-08-17 05:34:55 +10:00
Dave Airlie
5b9ca78f47
draw: add vertex color clamping to gs/tes
...
This refactors out the vertex color clamping from the VS shader,
and adds calls to it for the tes/gs stages. It also conditionalised
they key on having later stages as clamping should only happen in
the last stage.
This is needed for GL compatibility profiles
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12374 >
2021-08-17 05:33:33 +10:00
Dave Airlie
1ae55f05c0
draw/tess: add clipvertex support for compatibility
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12374 >
2021-08-17 05:33:31 +10:00
Dave Airlie
f48fed8e91
draw/gs: add clipvertex support for compatibility
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12374 >
2021-08-17 05:33:27 +10:00
Dave Airlie
3b1b1af694
draw: handle primitive ID for quads/quad strips.
...
In order to enable compat contexts QUADS/QUAD_STRIPS need
to support primitive ID. There are some piglit tests for this.
This adds support to the decomposer to pass quads so the prim
assembler can pick them up and add primitive IDs.
Acked-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12374 >
2021-08-17 05:33:11 +10:00
Juan A. Suarez Romero
441e490f5a
v3dv: initialize CL submission structure
...
This fixes an issue related with testing this with a kernel with the
performance counters enabled: it introduces a "pad" field that in the CL
submission structure that is not initialized.
Fixes: ca13868098 ("drm-uapi: add v3d performance counters")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12390 >
2021-08-16 18:06:35 +00:00
Rhys Perry
795f3b7318
ci: update trace hashes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
cfc4433015
nir,glsl_to_nir: use nir_fdot()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
f6f9000f84
spirv: create ffma more often
...
We will not be able to combine instructions into ffma later if they are
exact, so create them from the start. They can be lowered later if they
are unwanted.
fossil-db (GFX10.3):
Totals from 14697 (10.05% of 146267) affected shaders:
VGPRs: 645736 -> 614168 (-4.89%)
CodeSize: 59312768 -> 58735352 (-0.97%); split: -0.97%, +0.00%
MaxWaves: 372900 -> 376666 (+1.01%)
Instrs: 11339280 -> 11120882 (-1.93%); split: -1.93%, +0.00%
Latency: 284874519 -> 285277327 (+0.14%); split: -0.10%, +0.24%
InvThroughput: 68791374 -> 68526739 (-0.38%); split: -0.49%, +0.10%
fossil-db (GFX10):
Totals from 11039 (7.55% of 146267) affected shaders:
CodeSize: 54785444 -> 54785268 (-0.00%); split: -0.00%, +0.00%
Instrs: 10401349 -> 10401396 (+0.00%); split: -0.00%, +0.00%
Latency: 277781803 -> 278572890 (+0.28%); split: -0.00%, +0.29%
InvThroughput: 65035902 -> 65100855 (+0.10%); split: -0.00%, +0.10%
fossil-db (GFX9):
Totals from 24055 (16.43% of 146401) affected shaders:
SGPRs: 1790704 -> 1790640 (-0.00%)
VGPRs: 1105736 -> 1105716 (-0.00%)
CodeSize: 110944732 -> 110948812 (+0.00%); split: -0.00%, +0.01%
Instrs: 21609095 -> 21610227 (+0.01%); split: -0.00%, +0.01%
Latency: 756137596 -> 756145812 (+0.00%); split: -0.02%, +0.02%
InvThroughput: 344103825 -> 344112245 (+0.00%); split: -0.00%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
28acc4120f
nir: lower fdot to ffma if lower_ffma=false
...
fossil-db (GFX10.3):
Totals from 57689 (39.44% of 146267) affected shaders:
VGPRs: 2873712 -> 2873432 (-0.01%); split: -0.01%, +0.00%
CodeSize: 227661100 -> 227583572 (-0.03%); split: -0.08%, +0.04%
MaxWaves: 1289562 -> 1289598 (+0.00%); split: +0.01%, -0.00%
Instrs: 43115433 -> 43083308 (-0.07%); split: -0.12%, +0.05%
Latency: 869947191 -> 870279826 (+0.04%); split: -0.06%, +0.10%
InvThroughput: 199425811 -> 199434448 (+0.00%); split: -0.04%, +0.05%
fossil-db (GFX10):
Totals from 2 (0.00% of 146267) affected shaders:
Latency: 8123 -> 8107 (-0.20%)
fossil-db (GFX9):
Totals from 2 (0.00% of 146401) affected shaders:
(no stat changes)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
174a4f36f9
nir: create ffma from builders more often
...
We will not be able to combine instructions into ffma later if they are
exact, so create them from the start. They can be lowered later if they
are unwanted.
fossil-db (GFX10.3):
Totals from 16589 (11.34% of 146267) affected shaders:
VGPRs: 938872 -> 938704 (-0.02%)
SpillSGPRs: 11334 -> 10785 (-4.84%)
CodeSize: 96551964 -> 96498040 (-0.06%); split: -0.08%, +0.02%
MaxWaves: 338760 -> 338772 (+0.00%)
Instrs: 18356857 -> 18350486 (-0.03%); split: -0.06%, +0.02%
Latency: 561563310 -> 561414360 (-0.03%); split: -0.08%, +0.05%
InvThroughput: 145629673 -> 145594740 (-0.02%); split: -0.04%, +0.01%
fossil-db (GFX10):
Totals from 16252 (11.11% of 146267) affected shaders:
VGPRs: 893820 -> 893744 (-0.01%)
SpillSGPRs: 11334 -> 10785 (-4.84%)
CodeSize: 95890244 -> 95839124 (-0.05%); split: -0.08%, +0.02%
MaxWaves: 367704 -> 367734 (+0.01%)
Instrs: 18199741 -> 18194437 (-0.03%); split: -0.06%, +0.03%
Latency: 560912971 -> 560854179 (-0.01%); split: -0.07%, +0.06%
InvThroughput: 142899814 -> 142877939 (-0.02%); split: -0.03%, +0.02%
fossil-db (GFX9):
Totals from 16287 (11.12% of 146401) affected shaders:
SGPRs: 1312784 -> 1312768 (-0.00%); split: -0.05%, +0.05%
VGPRs: 931440 -> 931444 (+0.00%); split: -0.00%, +0.00%
SpillSGPRs: 14623 -> 14597 (-0.18%)
CodeSize: 94428788 -> 94344404 (-0.09%); split: -0.10%, +0.01%
MaxWaves: 90105 -> 90109 (+0.00%)
Instrs: 18486905 -> 18473434 (-0.07%); split: -0.08%, +0.01%
Latency: 720947295 -> 720818323 (-0.02%); split: -0.07%, +0.05%
InvThroughput: 365240104 -> 365224659 (-0.00%); split: -0.02%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
ed70b256ce
nir: add ffma creation helpers
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
4ec4d862c2
nir/algebraic: add is_used_once to dot product reassociation optimization
...
This improves register usage.
fossil-db (Sienna Cichlid, on top of !9805 ):
Totals from 4317 (2.88% of 149839) affected shaders:
VGPRs: 352592 -> 351704 (-0.25%); split: -1.48%, +1.23%
SpillSGPRs: 182 -> 248 (+36.26%)
CodeSize: 31601192 -> 31587624 (-0.04%); split: -0.09%, +0.04%
MaxWaves: 56964 -> 57298 (+0.59%); split: +2.48%, -1.90%
Instrs: 5973557 -> 5974122 (+0.01%); split: -0.05%, +0.06%
Latency: 72088175 -> 72253033 (+0.23%); split: -0.36%, +0.59%
InvThroughput: 14978160 -> 14798919 (-1.20%); split: -1.29%, +0.09%
VClause: 100994 -> 98645 (-2.33%); split: -3.05%, +0.73%
SClause: 278206 -> 276820 (-0.50%); split: -0.54%, +0.04%
Copies: 200264 -> 199556 (-0.35%); split: -1.17%, +0.82%
Branches: 86410 -> 85930 (-0.56%); split: -0.56%, +0.01%
PreSGPRs: 207355 -> 207759 (+0.19%); split: -0.00%, +0.20%
PreVGPRs: 314646 -> 310911 (-1.19%); split: -1.35%, +0.17%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
f95a16be72
nir/algebraic: reassociate add chains for more MAD/FMA-friendly code
...
fossil-db (GFX10.3):
Totals from 25866 (17.68% of 146267) affected shaders:
VGPRs: 1625456 -> 1644936 (+1.20%); split: -0.05%, +1.24%
SpillSGPRs: 11729 -> 11725 (-0.03%); split: -0.07%, +0.03%
CodeSize: 161604460 -> 161458052 (-0.09%); split: -0.11%, +0.02%
MaxWaves: 454842 -> 452160 (-0.59%); split: +0.04%, -0.63%
Instrs: 30652596 -> 30456446 (-0.64%); split: -0.65%, +0.01%
Latency: 723098749 -> 722084247 (-0.14%); split: -0.21%, +0.07%
InvThroughput: 166023468 -> 165506875 (-0.31%); split: -0.36%, +0.05%
fossil-db (GFX10):
Totals from 25866 (17.68% of 146267) affected shaders:
VGPRs: 1593576 -> 1611976 (+1.15%); split: -0.09%, +1.25%
SpillSGPRs: 11729 -> 11725 (-0.03%); split: -0.07%, +0.03%
CodeSize: 162294468 -> 162154456 (-0.09%); split: -0.11%, +0.02%
MaxWaves: 477448 -> 474166 (-0.69%); split: +0.10%, -0.79%
Instrs: 30820164 -> 30625805 (-0.63%); split: -0.65%, +0.02%
Latency: 723190249 -> 722273445 (-0.13%); split: -0.20%, +0.08%
InvThroughput: 163114872 -> 162582966 (-0.33%); split: -0.37%, +0.04%
fossil-db (GFX9):
Totals from 25866 (17.67% of 146401) affected shaders:
SGPRs: 2167808 -> 2169920 (+0.10%); split: -0.09%, +0.19%
VGPRs: 1649404 -> 1667592 (+1.10%); split: -0.43%, +1.53%
CodeSize: 161273556 -> 161281996 (+0.01%); split: -0.07%, +0.08%
MaxWaves: 114910 -> 113519 (-1.21%); split: +0.10%, -1.31%
Instrs: 31557180 -> 31403708 (-0.49%); split: -0.50%, +0.02%
Latency: 899594793 -> 898786283 (-0.09%); split: -0.19%, +0.10%
InvThroughput: 412265691 -> 411551698 (-0.17%); split: -0.28%, +0.11%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
110bcb4919
nir/algebraic: add various ffma optimizations
...
fossil-db (GFX10.3):
Totals from 7532 (5.15% of 146267) affected shaders:
VGPRs: 414696 -> 414304 (-0.09%); split: -0.18%, +0.08%
CodeSize: 33393444 -> 33375908 (-0.05%); split: -0.13%, +0.08%
MaxWaves: 149854 -> 150094 (+0.16%); split: +0.27%, -0.11%
Instrs: 6279823 -> 6271364 (-0.13%); split: -0.18%, +0.05%
Latency: 60308898 -> 60296025 (-0.02%); split: -0.13%, +0.11%
InvThroughput: 13770542 -> 13745192 (-0.18%); split: -0.24%, +0.06%
fossil-db (GFX10):
Totals from 7532 (5.15% of 146267) affected shaders:
VGPRs: 406664 -> 405564 (-0.27%); split: -0.39%, +0.12%
CodeSize: 33544656 -> 33527568 (-0.05%); split: -0.13%, +0.08%
MaxWaves: 158584 -> 158858 (+0.17%); split: +0.30%, -0.13%
Instrs: 6316242 -> 6307913 (-0.13%); split: -0.18%, +0.05%
Latency: 60243290 -> 60232844 (-0.02%); split: -0.13%, +0.11%
InvThroughput: 13643345 -> 13620171 (-0.17%); split: -0.24%, +0.07%
fossil-db (GFX9):
Totals from 7543 (5.15% of 146401) affected shaders:
SGPRs: 546384 -> 547472 (+0.20%); split: -0.08%, +0.28%
VGPRs: 412636 -> 411896 (-0.18%); split: -0.27%, +0.09%
CodeSize: 33216196 -> 33210564 (-0.02%); split: -0.12%, +0.11%
MaxWaves: 38771 -> 38789 (+0.05%); split: +0.17%, -0.12%
Instrs: 6419878 -> 6414891 (-0.08%); split: -0.18%, +0.11%
Latency: 70972327 -> 70922754 (-0.07%); split: -0.15%, +0.08%
InvThroughput: 33949039 -> 33909258 (-0.12%); split: -0.20%, +0.08%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:45 +00:00
Rhys Perry
b0238191ca
spirv: swap fadd operands in build_asin() and matrix_multiply()
...
This shouldn't do anything but will make testing a later patch easier.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:44 +00:00
Rhys Perry
82d0600ba2
nir: swap fadd operands in nir_atan()
...
This shouldn't do anything but will make testing a later patch easier.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056 >
2021-08-16 17:19:44 +00:00
Alyssa Rosenzweig
d42e53c77a
panfrost: Unit test clear colour packing
...
dEQP has poor coverage of clear colours with odd formats, and doesn't
check that we dither as expected. This functionality is trivial to unit
test, so there's no excuse not to. Nontrivial reference values are
captured from pandecode of the Mali G52 DDK but should be valid for all
Midgard/Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365 >
2021-08-16 16:35:50 +00:00
Alyssa Rosenzweig
8dfbbee054
panfrost: Mark R5G6B5 as blendable
...
We support B5G6R5 as blendable, this is just a swizzle away. Reduces the
amount we hit blend shaders, and will fix a clear colour packing unit
test in a moment.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365 >
2021-08-16 16:35:50 +00:00
Alyssa Rosenzweig
62e902101b
panvk: Use pan_pack_color
...
This is in common code now. Inherit all the bug fixes from panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365 >
2021-08-16 16:35:50 +00:00
Alyssa Rosenzweig
b9c095cc2c
panfrost: Rewrite the clear colour packing code
...
At the beginning of a render pass, the hardware will fill the tilebuffer
with an arbitrary 128-bit word. To implement colour clears, the driver
must pack the API-specific clear colour according to the 128-bit layout
of the tilebuffer. This layout depends only on the render target format.
The existing code to handle this was based on loose guesswork. It works
for the format / clear colour combinations tested in dEQP-GLES3, but it
is severely deficient in the general case. It works by matching on the
PIPE format of the render target (not the layout of the tilebuffer). For
special cased PIPE formats, it open codes a buggy pack routine.
Otherwise, it defaults to util_pack_color in the hope that will work.
Since util_pack_color doesn't know anything about Mali tilebuffer
layouts, that means it's defaulting to wrong behaviour.
Now that we understand internal tilebuffer layouts, let's rewrite the
packing code. Instead of matching PIPE formats, map the PIPE format to
the internal tilebuffer layout using the common table, ensuring the
mapping remains in sync with the render target descriptor. Then for
blendable tilebuffer formats, pack using a common float -> fixed point
path supporting optional sRGB translation. Raw formats use
util_pack_color as before.
For formats with less than 8 bits per channel, the new code uses the
fractional bits of the fixed-point representation. This is required for
correct dithering if the clear colour is not exactly representable in
the final low precision format.
In summary, at least the following bugs in the old code are fixed:
* Swapped R/B channels with sRGB
* Swapped R/B channels with some missing formats
* Incorrect dithering with RGB565, RGB5_A1
Fixes the following test cases:
dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb
dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_srgb
dEQP-EGL.functional.wide_color.window_888_colorspace_srgb
dEQP-EGL.functional.wide_color.pbuffer_888_colorspace_srgb
Later in the series, unit tests are added for the new implementation.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365 >
2021-08-16 16:35:50 +00:00
Icecream95
0624346a20
panfrost: Only allow colour blit shaders to be killed
...
Fixes timeouts in SuperTuxKart with the advanced rendering pipeline.
Fixes: d034461921 ("panfrost: Set allow_forward_pixel_to_be_killed for blit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12267 >
2021-08-16 16:21:55 +00:00
Alyssa Rosenzweig
76377de99b
panfrost: Fix leak of render node fd
...
Transfer ownership of the render node fd to the panfrost_device (minor
change to panvk), and then close the file descriptor for the render node
bound to the panfrost_device when destroying the panfrost_device. Of all
the users of panfrost_open_device, panvk is the only one that correctly
closed the fd before. Accordingly, this fixes an fd leak in the Gallium
driver (and performance counter utilities).
This fix still applies to the Gallium driver when renderonly is in use--
although renderonly closes its own fd, the fd is _duplicated_ in
panfrost_drm_winsys.c, so renderonly and panfrost must _both_ close
their respective fd to fix the leak.
This fixes a crash when running dEQP-EGL for more than two hours.
dEQP-EGL creates a new screen for every test case and then immediately
destroys it. If destroying a screen leaks the fd, this causes the number
of open file descriptors to increase monotonically until the process
ends. This will eventually hit the system limit for number of open files
and abort the process.
This bug was identified while attempting to run the OpenGL ES
conformance tests via cts-runner, and then confirmed with `lsof`. With
the fix, the number of file descriptors reported by `lsof | wc -l` is
now constant while running dEQP-EGL as expected.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12346 >
2021-08-16 16:08:10 +00:00
Icecream95
dab97fe227
panfrost: Add nocache debug flag for disabling the BO cache
...
Useful for making execution more deterministic.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12378 >
2021-08-16 14:53:00 +00:00
Icecream95
e8b97dcdb2
panfrost: Fill tiler job padding again
...
Fixes: 3d0f6592b2 ("panfrost: Use PAN_ARCH for the rest of pan_cmdstream")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12377 >
2021-08-16 14:36:13 +00:00
Icecream95
191824ec8e
pan/mdg: Reduce size of tex_opcode_props
...
Also include midgard_ops.h to prevent the definitions from going out
of sync again.
Found by compiling with LTO enabled.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376 >
2021-08-16 14:18:36 +00:00
Icecream95
10a344a857
panfrost: Free NIR when deleting shader state
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376 >
2021-08-16 14:18:36 +00:00
Icecream95
d349448717
panfrost: Free TGSI tokens
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376 >
2021-08-16 14:18:36 +00:00
Icecream95
98165aa9f2
panfrost: Fix memory leaks for compute state
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376 >
2021-08-16 14:18:36 +00:00
Icecream95
a9ab168e16
pan/bi,pan/mdg: Fix memory leak of hash tables
...
Despite being created with a ralloc context, some memory is still
leaked when not manually destroying hash tables.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376 >
2021-08-16 14:18:36 +00:00
Icecream95
b85ff56696
panfrost: Call primconvert and u_transfer_helper destroy functions
...
Fixes a couple of small memory leaks.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376 >
2021-08-16 14:18:36 +00:00
Jesse Natalie
f378799d9d
CI: Update Windows quick_gl baseline for mysterious new passes
...
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12391 >
2021-08-16 06:55:54 -07:00
Connor Abbott
1564ff72a0
tu: Fix xfb when there is a hole at the end
...
We were handling the case where we had an unassigned output in the
middle of the outputs array, but v->outputs can be smaller than the
shader's info.num_outputs when an output at the end isn't assigned. This
lead to us reading garbage after the end, and assuming that it
corresponded to r0.x and overwriting the xfb entry for some other random
output with the unassigned output's entry.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12310 >
2021-08-16 11:06:23 +00:00
Roman Stratiienko
86196eff98
AOSP: Add panfrost vulkan library suffix
...
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304 >
2021-08-16 09:18:46 +00:00
Roman Stratiienko
21de785562
AOSP: Update timestamps of target binaries
...
Fixes warning during the build and unnecessary rule execution:
***
ninja: Missing `restat`? An output file is older than the most recent input:
***
Fixes: 8621bd8d5e ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Tested-by: Mauro Rossi <issor.oruam@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304 >
2021-08-16 09:18:46 +00:00
Roman Stratiienko
c3775ac507
AOSP: Upgrade libLLVM dependency to v12
...
Now LLVMv12 seems to be stable enough, so we can upgrade to it.
Version adapted for AOSP can be found here [1]
[1]: https://github.com/maurossi/llvm-project/tree/release_12.x
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Tested-by: Mauro Rossi <issor.oruam@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304 >
2021-08-16 09:18:46 +00:00
Roman Stratiienko
a70ff21efb
AOSP: Extract version from libdrm instead of hardcoding it.
...
mesa3d require up-to-date version of libdrm.
Hardcoding it to 2.4.105 is wrong.
Fixes: 8621bd8d5e ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Tested-by: Mauro Rossi <issor.oruam@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304 >
2021-08-16 09:18:46 +00:00
Connor Abbott
71595a189a
tu: Fix feedback loops in sysmem mode
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12360 >
2021-08-16 08:57:10 +00:00
Connor Abbott
351c6b8bfe
freedreno/a6xx: Document GRAS_SC_CNTL::SINGLE_PRIM_MODE
...
Add a value discovered when investigating how the blob implements
GL_KHR_blend_equation_advanced.
Note that everything added here is a bit speculative, because it's
assuming the blob's implementation of GL_KHR_blend_equation_advanced is
sane. In particular a value of 0x3 seems to solve the UBWC problem as
well, so I'm not sure whether my description of the difference between
0x1 and 0x3 is correct. I'm also surprised that it uses the same value
for the coherent and non-coherent cases when forcing sysmem.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12360 >
2021-08-16 08:57:10 +00:00
Leandro Ribeiro
d18f102275
vulkan/wsi/wayland: add helper function find_format()
...
There are some places in the code in which we search for a certain
format in the u_vector. This new function help us to avoid repetition.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:23:06 +02:00
Leandro Ribeiro
cb3b4609c1
vulkan/wsi/wayland: always initialize format vector
...
In wsi_wl_display_init(), the format vector is initialized only when the
caller sets the function to query the formats/modifiers. But
wsi_wl_display_finish() always release the vector, no matter if it has
been initialized or not.
For now it just works because the u_vector_foreach() macro works when
the format vector is uninitialized, but it is a weird design to try to
release something that has not been initialized.
So in this patch we start to always initialize the format vector, even
when not querying formats/modifiers.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:22:50 +02:00
Simon Ser
151b65b211
vulkan/wsi/wayland: generalize modifier handling
...
Instead of having hard-coded lists of modifiers for argb8888 and
xrgb8888, store a list of modifiers alongside each VkFormat. To
achieve this goal, introduce a new struct wsi_wl_format that holds
both a VkFormat and a modifier list, and use it for the items in
the formats list.
This commit unlocks non-{A,X}RGB8888 formats, which were previously
always disabled for linux-dmabuf.
Signed-off-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:22:48 +02:00
Leandro Ribeiro
7383827acc
vulkan/wsi/wayland: fold wsi_wl_display_swrast and wsi_wl_display_dmabuf into parent
...
The two structs wsi_wl_display_swrast and wsi_wl_display_dmabuf have in
common the list of formats and the only difference between both is the
interface object.
As we know that only one of the arrays is populated (we never bind to
wl_shm and the dmabuf interface simultaneously), we can move the members
of these structs to wsi_wl_display and simplify the code.
This is based on previous work of Simon Ser <contact@emersion.fr >.
Signed-off-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:22:39 +02:00
Leandro Ribeiro
1c9299eade
vulkan/wsi/wayland: fix crash when force_bgra8_unorm_first is true
...
When force_bgra8_unorm_first is true, we access display->formats and
change the order of certain formats. The final result is BGRA8_UNORM
being the first in the format list, as some clients require this.
But we are trying to do this before before setting up display->formats,
so it should result in a crash. Fix this by changing the order of
things. Now we first set up display->formats before trying to access it.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:22:35 +02:00
Leandro Ribeiro
db2635020f
vulkan/wsi/wayland: do not perform roundtrip when not querying formats
...
When we call wsi_wl_display_init() with get_format_list set to false
there's no need to dispatch the events from the interfaces. This allow
us to remove a check in the event handlers to verify if we're querying
the formats or not, what makes the code easier to read.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:22:28 +02:00
Leandro Ribeiro
4bf011a768
vulkan/wsi/wayland: check directly if we got globals successfully
...
Until now we had a weird way to bail out if we could not get any
globals. Instead, add a direct check, what makes the code easier to
read.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:22:20 +02:00
Simon Ser
e090316570
vulkan/wsi/wayland: drop support for wl_drm
...
Nowadays, all Wayland compositors implement linux-dmabuf. We
shouldn't need to support the legacy wl_drm interface anymore.
Signed-off-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:22:17 +02:00
Simon Ser
9990a351e8
vulkan/wsi/wayland: use drm_fourcc.h for formats
...
drm_fourcc.h is the canonical source for DRM formats. Instead of
using the values from wl_drm, use the canonical header.
Signed-off-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117 >
2021-08-16 10:21:38 +02:00
Emma Anholt
d27a0dd7df
i915g: Add support for FXT1.
...
This was the only GL extension supported by i915c and not i915g.
Closes : #5229
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367 >
2021-08-16 02:29:45 +00:00
Emma Anholt
12b248755e
i915g: Fix up the format mapping for DXT1_*RGB
...
We weren't wiring alpha to 1 like we should.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367 >
2021-08-16 02:29:45 +00:00
Emma Anholt
22ec89b66b
i915g: Add missing support for sRGB S3TC.
...
Apparently despite not advertising the format, GL wanted it and we would
assertion fail in format choosing. Easy enough to add.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367 >
2021-08-16 02:29:45 +00:00
Emma Anholt
f46850d3b3
i915g: Add support for blitting compressed textures.
...
Previously we would assertion fail on s3tc uploads.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367 >
2021-08-16 02:29:45 +00:00
Emma Anholt
5a088aead5
i915g: Make the 1D workaround keep TXP's .w channel in the right spot.
...
Fixes: 390a3fcdc4 ("nir_to_tgsi: Add support for TXP.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367 >
2021-08-16 02:29:45 +00:00
Eric Engestrom
4d9acfa533
python: drop explicit output_encoding='utf-8' in mako templates
...
Python 3 handles unicode strings by default, so we can drop all that.
Suggested-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:32 +00:00
Eric Engestrom
3f99ff8a0e
glsl/tests: remove some dead code
...
Suggested-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:32 +00:00
Eric Engestrom
773a70f9cb
isl: drop left-over comment
...
Fixes: cf9ff082b4 ("isl: Bring back isl_format_layout::bpb")
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:32 +00:00
Eric Engestrom
e8937757ce
isl: drop comment about "python 2 vs 3" as it doesn't apply anymore
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:32 +00:00
Eric Engestrom
93cb3aca03
Revert "python: Explicitly add the 'L' suffix on Python 3"
...
This reverts commit ad363913e6 .
This code was added to be able to compare the output file while porting
the script from python2 to python3, but this has long been finished and
the extra complexity is not needed anymore.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:32 +00:00
Eric Engestrom
f1eae2f8bb
python: drop python2 support
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:32 +00:00
Eric Engestrom
dac09a3119
gitlab-ci: stop installing python-is-python3 package
...
Suggested-by: Michel Dänzer <michel@daenzer.net >
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:31 +00:00
Eric Engestrom
6f854145d2
python: explicitly require python3
...
Ubuntu has dropped the `python` symlink to `python2` [1] instead of
redirecting it to `python3` like other distros are doing, which means
that if we want to build Mesa on Ubuntu we need the `python3` shebang.
[1] https://lists.ubuntu.com/archives/ubuntu-devel/2020-January/040882.html
Reported-by: Vinson Lee <vlee@freedesktop.org >
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:31 +00:00
Caio Marcelo de Oliveira Filho
0092edfec0
nir/dead_cf: Do not remove loops with loads that can't be reordered
...
If a loop is followed by a barrier, the ordering between a load inside
the loop and other memory operations after the barrier may have to be
preserved depending on the type of memory involved. This is relevant
when the memory is writeable by other invocations. In such case, it
is not valid to completely eliminate the loop.
This commit doesn't attempt to precisely catch the barrier case, as
analysis could become too complex. It simply assumes it can't drop
the loops that contain certain types of loads unless those are known
to be safe to reorder (via the access flag).
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4475
Acked-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9938 >
2021-08-14 01:48:03 +00:00
Alyssa Rosenzweig
38f39cc1e2
drm-shim: Support kernels with >4k pages
...
mmap requires its offset is page aligned, but the current code only
guarantees 4k alignment, causing drm-shim to break badly on kernels with
>4k page sizes. This fixes drm-shim on my Apple M1, running bare metal
Linux with 16k pages. It probably also fixes exotic PowerPC systems with
64k pages.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Zoltan Boszormenyi <zboszor@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12347 >
2021-08-13 23:33:52 +00:00
Ian Romanick
5f2dbd45f2
gallium: Remove "optimize" parameter from pipe_screen::finalize_nir
...
As part of adding support for inline uniforms in Iris, I was going to
add a finalize_nir hook. I went looking to see how other drivers use
the "optimize" parameter, and I discovered that *nobody* uses it at all.
v2: Fix typo in commit message. Noticed by Mike.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12317 >
2021-08-13 15:45:29 -07:00
Ella-0
f623072328
v3dv: implement VK_EXT_color_write_enable
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11784 >
2021-08-13 22:25:23 +00:00
Bas Nieuwenhuizen
aa8179e33f
nir/inline_functions: Handle halting functions.
...
Without this stitch_blocks complains about ending in a jump with a
non-empty block after the inserted body.
I hit this with CTS raytracing tests where we tried to inline a
function that basically ended up being something like
{
ignore_ray_intersection
halt
}
I kept the nop path when possible as that does not leave a mess
for the optimization loop to optimize.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12163 >
2021-08-13 21:18:13 +00:00
Bas Nieuwenhuizen
fa6cd6e00d
nir/lower_scratch: Ensure we don't lower vars with unsupported usage.
...
Need to avoid lowering temps when they are used by other instructions,
like the rt instructions (some of the shader call parameters get
converted to temp variables and we will lower them later with
the explicit io lowering pass as we need to guarantee they will
end up in scratch).
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12162 >
2021-08-13 20:56:30 +00:00
Rhys Perry
04bd2a1245
nir: remove src/compiler/nir/nir_control_flow
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12357 >
2021-08-13 17:51:42 +01:00
Emma Anholt
673cc9323a
nir: Move phi src setup to a helper.
...
Cleans up the ralloc/list push code all over the tree.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11772 >
2021-08-13 16:11:57 +00:00
Juan A. Suarez Romero
636f51c6d1
ci/v3dv: update flakes
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12352 >
2021-08-13 15:49:14 +00:00
Leo Liu
fa1bb47703
frontends/va: Reallocate p010 buffer for AV1 10 bits decode
...
Check bit depth and reallocate p010 buffer if it's 10 bits.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307 >
2021-08-13 09:24:01 -04:00
Leo Liu
ef0bfe2459
radeon/vcn: Enable the AV1 decode p010 mode
...
It will still support 8 bits dithering mode decode.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307 >
2021-08-13 09:24:01 -04:00
Leo Liu
2ea47f258d
frontends/va: Add AV1 profile main to the config
...
Thus enabling the AV1 support
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307 >
2021-08-13 09:24:01 -04:00
Leo Liu
4ce6100215
frontends/va: Place AV1 picture and slice parameter buffers functions
...
So that can pass the parameters from application to driver.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307 >
2021-08-13 09:24:01 -04:00
Leo Liu
9cc4c1d8f8
frontends/va: Add AV1 parameter buffers functions
...
Includes picture parameter and slice parameter buffers.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307 >
2021-08-13 09:24:01 -04:00
Leo Liu
0a421ff9a4
frontends/va: Add AV1 picture description
...
Driver will get codec parameters for hardware from it.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307 >
2021-08-13 09:24:01 -04:00
Italo Nicola
608949f199
virgl/ci: switch glmark2 traces from .rdc to .trace
...
Lately we've been experiencing some flakes with glmark2 renderdoc traces
on CI, this patch makes traces-virgl.yml use apitraces instead.
Hopefully this helps with reducing the flakes.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12354 >
2021-08-13 12:44:47 +00:00
Michel Zou
e4c0a34bfe
radv: fix build with mingw
...
Cc: 21.2 mesa-stable
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes #5092
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12178 >
2021-08-13 12:13:21 +02:00
Connor Abbott
277ac9c30f
freedreno, tu: Set GRAS_LRZ_PS_INPUT_CNTL::SAMPLEID
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12340 >
2021-08-13 08:58:56 +00:00
Connor Abbott
70e620437c
freedreno, tu: Stop asking for foveation quality
...
We were setting it to r0.x.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12340 >
2021-08-13 08:58:56 +00:00
Connor Abbott
2b134a8c0c
freedreno/a6xx: Add new register fields
...
Also use them in drivers and delete some comments that are now
irrelevant.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12340 >
2021-08-13 08:58:56 +00:00
Lionel Landwerlin
19b7bbba73
anv/android: handle image bindings from gralloc buffers
...
When creating an image out of a swapchain on Android, the android
layer call will detect a VkBindImageMemorySwapchainInfoKHR in the
pNext chain of the vkBindImageMemory2() call and add a
VkNativeBufferANDROID in the chain. This is what we should use as
backing memory for that image.
v2: Fix a couple of obvious mistakes (Tapani)
v3: Silence build warning (Lionel)
Fix invalid object argument to vk_error() (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: bc3c71b87a ("anv: don't try to access Android swapchains")
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5180
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12244 >
2021-08-13 08:30:25 +00:00
Vinson Lee
8d679f4f4e
nir: Initialize evaluate_cube_face_index_amd dst.x.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value dst.x.
Fixes: a1a2a8dfda ("nir: add AMD_gcn_shader extended instructions")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12290 >
2021-08-12 23:13:52 -07:00
Vinson Lee
c0fc745b78
meson: Remove duplicate xvmc in build summary.
...
Fixes: d30ce03bc0 ("meson: add build-summary")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12296 >
2021-08-12 20:51:13 +00:00
Axel Davy
6a0e703512
util: Fix translate from block compressed to rgba
...
Since
2b5178ee util: Switch the non-block formats to unpacking rgba rows instead of rects,
compressed formats define unpack_rgba_8unorm_rect instead
of unpack_rgba_8unorm.
Fixes the u_format_translate check to take this into account.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5201
Fixes: 2b5178ee ("util: Switch the non-block formats to unpacking rgba rows instead of rects")
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12315 >
2021-08-12 20:30:42 +00:00
Kenneth Graunke
cca5120772
iris: Stop using SET_DOMAIN on discrete GPUs altogether
...
SET_DOMAIN is definitely not going to be allowed on discrete GPUs,
so don't even bother trying it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 >
2021-08-12 15:07:33 -05:00
Kenneth Graunke
8fe5152b72
iris: Allow SET_DOMAIN to fail when allocating new GEM objects
...
We're just using this as a minor optimization to allocate pages for
buffers up front outside of some kernel locking. It's not essential.
The SET_DOMAIN ioctl may be going away in the future, so let's be a
bit cautious and try it but not fail.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 >
2021-08-12 15:07:33 -05:00
Kenneth Graunke
468c3c83b4
iris: Use the new I915_USERPTR_PROBE API
...
We need to raise an error when importing a user pointer as a BO if the
supplied pointer can't actually be used on the GPU. Previously, we were
(ab)using the SET_DOMAIN ioctl for this, but it's not really intended
for that purpose, and is going away on discrete.
Fortunately, there's a new kernel API for this: the I915_USERPTR_PROBE
flag tries to perform basic sanity checking of the supplied pointer so
that we can at least reject obvious misuse of this API up front.
Use the new API where available. Fall back to SET_DOMAIN if it isn't.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 >
2021-08-12 15:07:33 -05:00
Jason Ekstrand
b8e2214ee5
anv: Use I915_USERPTR_PROBE when available
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044 >
2021-08-12 15:07:23 -05:00
Jason Ekstrand
9feb57a85e
iris: Use I915_MMAP_OFFSET_FIXED for LMEM platforms
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Jason Ekstrand
188cddfb38
iris: Add a new IRIS_MMAP_NONE map type
...
This indicates that the buffer can never be mapped. We use this
primarily for imported BOs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Kenneth Graunke
e83da2d8e3
iris: Don't try to CPU read imported clear color BOs
...
Previously, when importing a resource with modifiers that include
clear color as auxiliary data, we were mapping the clear color BO
on the CPU in order to set res->aux.clear_color to the value stored
there.
We are generally trying to avoid CPU mapping imported buffers, because
in hybrid setups, they could be from a different device, and may not be
mappable. So we'd like to avoid that here.
This CPU-side knowledge of the clear color is only used in a few cases:
1. Avoiding a resolve due to a partial clear with a changing clear color
2. Avoiding disabling CCS when rendering to a texture view of a resource
where the only format difference is sRGB vs. linear and the clear
color is 0/1.
Instead of mapping the clear color BO on the CPU, we instead set a flag
indicating that we don't know the clear color, and reset it to known on
our first clear.
In the first case, the first partial fast clear of a resource would eat
an extra resolve (there is no penalty if we clear the whole resource).
The second case doesn't seem that critical, as it's someone rendering
to an imported BO - when the common case is to texture from it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Jason Ekstrand
373f0d6acc
iris: Add an assert to iris_bo_gem_mmap_legacy()
...
It only supports two caching modes so we should assert that the only
mode we ever see is one of them.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Jason Ekstrand
24031700a7
iris: Use a tiny table to map mmap modes to offsets
...
This is a little more obvious than the if-ladder.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Jason Ekstrand
c49041c9d7
iris: SMEM buffers on discrete platforms are coherent
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Jason Ekstrand
512fa2f4da
anv: Use I915_MMAP_OFFSET_FIXED for LMEM platforms
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Jason Ekstrand
54e4a36c3a
include/drm-uapi: Bump headers
...
From drm-next at the following commit:
commit a22c074fd1dd52a8b41dd6789220409b64093e9c
Merge: cb22f12f3025 3bfa7d40ce73
Author: Dave Airlie <airlied@redhat.com >
Date: Thu Aug 12 11:20:16 2021 +1000
Merge tag 'drm-intel-next-2021-08-10-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888 >
2021-08-12 19:29:59 +00:00
Alyssa Rosenzweig
96643a8ba0
docs/panfrost: Update llvm option
...
meson complains that =false is deprecated and that we should use
=disabled instead.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12344 >
2021-08-12 19:22:21 +00:00
Rhys Perry
c14a85e756
radv: enable DCC with signedness reinterpretation
...
It seems we can enable DCC if the possible formats differ in signedness
and are otherwise compatible. We just need a fast-clear eliminate for
certain clear colors.
Improves Trine 4 performance.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9387 >
2021-08-12 17:14:00 +01:00
Italo Nicola
688d11e4e8
ci: skip minio login if PIGLIT_REPLAY_UPLOAD_TO_MINIO is not set
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12309 >
2021-08-12 13:24:24 +00:00
Juan A. Suarez Romero
2a86d51960
broadcom/compiler: set current block on incrementing unifa
...
When incrementing unifa address in DCE optimization, ensure that we
setup correctly the current block, so the ldfunif optimization is also
executed correctly.
This fixes
dEQP-VK.graphicsfuzz.cov-struct-float-array-mix-uniform-vectors
heap-buffer overflow with address sanitizer enabled.
v2 (Iago):
- Save and restore current block
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12339 >
2021-08-12 12:33:46 +00:00
Iago Toral Quiroga
0df9112692
v3dv: add API entry points for sampler Ycbcr conversions
...
While this feature is optional in Vulkan 1.1 and we don't currently
expose it, the CTS still requires that the entry points exist.
From the Vulkan 1.1 spec:
"If the VK_KHR_sampler_ycbcr_conversion extension is not supported,
support for the samplerYcbcrConversion feature is optional."
(...)
"samplerYcbcrConversion specifies whether the implementation supports
sampler YCBCR conversion. If samplerYcbcrConversion is VK_FALSE,
sampler YCBCR conversion is not supported, and samplers using sampler
YCBCR conversion must not be used."
Fixes (with Vulkan 1.1 exposed):
dEQP-VK.api.version_check.entry_points
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12338 >
2021-08-12 10:20:54 +00:00
Iago Toral Quiroga
ede320fa90
v3dv: don't try to access pColorBlendState if rasterization is disabled
...
Fixes:
dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12337 >
2021-08-12 10:05:02 +00:00
Pierre-Eric Pelloux-Prayer
777de86eb1
radeonsi/test: add Sienna Cichlid expected results
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12306 >
2021-08-12 11:47:36 +02:00
Pierre-Eric Pelloux-Prayer
a92367209f
radeonsi/test: prettier output
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12306 >
2021-08-12 11:47:36 +02:00
Pierre-Eric Pelloux-Prayer
66709f1a40
radeonsi/test: allow to pass a filename as a test filter value
...
This allows this pattern:
$ radeonsi-run-tests.py /tmp/foo
... reports that some piglit tests regressed ...
$ radeonsi-run-tests.py -t /tmp/foo/new_baseline/sienna_cichlid-piglit-quick-fail.csv
... this only runs the test that regressed ...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12306 >
2021-08-12 11:47:36 +02:00
Pierre-Eric Pelloux-Prayer
55a40acd61
radeonsi/test: format radeonsi-run-test.py with black
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12306 >
2021-08-12 11:47:36 +02:00
Pierre-Eric Pelloux-Prayer
ac321c6fcf
radeonsi/test: fix test script args handling
...
Fixes: 20055a307d ("radeonsi: add -t option to the test script")
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12306 >
2021-08-12 11:47:36 +02:00
Danylo Piliaiev
fd62e0b799
tu: enable VK_EXT_extended_dynamic_state2
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10434 >
2021-08-12 08:01:30 +00:00
Danylo Piliaiev
9586cacdcb
tu: implement dynamic rasterizer discard enable
...
The state which could be omitted with rasterization discard
enabled - is unconditionally emitted when discard is a dynamic
state. It's not an optimal way, but does not intruduce much complexity.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10434 >
2021-08-12 08:01:30 +00:00
Danylo Piliaiev
4f0a7dbdea
tu: implement dynamic primitive restart enable
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10434 >
2021-08-12 08:01:30 +00:00
Danylo Piliaiev
0b8ed9b55c
tu: implement dynamic depth bias enable
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10434 >
2021-08-12 08:01:30 +00:00
Danylo Piliaiev
804f1b5664
tu: declare VK_EXT_extended_dynamic_state2 but leave it disabled
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10434 >
2021-08-12 08:01:30 +00:00
Roland Scheidegger
513fb5438b
aux/cso: try harder to keep cso state in sync on cso context unbind
...
Before a73cb106a6 , cso contexts were never reused, but now that they
are we need to be extra careful that the state in the cso context and
in the pipe context matches even after an unbind, since when the cso
context is reused the state might otherwise get out of sync (as there is
no concept of "initial state", basically cso always relied on the default
values being the same both in cso and the drivers).
This fixes some errors we've seen internally with lavapipe.
Fixes: a73cb106a6 ("aux/cso: split cso_destroy_context into unbind and a destroy functions")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12261 >
2021-08-12 01:57:34 +00:00
Hyunjun Ko
4b8f4bae01
tu: allow dynamic primitive topology with tessellation
...
This allows to set VK_PRIMITIVE_TOPOLOGY_PATCH_LIST dynamically when
tessellation used.
If other values are set via vkCmdSetPrimitiveTopologyEXT for the case,
the validation layer can detect the issue.
Fixes dEQP-VK.pipeline.extended_dynamic_state.*.topology_patch*
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12299 >
2021-08-12 01:37:01 +00:00
Jason Ekstrand
0bbc3afb9a
ci: Build ANV on Android
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5211
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Jason Ekstrand
f3aabe068c
anv/android: Drop unused device variables
...
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Jason Ekstrand
16a9cf6915
anv/android: Pass the correct pointer type to vk_errorf
...
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Jason Ekstrand
279fe1ae6d
intel/perf: Use a char array for OA perf query data
...
drm_i915_query_perf_config::data is an unsized array and declaring a
struct containing an unsized array that isn't at the end is a GNU
extension which trips up Android builds. Instead, stuff both into a
char array of the appropriate size. This emulates what you'd normally
do to allocate one of these with malloc only on the stack.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Jason Ekstrand
c858d30833
intel/vec4: Don't override emit_urb_write_opcode for SNB GS
...
The gfx6_gs_visitor overrides emit_urb_write_opcode but with a different
function signature. This causes warnings with -Woverloaded-virtual.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Jason Ekstrand
a4d1ae7017
meson/glsl: Only run GLSL tests if can_run_host_binaries()
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Jason Ekstrand
dd88fb33fe
meson: Intel drivers don't require expat on Android
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Jason Ekstrand
ce1a66fe3e
meson/intel: Don't build genxml tests on Android
...
They require expat which we don't have on Android.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308 >
2021-08-11 23:57:52 +00:00
Ilia Mirkin
fdc5138256
st/mesa: fix pbo download store image type
...
There's generally not too big of a difference between 1D (default) and
buffer, but can't hurt to be accurate.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12319 >
2021-08-11 23:32:39 +00:00
Paulo Zanoni
03d17461f3
iris: use add_bo_to_batch() when adding batch->bo
...
Again, we don't need all the dependency checking, seqno incrementing
and duplicate tracking for batch->bo. Just use the unchecked version.
This commit is not particularly significant since it really just saves
us a check in the iris_use_pinned_bo() hot path, but since we already
have the helper function, why not?
v2:
- (turns out the answer to "why not?" is because the patch had a bug)
- Call ensure_exec_obj_space() since batch batch chaining can happen
and doesn't guarantee pre-reserved space (Ken).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12194 >
2021-08-11 15:04:52 -07:00
Paulo Zanoni
155a7a9b0f
iris: add the workaround_bo directly to the batch
...
Don't use iris_use_pinned_bo(), go directly with add_bo_to_batch(),
skipping every check. This allows us to early return from
iris_use_pinned_bo when the workaround bo is used, saving us the call
to find_validation_entry() which ends up doing nothing except
iterating over every bo in the batch. Also don't bother with
ensure_exec_obj_space() since we just reset the batch and this is the
second BO we're adding to it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12194 >
2021-08-11 15:04:52 -07:00
Paulo Zanoni
d07fa0ef60
iris: extract the code that adds BOs to the batch lists
...
We want to add a new caller, so extract this first.
v2: kflags can never contain EXEC_OBJECT_WRITE (Ken).
v3: Rebase after s/gtt_offset/address/.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12194 >
2021-08-11 15:04:52 -07:00
Paulo Zanoni
805c5dcd59
iris: assign bo->index to the aux map BOs too
...
I don't see these BOs being searched for in the benchmarks I tested so
I don't think this should improve anything. On the other hand, it
shouldn't hurt either since it's just an extra assignment.
I want to unify both places where we have this code into a single
function and the lack of the bo->index assignment was the only
difference between the two places. So first we make both functions the
same and in the next commit we'll unify things. This should make
bisecting easier in case I'm wrong.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12194 >
2021-08-11 15:04:52 -07:00
Paulo Zanoni
f7102bed69
iris: don't bump the seqno for the workaround_bo
...
The last_seqnos list is used by iris_emit_buffer_barrier_for() and as
far as I can understand we don't emit barriers for the workaround bo,
so don't even bother doing the atomic operations required to bump the
workaround_bo seqno list.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12194 >
2021-08-11 15:04:52 -07:00
Eric Engestrom
89c22ef230
docs: update calendar and link releases notes for 21.1.7
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12331 >
2021-08-11 21:16:24 +00:00
Eric Engestrom
d6cfc97156
docs: add release notes for 21.1.7
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12331 >
2021-08-11 21:16:24 +00:00
Dave Airlie
8a81d14271
intel/vec4: sel.cond writes the flags on Gfx4 and Gfx5
...
This is the equivalent of idr's
intel/fs: sel.cond writes the flags on Gfx4 and Gfx5
except for the vec4 backend.
This fixes buggy rendering seen with crocus on a qt trace.
v2 (idr): Trivial whitespace change. Add unit tests.
v3: Fix type in comment in unit tests. Noticed by Jason and Priit.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Iron Lake
total instructions in shared programs: 8183077 -> 8184543 (0.02%)
instructions in affected programs: 198990 -> 200456 (0.74%)
helped: 0
HURT: 1355
HURT stats (abs) min: 1 max: 8 x̄: 1.08 x̃: 1
HURT stats (rel) min: 0.29% max: 6.00% x̄: 0.99% x̃: 0.70%
95% mean confidence interval for instructions value: 1.04 1.12
95% mean confidence interval for instructions %-change: 0.96% 1.03%
Instructions are HURT.
total cycles in shared programs: 238967672 -> 238962784 (<.01%)
cycles in affected programs: 4666014 -> 4661126 (-0.10%)
helped: 406
HURT: 314
helped stats (abs) min: 4 max: 54 x̄: 22.46 x̃: 18
helped stats (rel) min: <.01% max: 12.80% x̄: 1.82% x̃: 0.65%
HURT stats (abs) min: 2 max: 112 x̄: 13.48 x̃: 12
HURT stats (rel) min: <.01% max: 7.82% x̄: 0.81% x̃: 0.16%
95% mean confidence interval for cycles value: -8.60 -4.98
95% mean confidence interval for cycles %-change: -0.87% -0.49%
Cycles are helped.
GM45
total instructions in shared programs: 4986888 -> 4988354 (0.03%)
instructions in affected programs: 198990 -> 200456 (0.74%)
helped: 0
HURT: 1355
HURT stats (abs) min: 1 max: 8 x̄: 1.08 x̃: 1
HURT stats (rel) min: 0.29% max: 6.00% x̄: 0.99% x̃: 0.70%
95% mean confidence interval for instructions value: 1.04 1.12
95% mean confidence interval for instructions %-change: 0.96% 1.03%
Instructions are HURT.
total cycles in shared programs: 153577826 -> 153572938 (<.01%)
cycles in affected programs: 4666014 -> 4661126 (-0.10%)
helped: 406
HURT: 314
helped stats (abs) min: 4 max: 54 x̄: 22.46 x̃: 18
helped stats (rel) min: <.01% max: 12.80% x̄: 1.82% x̃: 0.65%
HURT stats (abs) min: 2 max: 112 x̄: 13.48 x̃: 12
HURT stats (rel) min: <.01% max: 7.82% x̄: 0.81% x̃: 0.16%
95% mean confidence interval for cycles value: -8.60 -4.98
95% mean confidence interval for cycles %-change: -0.87% -0.49%
Cycles are helped.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12191 >
2021-08-11 13:09:32 -07:00
Ian Romanick
38807ceeae
intel/fs: sel.cond writes the flags on Gfx4 and Gfx5
...
On Gfx4 and Gfx5, sel.l (for min) and sel.ge (for max) are implemented
using a separte cmpn and sel instruction. This lowering occurs in
fs_vistor::lower_minmax which is called very, very late... a long, long
time after the first calls to opt_cmod_propagation. As a result,
conditional modifiers can be incorrectly propagated across sel.cond on
those platforms.
No tests were affected by this change, and I find that quite shocking.
After just changing flags_written(), all of the atan tests started
failing on ILK. That required the change in cmod_propagatin (and the
addition of the prop_across_into_sel_gfx5 unit test).
Shader-db results for ILK and GM45 are below. I looked at a couple
before and after shaders... and every case that I looked at had
experienced incorrect cmod propagation. This affected a LOT of apps!
Euro Truck Simulator 2, The Talos Principle, Serious Sam 3, Sanctum 2,
Gang Beasts, and on and on... :(
I discovered this bug while working on a couple new optimization
passes. One of the passes attempts to remove condition modifiers that
are never used. The pass made no progress except on ILK and GM45.
After investigating a couple of the affected shaders, I noticed that
the code in those shaders looked wrong... investigation led to this
cause.
v2: Trivial changes in the unit tests.
v3: Fix type in comment in unit tests. Noticed by Jason and Priit.
v4: Tweak handling of BRW_OPCODE_SEL special case. Suggested by Jason.
Fixes: df1aec763e ("i965/fs: Define methods to calculate the flag subset read or written by an fs_inst.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Tested-by: Dave Airlie <airlied@redhat.com >
Iron Lake
total instructions in shared programs: 8180493 -> 8181781 (0.02%)
instructions in affected programs: 541796 -> 543084 (0.24%)
helped: 28
HURT: 1158
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.35% max: 0.86% x̄: 0.53% x̃: 0.50%
HURT stats (abs) min: 1 max: 3 x̄: 1.14 x̃: 1
HURT stats (rel) min: 0.12% max: 4.00% x̄: 0.37% x̃: 0.23%
95% mean confidence interval for instructions value: 1.06 1.11
95% mean confidence interval for instructions %-change: 0.31% 0.38%
Instructions are HURT.
total cycles in shared programs: 239420470 -> 239421690 (<.01%)
cycles in affected programs: 2925992 -> 2927212 (0.04%)
helped: 49
HURT: 157
helped stats (abs) min: 2 max: 284 x̄: 62.69 x̃: 70
helped stats (rel) min: 0.04% max: 6.20% x̄: 1.68% x̃: 1.96%
HURT stats (abs) min: 2 max: 48 x̄: 27.34 x̃: 24
HURT stats (rel) min: 0.02% max: 2.91% x̄: 0.31% x̃: 0.20%
95% mean confidence interval for cycles value: -0.80 12.64
95% mean confidence interval for cycles %-change: -0.31% <.01%
Inconclusive result (value mean confidence interval includes 0).
GM45
total instructions in shared programs: 4985517 -> 4986207 (0.01%)
instructions in affected programs: 306935 -> 307625 (0.22%)
helped: 14
HURT: 625
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.35% max: 0.82% x̄: 0.52% x̃: 0.49%
HURT stats (abs) min: 1 max: 3 x̄: 1.13 x̃: 1
HURT stats (rel) min: 0.12% max: 3.90% x̄: 0.34% x̃: 0.22%
95% mean confidence interval for instructions value: 1.04 1.12
95% mean confidence interval for instructions %-change: 0.29% 0.36%
Instructions are HURT.
total cycles in shared programs: 153827268 -> 153828052 (<.01%)
cycles in affected programs: 1669290 -> 1670074 (0.05%)
helped: 24
HURT: 84
helped stats (abs) min: 2 max: 232 x̄: 64.33 x̃: 67
helped stats (rel) min: 0.04% max: 4.62% x̄: 1.60% x̃: 1.94%
HURT stats (abs) min: 2 max: 48 x̄: 27.71 x̃: 24
HURT stats (rel) min: 0.02% max: 2.66% x̄: 0.34% x̃: 0.14%
95% mean confidence interval for cycles value: -1.94 16.46
95% mean confidence interval for cycles %-change: -0.29% 0.11%
Inconclusive result (value mean confidence interval includes 0).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12191 >
2021-08-11 13:09:20 -07:00
Dave Airlie
593ad9294b
crocus: align staging resource pitch on gen4/5 to allow BLT usage.
...
Aligning the pitch to 4 bytes allows the BLT engine to be used for
transfers to/from these surfaces.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12329 >
2021-08-11 19:21:01 +00:00
Dave Airlie
58e95f99bd
crocus/blt: add pitch/offset checks to fix blt corruption
...
I lost these in my conversion from i965 but they are necessary.
This should fix corruption in qt fonts at seen in the minecraft
launcher.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12329 >
2021-08-11 19:21:01 +00:00
Alyssa Rosenzweig
cb2e712b9e
pan/bi: Unit test DISCARD+FCMP fusing
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:26 -04:00
Alyssa Rosenzweig
d74ab1e4d9
pan/bi: Fuse DISCARD with conditions
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:26 -04:00
Alyssa Rosenzweig
4f347e96b8
pan/bi: Add fclamp unit tests
...
The negative cases here did not pass before this series, showing the bug
in the clamp optimization. By introducing the FCLAMP pseudo op, the bug
is fixed. Let's ensure we don't regress.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:26 -04:00
Alyssa Rosenzweig
ac636f5adb
pan/bi: Use FCLAMP pseudo op for clamp prop
...
Map nir_op_fsat/etc to FCLAMP pseudo ops, instead of FADD. There are
significantly fewer knobs on FCLAMP, meaning significantly fewer things
to get wrong.
This fixes two(!) classes of bugs:
* Swizzles (failing to lower/compose swizzles on clamps)
* Numerical bugs (incorrectly treating +0.0 as an additive identity)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:26 -04:00
Alyssa Rosenzweig
a98790fa96
pan/bi: Add optimizer unit tests
...
Writing these tests brought to light the cluster of bugs fixed in the
previous commits. Now that things work, let's ensure they stay working.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:26 -04:00
Alyssa Rosenzweig
89e452883a
pan/bi: Use FABSNEG pseudo ops for modifier prop
...
Simplifies pattern matching. This commit by itself fixes multiple
numerical issues -- the previous fabsneg check failed to check the round
mode or the sign of the zero. That will break Vulkan/OpenCL.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:26 -04:00
Alyssa Rosenzweig
b2b0dca4ce
pan/bi: Add shader equality helper for unit tests
...
Optimizer tests really are global.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:26 -04:00
Alyssa Rosenzweig
f3d8ec1484
pan/bi: Fuse abs/neg more on Valhall
...
Some of these Bifrost restrictions may be skipped on Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:25 -04:00
Alyssa Rosenzweig
c27af4ad36
pan/bi: Simplify bi_compose_clamp
...
Realized this trick when reversing Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:25 -04:00
Alyssa Rosenzweig
cfd73b4542
pan/bi: Unit test new constant folding patterns
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:25 -04:00
Alyssa Rosenzweig
ec76119dfb
pan/bi: Constant fold texturing lowerings
...
This ensures we can constant fold the ALU ops used to lower:
* explicit LOD calculations
* array textures
* texture offsets
* multisample indices
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:59:24 -04:00
Alyssa Rosenzweig
6fa1479479
pan/va: Document IEEE 754 conformance of clamps
...
These rules are not obvious. But they turn out to be exactly what's
required by the spec.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12205 >
2021-08-11 14:58:58 -04:00
Alyssa Rosenzweig
cdfb5d3788
panfrost: Test src*dst + dst*src blending
...
Validates the prior commit.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152 >
2021-08-11 18:15:52 +00:00
Alyssa Rosenzweig
0228ccf857
panfrost: Leverage Bifrost's 2*src blend factor
...
Bifrost adds a value for the C factor equaling 2*src. This does not
correspond directly to API blend modes so it is not too useful in
general. However, it's required for src*dest + dest*src blending to be
done in hardware instead of a blend shader. GFXbench uses that blend
mode, so it must be important ;-)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152 >
2021-08-11 18:15:52 +00:00
Alyssa Rosenzweig
95e306dc84
panfrost: Add basic fixed-function blending tests
...
Add unit tests for the fixed-function blending helpers in pan_blend.c.
Each test consists of a Porter-Duff blend mode and the associated
hardware state. In this commit, we add tests for the most common modes.
For motivation, this code has NOT been properly tested in CI. True,
functional correctness of the blend module as a whole is tested by
dEQP-GLES3.functional.fragment_ops.blend.* among other integration
tests. However, this testing is insufficient to check for regressions.
Crucially, the following broken patch would clear CI:
bool pan_can_fixed_function(...) {
return false;
}
In that case, blend shaders are used 100% of the time, which will
regress performance horribly but still pass dEQP. The only clue
something went wrong would be some traces changing checksum due to the
fixed-function blender producing slightly different output than
equivalent blend shaders. By unit testing the fixed blend path, we
ensure we always use the fixed-function path when we expect it to.
Similarly, using incorrect values for the blend metadata may not affect
functional correctness but will increase power consumption. Let's check
all the data we export to drivers.
Note: due to additive commutativity, there are many pairs of equivalent
Mali blend modes. Unfortunately, the vendor is... inconsistent about how
to resolve ambiguous modes. Our algorithm for computing modes is
correct; the "preferred" values are left in comments since otherwise our
tests fail despite correct code. I want to blame Bifrost for this, but
Midgard was patient zero.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152 >
2021-08-11 18:15:52 +00:00
Alyssa Rosenzweig
95187c03f1
panfrost: Simplify blend_factor_constant_mask
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152 >
2021-08-11 18:15:52 +00:00
Alyssa Rosenzweig
01a1b253b4
panfrost: Fix is_opaque when blend_enable=false
...
Needed to pass the "replace" unit test.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152 >
2021-08-11 18:15:52 +00:00
Alyssa Rosenzweig
b7af56f2ad
panfrost: Add blend helper packing the equation
...
This is more convenient for the Gallium driver and easier to test.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152 >
2021-08-11 18:15:52 +00:00
Alyssa Rosenzweig
7eb2559198
panfrost: Use _PU for non-dithered formats
...
This is required to disable dithering on a per-draw basis when OPAQUE
output is used (bypassing the blender which normally uses the
round_to_framebuffer_precision flag to do the same).
This functionally reverts:
ebc07f4b2f ("panfrost: Remove padded unorm blendable formats")
fae90a7940 ("panfrost: Always pick dithered tb formats")
while adding the functionality to make them useful.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152 >
2021-08-11 18:15:52 +00:00
Alyssa Rosenzweig
07607c8443
panfrost: Remove unused #defines
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12328 >
2021-08-11 18:00:45 +00:00
Alyssa Rosenzweig
3ec5e2b6a7
panfrost: Add LINEAR debug option
...
Useful to cross off CPU texture tiling as the source of bugs.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12328 >
2021-08-11 18:00:45 +00:00
Alyssa Rosenzweig
3958f00215
pan/bi: Add a noopt debug option
...
To rule out buggy optimization passes when debugging.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12328 >
2021-08-11 18:00:45 +00:00
Alyssa Rosenzweig
ff03f096bf
pan/bi: Make bi_opt_push_ubo optional
...
It's an optimization pass -- omitting it should not cause MMU faults
(!). Make sure the UBO push mask is set regardless of whether the pass
is called, and just call the pass when required.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12328 >
2021-08-11 18:00:45 +00:00
Lionel Landwerlin
01b0935d31
nir/lower_shader_calls: remove empty phis
...
This is confusing opt_cse.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 8dfb240b1f ("nir: Add raytracing shader call lowering pass.")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11953 >
2021-08-11 15:10:07 +03:00
Marcin Ślusarz
a1b7a5fad6
zink: use nir_shader_instructions_pass in nir_lower_dynamic_bo_access
...
Changes:
- nir_metadata_preserve(..., nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
50cb70d38a
zink: use nir_shader_instructions_pass in lower_discard_if
...
Changes:
- nir_metadata_preserve(..., nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
65f9234f96
microsoft/compiler: use nir_shader_instructions_pass in dxil_nir_lower_double_math
...
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
b8de41902e
microsoft/compiler: use nir_shader_instructions_pass in dxil_nir_split_clip_cull_distance
...
No functional changes.
v2: fix build
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
9aafb91f0e
microsoft/compiler: preserve all metadata when upcast_phi doesn't make progress
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
17a61ec541
microsoft/clc: use nir_shader_instructions_pass in clc_nir_dedupe_const_samplers
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
v2: fix build
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
70723f278f
microsoft/clc: preserve only valid metadata in clc_lower_printf_base
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
4d81226102
d3d12: use nir_metadata_none instead of its value
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
7810ca596c
intel/compiler: use nir_shader_instructions_pass in brw_nir_apply_attribute_workarounds
...
Changes:
- removal of attr_wa_state (it's passed directly)
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Marcin Ślusarz
e1b325f587
nir/builder: invalidate metadata per function
...
Fixes: a62098fff2 ("nir: Add a helper for general instruction-modifying passes.")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12324 >
2021-08-11 11:23:30 +00:00
Danylo Piliaiev
a57bcc4394
freedreno/decode: print estimated crash location without colored output
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12302 >
2021-08-11 09:24:19 +00:00
Pierre-Eric Pelloux-Prayer
7684d57a05
nir: add a pass to optimize "gl_FragDepth = gl_FragCoord.z" away
...
gl_FragDepth default value is gl_FragCoord.z so if a shader does:
gl_FragDepth = gl_FragCoord.z
we can drop this assignment.
v2: use nir_ssa_scalar_resolved and don't do this is gl_FragDepth
is wrote multiple times (Jason)
v3: - move to its own pass (Jason)
- handle var = NULL (Rhys)
v4: refactoring (Jason)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10697 >
2021-08-11 11:00:11 +02:00
Kenneth Graunke
a6176881a6
iris: Drop dead drm_ioctl prototype
...
We now use intel_ioctl instead.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12206 >
2021-08-11 08:05:00 +00:00
Kenneth Graunke
0707a1d842
iris: Improve the memory layout of iris_bo by fixing pahole issues
...
We had a 4 byte hole and a 4-byte field breaking up a run of bools.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12206 >
2021-08-11 08:05:00 +00:00
Kenneth Graunke
2616e15c01
iris: Rename bo->gtt_offset to bo->address
...
This is the virtual memory address of the buffer object. Calling it the
BO's address is a lot more obvious than calling it an offset in one of
the now many graphics translation tables.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12206 >
2021-08-11 08:05:00 +00:00
Iago Toral Quiroga
c964e5f099
v3d,v3dv: add options to force 32-bit or 16-bit TMU precision
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12303 >
2021-08-11 05:57:10 +00:00
Tapani Pälli
ff669ea93b
anv/android: fix build error due refactoring
...
Fixes: e08370dc37 ("anv: disable aux for exportable images without modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5208
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12300 >
2021-08-11 04:54:05 +00:00
Dave Airlie
c16f7e2a19
docs: add llvmpipe host memory extensions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12316 >
2021-08-11 10:06:22 +10:00
Dave Airlie
c198adf718
lavapipe: add host ptr support.
...
This actually doesn't need any backend support.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12316 >
2021-08-11 09:58:17 +10:00
Dave Airlie
9a57dceeb7
llvmpipe: add support for user memory pointers
...
This is useful for clover, but throw it at CI at least
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12316 >
2021-08-11 09:58:17 +10:00
Icecream95
ee2bb57f1e
pan/bi: Use the computed scale for fexp NaN propagation
...
This makes pow(NaN, x) return NaN rather than 1.0.
Fixes: 499397700c ("pan/bi: Don't lower fpow")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5189
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12269 >
2021-08-10 22:42:08 +00:00
Ian Romanick
84d2e53789
Revert "nir/algebraic: Convert some f2u to f2i"
...
Per https://gitlab.freedesktop.org/mesa/mesa/-/issues/5178#note_1019666 ,
the assumption fundamental to this optimization is false. Section
2.4.1 (Float to Integer) of Ivy Bridge PRMs describes the situation.
The wording of the section is somewhat confusing (because it doesn't
clearly delineate between signed and unsigned integers), but the last
two rows of the table make it clear that F->UD conversion clamps
negative float values to 0.
All other hardware mentioned in that thread seems to behave the same
way.
The real problem is that, with hardware that behaves in this ways,
converting f2u(2147483648.0) to f2i(2147483648.0) changes the bit pattern
that would be produced from 0x80000000 to 0x7fffffff.
This reverts commit ad05920258 .
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12297 >
2021-08-10 22:16:13 +00:00
Ian Romanick
3ba66ebbc8
nir/opcodes: Use u_intN_(min|max)
...
uadd_sat was updated using sed, so I didn't even notice the surrounding
opcodes. Oops.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12297 >
2021-08-10 22:16:13 +00:00
Dave Airlie
7fb9e78d09
clover: only return CLC version as 1.2 (even for 3.0)
...
Fixes CTS compiler opencl_c_versions
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12286 >
2021-08-10 21:38:39 +00:00
Dave Airlie
e78d5bb8e2
clover/nir: don't convert to NIR on library link
...
If just creating a library, just link the spir-v and store it.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12286 >
2021-08-10 21:38:39 +00:00
Dave Airlie
6cc1568ff5
clover: fix compilation with clang + llvm 12.
...
clang in llvm 12 no longer accepts "-cl-denorms-are-zero" as a cc1
options which is how this code uses it.
For now just pick the correct cc1 equivalent.
This fixes a crash with llvm master and CL conversions tests
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12286 >
2021-08-10 21:38:39 +00:00
Eric Engestrom
4128acdee3
pick-ui: show commit date
...
With our ff-only merge setup, the commit date ends up being when the
commit actually landed (as opposed to when it was first written).
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12289 >
2021-08-10 21:36:43 +00:00
Eric Engestrom
7ec42b5eda
pick-ui: show nomination type in the UI
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12289 >
2021-08-10 21:36:43 +00:00
Eric Engestrom
db14f2a932
pick-ui: drop assert that optional argument is passed
...
Let's just make it not-optional instead.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12289 >
2021-08-10 21:36:43 +00:00
Rob Clark
a79ac1bee1
freedreno: Use correct key for binning pass shader
...
We updated the key correctly for whether we wanted to use a
safe_constlen binning pass variant, but then passed the wrong
key to ir3_shader_variant().
Fixes: 1dd24bf27b ("freedreno: Share constlen between different stages properly")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12314 >
2021-08-10 21:17:17 +00:00
Alyssa Rosenzweig
9b57a81815
nir/lower_mediump: Fix metadata in all passes
...
Fixes: fb29cef8dd ("nir: add many passes that lower and optimize 16-bit input/outputs and samplers")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11732 >
2021-08-10 20:55:33 +00:00
Alyssa Rosenzweig
03c18f7efc
nir/lower_mediump_io: Don't remap base unless needed
...
Otherwise drivers that don't use 16-bit slots for varyings will get
confused and have their driver_locations scribbled over. This has caused
multiple problems for both Panfrost and Asahi this week. Given the only
other user of the pass for varyings is radeonsi, which needs both
together, I think this is the least controversial fix.
Fixes: fb29cef8dd ("nir: add many passes that lower and optimize 16-bit input/outputs and samplers")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11732 >
2021-08-10 20:55:33 +00:00
Danylo Piliaiev
4f9ac2f737
tu: add "flushall" and "syncdraw" debug options
...
They will be useful to check whether some issue is due to the lack
of flushing or waiting.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12283 >
2021-08-10 20:08:58 +00:00
Mike Blumenkrantz
03ddffd19f
nine: init more draw info members
...
Reviewed-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12284 >
2021-08-10 19:43:50 +00:00
Mike Blumenkrantz
c361658670
nine: init take_index_buffer_ownership for draws
...
Reviewed-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12284 >
2021-08-10 19:43:50 +00:00
Jesse Natalie
0dd0a92b24
u_driconf: Use a macro to avoid repeating option names
...
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12158 >
2021-08-10 15:14:26 +00:00
Jesse Natalie
b3f9b347f9
wgl: Add a driver name for driconf
...
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12158 >
2021-08-10 15:14:26 +00:00
Jesse Natalie
35ec7e8b8e
wgl: Parse driconf options
...
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12158 >
2021-08-10 15:14:26 +00:00
Jesse Natalie
68ff6f8be5
xmlconfig: Use static inline for regex fallback to prevent -O0 issues
...
A non-static inline function body is only actually emitted by GCC during optimization passes,
so running -O0 ends up never emitting the body, producing linker errors.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12158 >
2021-08-10 15:14:26 +00:00
Jesse Natalie
7939094d65
gallium/dri: Move driConf -> st option processing to aux/util
...
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12158 >
2021-08-10 15:14:26 +00:00
Connor Abbott
380d4904ea
tu: Read some input attachments directly
...
It can happen that the user reads an input attachment as the first use
of that attachment. In that case there are no subpass dependencies
required at all, because there could be a pipeline barrier before the
renderpass instead, and in any case we assume that dependencies with the
first subpass as a destination can be executed only once outside the
renderpass. The result is that we only do a CACHE_INVALIDATE once
before the entire renderpass, but it's actually required after each GMEM
load, because input attachments read GMEM through UCHE and those writes
to GMEM invalidate UCHE.
While we could add the missing CACHE_INVALIDATE "by hand" somehow, it
turns out it's actually just as easy to do an optimization the blob
does, where it simply doesn't patch those input attachments and reads
them directly instead. This means we can skip allocating memory in GMEM
for them entirely in some circumstances.
This fixes e.g.
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit
with TU_DEBUG=forcebin.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12213 >
2021-08-10 16:45:53 +02:00
Jason Ekstrand
11ac7d9e02
intel/eu: Set scope to TILE for TGM flushes
...
Setting it to GPU can cause an L3$ flush in certain cases. That's not
what we want as we really only care about coherency within the GPU.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Sagar Ghuge <sagar@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12291 >
2021-08-10 14:00:19 +00:00
Samuel Pitoiset
96403c1ec4
radv: allow fast clears for concurrent images if comp-to-single is supported
...
Only GFX10+ is affected because older chips don't support
comp-to-single. For them, we need to implement FCE on compute with DCC
and eventually CMASK.
Fixes the gap between concurrent vs exclusive queue with Scarlet Nexus,
also gives a boost with Doom Eternal.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12088 >
2021-08-10 12:52:14 +02:00
Marcin Ślusarz
bdae3c366e
glsl: evaluate switch expression once
...
v2: intialize test_val in constructor
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5185
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Cc: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12234 >
2021-08-10 09:04:17 +00:00
Iago Toral Quiroga
3f2c54a27f
broadcom/compiler: rewrite partial update liveness tracking
...
The code we had for this was a work in progress and not finished. Also,
it was geared towards partial writes caused by output packing (i.e.
fp16) and was ignoring partial updates caused by conditional writes,
which are far more common in our case.
This change provides an implementation for tracking conditional writes
that works in tandem with the previous spill change to narrow liveness
for their spills.
Fixes register allocation failures in:
dEQP-VK.graphicsfuzz.spv-stable-maze-flatten-copy-composite
We also gain one shader from shader-db:
total instructions in shared programs: 13339969 -> 13338584 (-0.01%)
instructions in affected programs: 185520 -> 184135 (-0.75%)
helped: 375
HURT: 130
Instructions are helped.
total threads in shared programs: 412038 -> 412040 (<.01%)
threads in affected programs: 2 -> 4 (100.00%)
helped: 1
HURT: 0
total uniforms in shared programs: 3746581 -> 3746585 (<.01%)
uniforms in affected programs: 49 -> 53 (8.16%)
helped: 0
HURT: 1
total max-temps in shared programs: 2359960 -> 2359947 (<.01%)
max-temps in affected programs: 289 -> 276 (-4.50%)
helped: 7
HURT: 0
Max-temps are helped.
total sfu-stalls in shared programs: 34351 -> 34359 (0.02%)
sfu-stalls in affected programs: 218 -> 226 (3.67%)
helped: 35
HURT: 37
Inconclusive result (value mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13374320 -> 13372943 (-0.01%)
inst-and-stalls in affected programs: 186653 -> 185276 (-0.74%)
helped: 373
HURT: 132
Inst-and-stalls are helped.
LOST: 0
GAINED: 1
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12278 >
2021-08-10 08:47:40 +00:00
Iago Toral Quiroga
c335c03ae2
broadcom/compiler: make spills of conditional writes also conditional
...
A spill of a conditional write generates code like this:
mov.ifa t5000, 0
mov tmud, t5000
nop t5001; ldunif (0x00008100 / 0.000000)
add tmua, t11, t5001
Here, we are spilling t5000, which has a conditional write, and we
produce an inconditional spill for it. This implicitly means that
our spill requires a correct value for all channels of t5000.
If we do a conditional spill, then we emit:
mov.ifa t5000, 0
mov tmud.ifa, t5000
nop t5001; ldunif (0x00008100 / 0.000000)
add tmua.ifa, t11, t5001
Which only uses channels of t5000 that have been written by the
instruction being spilled.
By doing the latter, we can then narrow down the liveness for t5000
more effectively, as we can use this to detect that the block only reads
(in the tmud instruction) the values that have been written previously
in the same block (in the mov instruction). This means that values in
other channels are not used, and therefore, we don't need them to be
alive at the start of the block. This means that if this is the only
write of t5000 in this block, we can consider that the block
completely defines t5000.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12278 >
2021-08-10 08:47:40 +00:00
Iago Toral Quiroga
314eb97dcb
broadcom/compiler: Flags are per-thread state in V3D 4.2+
...
This means they survive a thread switch, so we can remove redundant
flag setups across thread switches.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12278 >
2021-08-10 08:47:40 +00:00
Iago Toral Quiroga
b727eaac3c
broadcom/compiler: add a vir_get_cond helper
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12278 >
2021-08-10 08:47:40 +00:00
Samuel Pitoiset
7ccecf2096
radv: enable DCC fast-clears with comp-to-single on GFX10+
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10518 >
2021-08-10 08:20:17 +00:00
Samuel Pitoiset
aafe73561e
radv: skip FCE for images that are fast-cleared using comp-to-single
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10518 >
2021-08-10 08:20:17 +00:00
Samuel Pitoiset
7451eb1d61
radv: implement DCC fast clears with comp-to-single
...
When an image supports comp-to-single, DCC is cleared to 0x10 (single)
and the clear color value is written to the beginning of each 256B
block in the image.
This allows to skip FCE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10518 >
2021-08-10 08:20:17 +00:00
Samuel Pitoiset
782e0d05b0
radv: determine if an image support fast clears using comp-to-single
...
Only on GFX10+ with DCC enabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10518 >
2021-08-10 08:20:17 +00:00
Samuel Pitoiset
c336c4b0cb
radv: add RADV_DCC_CLEAR_SINGLE
...
When DCC is cleared with that code, the hardware expects the clear
color value to be stored at the beginning of each 256B block in
the image.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10518 >
2021-08-10 08:20:17 +00:00
Samuel Pitoiset
6b1afe33b2
radv: pass an image view to vi_get_fast_clear_parameters()
...
image_format was unused.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10518 >
2021-08-10 08:20:17 +00:00
Samuel Pitoiset
139d34d657
radv: use more explicit DCC clear codes
...
No functional changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10518 >
2021-08-10 08:20:17 +00:00
Tomeu Vizoso
4b88de7338
virgl/ci: Set NIR_VALIDATE=0 on the host
...
As we aren't testing LLVMPipe in these jobs, and shader compilation is
currrently the bottleneck.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12196 >
2021-08-10 09:49:39 +02:00
Tomeu Vizoso
a9f9e488f8
virgl/ci: Wait a bit before shutting the VM down
...
Sometimes, the VM powered off before all the output from the guest got
to the console.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12196 >
2021-08-10 09:49:35 +02:00
Tomeu Vizoso
716ba29056
virgl/ci: Rebalance concurrency
...
Crosvm deals with virtio-gpu commands sequentially, so parallelization
in the host doesn't help much.
Also, too much parallelization in the guest causes some tests to time
out.
So reduce the number of dEQP instances being run concurrently, make sure
we dont limit the number of CPUs being used in the host and schedule
more jobs in CI to keep the times below 10 minutes.
Closes : #5172
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12196 >
2021-08-10 09:49:23 +02:00
Tomeu Vizoso
e933c04383
virgl/ci: Have LLVMPipe use more threads for rendering
...
dEQP isn't high on rendering, but that is in the critical path as all
dEQP processes are waiting for Crosvm to single-threadedly service their
requests.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12196 >
2021-08-10 09:49:11 +02:00
Samuel Pitoiset
deecc7d109
radv: fix reported sample counts for VRS 1x1
...
The Vulkan spec requires ~0 for 1x1.
Fixes dEQP-VK.fragment_shading_rate.misc.shading_rates.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12245 >
2021-08-10 07:24:22 +00:00
Samuel Pitoiset
1a7eb424b0
radv: bump maxFragmentShadingRateCoverageSamples to 32
...
Minimum required value is 16 but we support up to 32
(2x2 VRS with MSAA 8x).
Fixes dEQP-VK.fragment_shading_rate.misc.limits.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12245 >
2021-08-10 07:24:22 +00:00
Samuel Pitoiset
0d605bb8e0
radv: disable fragmentShadingRateWithCustomSampleLocations
...
From the Vulkan spec 1.2.187.
"fragmentShadingRateWithCustomSampleLocations specifies whether
custom sample locations are supported for multi-pixel fragments.
It must be VK_FALSE if VK_EXT_sample_locations is not supported."
VK_EXT_sample_locations is disabled on GFX10+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12245 >
2021-08-10 07:24:22 +00:00
Samuel Pitoiset
e7e8704611
radv: bump maxFragmentSizeAspectRatio to 2
...
Minimum required value is 2.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12245 >
2021-08-10 07:24:22 +00:00
Juan A. Suarez Romero
36936adad7
ci/vc4: update piglit expected results
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12281 >
2021-08-10 07:05:27 +00:00
Iago Toral Quiroga
8d22c1701d
docs: flag VK_KHR_multiview as implemented for v3dv
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12279 >
2021-08-10 05:52:10 +00:00
Lucas Stach
826f95778a
etnaviv: always try to create KMS side handles for imported resources
...
By creating the KMS side handles we allow GBM to return the proper KMS
side GEM handles for imported buffers. Always creating the KMS side
handles adds a bit of overhead, as we don't need them on all imported
resources, but seems like the most robust solution for now.
Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12018 >
2021-08-09 23:41:43 +02:00
Lucas Stach
1bc22a2eab
renderonly: don't complain when GPU import fails
...
There are a number of drivers which do a trial-and-error import
of buffers into the KMS side via renderonly. Some of those imports
are expected to fail, so we should not print a error message in
this case. All callers do proper error handling themselves.
Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12018 >
2021-08-09 23:41:04 +02:00
Dave Airlie
353e632393
clover: add kernel attributes support for SPIR-V
...
Fixes CTS api kernel_attributes
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12225 >
2021-08-09 19:16:29 +00:00
Dave Airlie
773f046103
clover: return CL_INVALID_PLATFORM properly.
...
If the platform isn't clover platform return an error,
Fixes CTS api negative_get_platform_info
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12225 >
2021-08-09 19:16:29 +00:00
Dave Airlie
3106a340a0
clover: fix api zero sized enqueue
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12225 >
2021-08-09 19:16:29 +00:00
Samuel Pitoiset
7ae3881a4b
radv: flush caches before performing separate depth/stencil aspect init
...
It's a RMW operation, also note that DB doesn't use L2 on GFX6-8.
Fixes test_clear_depth_stencil_view() and test_discard_resource() tests
from vkd3d-proton.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12223 >
2021-08-09 16:35:41 +00:00
Jason Ekstrand
56fe30cbfc
anv: Make anv_image_aspect_to_plane take an anv_image*
...
It's called anv_image_* so it really should take an anv_image. For the
couple of cases where we really want to pass in a set of aspects, we
leave an anv_aspect_to_plane() helper. anv_image_aspect_to_plane() is
then just a wrapper around it which grabs the aspects from the image.
While we're in the area, sprinkle some const around.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
e37c2d923a
anv: Rework our aspect/plane helpers
...
The new versions should have identical output, just a simpler (and
probably faster) implementation and more/better asserts.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
0a93c0364c
anv/image: Rework YCbCr image aspects
...
The Vulkan 1.2.184 spec says:
"When creating a VkImageView, if sampler Y′CBCR conversion is
enabled in the sampler, the aspectMask of a subresourceRange used by
the VkImageView must be VK_IMAGE_ASPECT_COLOR_BIT.
When creating a VkImageView, if sampler Y′CBCR conversion is not
enabled in the sampler and the image format is multi-planar, the
image must have been created with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the aspectMask of the
VkImageView’s subresourceRange must be VK_IMAGE_ASPECT_PLANE_0_BIT,
VK_IMAGE_ASPECT_PLANE_1_BIT or VK_IMAGE_ASPECT_PLANE_2_BIT."
Previously, for YCbCr images, we were flipping this around. For single-
plane views where VK_IMAGE_ASPECT_PLANE_N_BIT would be passed in by the
app, we would store VK_IMAGE_ASPECT_COLOR_BIT. For multi-plane views
where the client says VK_IMAGE_ASPECT_COLOR_BIT, we would store a all of
the planes. (There was also an extra bit of remapping that would
compact the planes in the non-existent case of a format with a non-
contiguous set of planes.) The idea behind this was that for things
like rendering or single-plane sampling, storage, or compute, we want it
to look as much like a single-plane image as possible but we wanted the
multi-plane case to be the awkward one.
This commit changes it around so that iview->aspects is always exactly
the subset of image->vk.aspects represented by the view. This is
identical to how aspects work for depth/stencil so it gains us some
consistency.
This commit also changes anv_image_view::aspect_mask to aspects to force
a full audit of the field. As can be seen, there are only a few uses of
this field and they're all mostly fine:
- A bunch of them are used to check for depth/stencil. That hasn't
changed.
- Most of the checks for color already used ANY_COLOR_BIT, only one
needed fixing.
- There's a check that both src/depth are color for MSAA resolves.
However, we don't support MSAA on YCbCr so there's no point in
checking for ANY_COLOR_BIT.
There is a hidden usage of planes in anv_descriptor_set_write_image_view
that's not as obvious. However, this function simply looks at
anv_image_view::n_planes and blindly fills out the descriptor
accordingly. As long as image views with a single plane continue to
claim n_planes == 1, this will be fine.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
32157f9059
anv: Stop assuming planes are in aspect-bit-order
...
Previously, we initialized vplane in anv_CreateImageView to 0 and
incremented it every iteration of the aspect loop. This only works
because planes are guaranteed to be in aspect-bit-order which wasn't
documented anywhere. Instead, drop this assumption and burn a couple
CPU cycles properly calculating vplane.
While we're here, make iplane const as well.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
7e8fe42816
anv: Use anv_get_format_plane for color image view setup
...
When creating a single-plane view of a multi-plane image, we were
relying on vplane_aspect to be VK_IMAGE_ASPECT_COLOR_BIT so that
anv_get_format_plane of the single-plane view format would work.
Instead of relying on this quirk, we can drop vplane_aspect and rely
entirely on vplane to only be 0 in this case. In the case of depth or
stencil images, we still need to grab the format aspect but we can use
the actual aspect and don't need the vplane_aspect trickery.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
61807505e8
anv: Use anv_get_format_plane in anv_get_image_format_features
...
Once we get past depth/stencil, what we really want is plane 0 not the
color aspect. A bunch of those formats don't have a single color
aspect.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
4df2078e72
anv: Add a get_format_plane helper and use it in image setup
...
Unlike anv_get_format_aspect, this takes a plane number which is
relative to the set of aspects on the format. There are a number of
cases where we already have the plane and so re-fetching it is useless.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
dc6794ec24
anv: Rework depth/stencil early return in anv_get_format_plane
...
The comment about modifiers is bogus because we check the modifier
before this check and return early. Also, there's no reason why we need
to check the requested aspect when we could check the format itself.
anv_image_aspect_to_plane will ensure that the requested aspect is one
that actually exists.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
4518ae8284
anv: Rename anv_get_format_plane to anv_get_format_aspect
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
5dd55b0881
anv/blorp: Use the isl_surf for computing level_width/height in anv_image_ccs_op
...
Don't manually monkey around with the denominator scales.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
9a267be039
anv/blorp: Drop some can_ycbcr checks
...
Vulkan allows us to, in theory, support ycbcr on single-plane formats if
the client really wants it. Also, these functions should work on a
multi-plane color image as long as the client specifies the right
aspect. This gets rid of our usage of can_ycbcr outside of anv_image.c.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141 >
2021-08-09 16:07:23 +00:00
Jason Ekstrand
bf87b9ad81
nouveau: Use nir_lower_tex for projectors
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11826 >
2021-08-09 15:19:36 +00:00
Mike Blumenkrantz
ec66c58138
nir: add imm_vec3 to round these out
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12253 >
2021-08-09 14:45:30 +00:00
Bas Nieuwenhuizen
02b6015945
radv: Allocate space for inline push constants.
...
In the compute dispatch path we do not allocate a huge amount
of space to cover everything so the individual functions have to
allocate. This was missing here, causing a hang in Cyberpunk when
accessing the system menu at some locations with thread tracing
enabled.
Fixes: bd1186572f ("radv: add support for push constants inlining when possible")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12271 >
2021-08-09 14:26:21 +00:00
Bas Nieuwenhuizen
b2b1e8e40a
radv: Use correct signedness in misalign test.
...
Lots of the MAX2 args end up subtracting two unsigned numbers, which
blows up when the result is negative.
Fixes: 4c99d6ff54 ("radv: flush L2 for images affected by the pipe misaligned issue on GFX10+")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12272 >
2021-08-09 14:03:37 +00:00
Boris Brezillon
06fc6e46f0
panfrost: Fix pan_blitter_emit_bifrost_blend()
...
If we return inside a pan_pack() the descriptor packing doesn't happen.
Cc: mesa-stable
Fixes: 8ba2f9f698 ("panfrost: Create a blitter library to replace the existing preload helpers")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12239 >
2021-08-09 13:47:02 +00:00
Juan A. Suarez Romero
91a5afcd5f
v3d: print error on perfmon destroy error
...
Print an error in case destroying the kernel perfmon fails.
Fixes CID 1489964: Error handling issues (CHECKED_RETURN).
v2:
- Wrap line (Iago).
Fixes: 685281278e ("v3d: implement performance counter queries")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12280 >
2021-08-09 13:31:20 +00:00
Juan A. Suarez Romero
d0e83b6174
broadcom/compiler: change current block on setting spill base
...
The spill base setting instructions (which includes some uniforms) are
added in the entry block, not in the current block. When ldunif
optimization is applied, the cursor is pointing to instructions in the
entry block, but the current block is a different one. This leads to a
heap-buffer-overflow when going through the list of instructions
(detected by the address sanitizer).
Thus change the current block to entry block, and restore it after the
setup is done.
This fixes
dEQP-VK.ssbo.readonly.layout.single_struct.single_buffer.std430_instance_array_comp_access_store_cols
with address sanitizer enabled.
v2:
- Set current block instead of disabling ldunif optimization (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12221 >
2021-08-09 13:15:24 +00:00
Marek Olšák
90ee96992c
gallium/noop: implement a lot of missing context functions
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
380898f8c6
gallium/noop: implement a lot of missing screen functions
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
c6b8591b60
gallium/noop: update pipe_screen::num_contexts
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
ddd695407e
gallium/noop: enable threaded_context to test TC overhead without a driver
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
dd528305d5
gallium/noop: use threaded_transfer
...
to enable threaded_context later
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
f4632f1096
gallium/noop: use threaded_resource
...
to enable threaded_context later
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
5133524a62
gallium/noop: use threaded_query
...
to enable threaded_context later
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
870a3771af
gallium/noop: implement shader buffers and shader images
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
f2c04c9378
gallium/noop: implement fences
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255 >
2021-08-09 12:36:27 +00:00
Marek Olšák
59fe704c45
gallium: simplify VRAM uploads by adding PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY
...
When this flag is set, u_threaded_context will try not to map it directly
for better buffer placement. It's set by drivers when visible VRAM is too
small.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12257 >
2021-08-09 11:58:48 +00:00
Marek Olšák
da538eb368
radeonsi: improve viewperf snx performance by forcing staging for VRAM buffers
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12257 >
2021-08-09 11:58:48 +00:00
Samuel Pitoiset
21c8a95e34
radv: remove unnecessary FIXME about custom sample locations
...
VK_EXT_sample_locations is disabled on GFX10+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12247 >
2021-08-09 11:40:13 +00:00
Rhys Perry
d764de6460
nir/tests: add tests for umod/imod/irem optimizations
...
Both nir_opt_algebraic and nir_opt_idiv_const have optimizations for
umod/imod/irem by constants.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
e008eb1224
nir: fix signed overflow for iadd constant folding
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
b627b9fcec
nir/idiv_const: optimize imod/irem
...
fossil-db changes (Sienna Cichlid):
Totals from 223 (0.15% of 150170) affected shaders:
CodeSize: 384564 -> 370824 (-3.57%)
Instrs: 74518 -> 71961 (-3.43%)
Latency: 351620 -> 344640 (-1.99%)
InvThroughput: 80122 -> 74846 (-6.58%)
VClause: 919 -> 920 (+0.11%)
SClause: 2879 -> 2877 (-0.07%); split: -0.10%, +0.03%
Copies: 3099 -> 3103 (+0.13%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
96168301f9
nir/idiv_const: improve idiv(n, INT_MIN)
...
This lowering is smaller and -INT64_MIN is probably UB (signed overflow).
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
4e2b94331b
nir/algebraic: improve irem by power-of-two optimization
...
Requires one less instruction.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
2bb49e4587
nir/search: don't consider INT_MIN a negative power-of-two
...
ineg(INT_MIN)/iabs(INT_MIN) won't work as expected.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
b009467b81
nir/algebraic: add optimizations for imul(a, INT_MIN)
...
is_pos_power_of_two would catch this, but nir_op_imul has signed sources,
so is_neg_power_of_two catches it instead, which creates a useless
nir_op_ineg.
fossil-db (Sienna Cichlid):
Totals from 1014 (0.68% of 150170) affected shaders:
CodeSize: 3592296 -> 3592288 (-0.00%); split: -0.00%, +0.00%
Instrs: 671211 -> 670426 (-0.12%)
Latency: 5268917 -> 5268479 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 2187349 -> 2187343 (-0.00%); split: -0.00%, +0.00%
VClause: 8634 -> 8636 (+0.02%)
Copies: 97585 -> 97604 (+0.02%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
65cd5a0f22
nir/algebraic: don't optimize umod/imod/irem if lower_bitops=true
...
Match the udiv/idiv/imul by power-of-two optimizations.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Rhys Perry
ec4b425f59
nir/algebraic: fix imod by negative power-of-two
...
If "a" is a multiple of "b", then the result would have been "b" instead
of 0.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Fixes: 0ef5f3552f ("nir: add strength reduction pattern for imod/irem with pow2 divisor.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039 >
2021-08-09 11:00:39 +00:00
Samuel Pitoiset
1db36422b9
radv: fix initializing the DS clear metadata value for separate aspects
...
We shouldn't overwrite the clear value of the other aspect (in case
separate depth/stencil layouts are used).
Found by inspection.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12222 >
2021-08-09 10:41:39 +00:00
Pierre-Eric Pelloux-Prayer
9fe8ae3fcd
radeonsi: don't create an infinite number of variants
...
If a shader has code like this:
uniform float timestamp;
...
if (timestamp > 0.0)
do_something()
And timestamp is modified each frame, we'll end up generating a new
variant per frame.
This commit introduces a hard limit on the number of variants we generate
for a single shader.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5121
Fixes: b7501184b9 ("radeonsi: implement inlinable uniforms")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12138 >
2021-08-09 10:26:54 +00:00
Pierre-Eric Pelloux-Prayer
20055a307d
radeonsi: add -t option to the test script
...
This allows to easily run a subset of the tests without having
to figure out which test suite(s) they belong to.
dEQP cannot use this option because currently "deqp-runner suite"
don't have it.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12215 >
2021-08-09 10:11:58 +00:00
Pierre-Eric Pelloux-Prayer
4a69667cdd
radeonsi: fix test script's output
...
This line was dropped in the last refactoring. We need
to clearly state to the user if the new results are
different to the expected ones.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12215 >
2021-08-09 10:11:58 +00:00
Samuel Pitoiset
ade66c1aeb
radv: allow DCC MSAA fast clears if a FCE is needed
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12180 >
2021-08-09 09:27:52 +00:00
Samuel Pitoiset
f136838d1e
radv: perform a FCE for MSAA images that might have been fast-cleared
...
FMASK_DECOMPRESS can't eliminate DCC fast clears. This will allow to
enable DCC MSAA fast clears that require a FCE.
Only supported on GFX10+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12180 >
2021-08-09 09:27:52 +00:00
Samuel Pitoiset
3cfa3187cb
radv: rework DCC, FMASK and FCE decompress path
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12180 >
2021-08-09 09:27:52 +00:00
Erik Faye-Lund
2f06642b06
gallivm: remove code to force nearest s/t interpolation
...
These two bits were added in 2012, but never got wired up. Let's cut our
losses, and remove them again. 9 years unused seems sufficient.
While we're at it, remove reduction_mode from the hacks-section, because
this isn't a hack at all, rather normal state.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12240 >
2021-08-09 06:42:59 +00:00
Erik Faye-Lund
7d3ab96f39
lavapipe: lower mipmapPrecisionBits to 4
...
Through some exhaustive searching, I've found that our log2 approximation
is precise to around 3.5 bits. And the squaring step should increase the
result with one bit, leaving us with 4.5 bits of precision.
Reporting the right mipmap precision fixes a few CTS-tests.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12238 >
2021-08-09 06:27:10 +00:00
Tapani Pälli
5e80cdbf8e
anv: allow stencil memory export
...
This commit reverts 58e9371141 as now iris driver can import stencil.
This makes ext_external_objects-vk-stencil-display pass and X-Plane 11
vulkan rendering backend to work with anv + iris.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609 >
2021-08-09 05:38:50 +03:00
Tapani Pälli
e08370dc37
anv: disable aux for exportable images without modifiers
...
This makes import easier on different gfx generations and we don't
have to lock down on a certain aux layout just yet.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609 >
2021-08-09 05:38:50 +03:00
Tapani Pälli
d75502be33
iris: handle depth-stencil import with a wrapper function
...
This is similar to u_transfer_helper wrap but implemented in
the driver as the layout between drivers can vary.
v2: remove else, simplify (Rohan, Eleni)
v3: add hiz surface support when importing depth buffer
v4: use iris_resource_configure_aux_offsets for setting
aux offsets for depth
v5: introduce helper for configuring imported memobj aux
offsets and utilize that
v6: simplify, remove aux support for now
v7: cleanups, fix offset calculation (Nanley)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609 >
2021-08-09 05:38:50 +03:00
Tapani Pälli
5f7df5df0d
crocus: disable depth and d+s formats with memory objects
...
This is similar to i965 commit ba11f673a2 , we set depth and
d+s formats unsupported for now.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609 >
2021-08-09 05:38:50 +03:00
Tapani Pälli
e47b72e931
crocus: take a reference to memobj bo in crocus_resource_from_memobj
...
This is the same fix as commit 2d87ea3166 for iris driver.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609 >
2021-08-09 05:38:50 +03:00
Emma Anholt
13677a9092
i915g: Reapply clang-format.
...
Missed this in 2008ec8a43 ("i915g: Fix writemasking of SEQ/SNE/SSG.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12250 >
2021-08-09 04:40:21 +00:00
Emma Anholt
01e9824997
i915g: Use the devmaster quadratic approximation for sin/cos.
...
11 instructions, but now processes up to 4 channels at once (since TGSI
splits to scalar for these math ops) while being higher accuracy.
Previously we used 6 instructions per channel, but it didn't look like a
sine wave. i915c managed it in 9 instructions per scalar channel, thanks
to avoiding an extra mov we do for the fabs (should be fixable), and
avoiding an extra MUL (maybe just needs reassociation of our immediates?).
But, the ALU count win from doing 4 channels at once will be way more
important for making sure that programs compile than those 2 ALU ops, plus
now we do it in NIR instead of assembly.
Closes : #4981
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12250 >
2021-08-09 04:40:21 +00:00
Dmitry Baryshkov
f800b9182b
freedreno/regs: add bit to control continuous clock with 7nm PHYs
...
7nm PHYs need another special bit set in DSI_LANE_CTRL to enable
continuous DSI clock. Document this bit.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11219 >
2021-08-08 20:15:42 +00:00
Filip Gawin
fd9310f885
docs: make most important part of bugs.rst easier to find
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12124 >
2021-08-08 19:53:15 +00:00
Antonio Caggiano
a694541709
pps: Restore documentation
...
Restore part of the perfetto documentation deleted by mistake.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11846 >
2021-08-08 19:48:38 +00:00
Thong Thai
3cafe333e9
frontends/va/postproc: Keep track of deinterlacing method being used
...
When transcoding a video, the context used by decode/postproc process
might be different from that of the encoder, but we encoder needs to
know if deinterlacing was used.
Fixes: c5088b4972 ("gallium: Fix VAAPI postproc blit")
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12251 >
2021-08-08 14:06:54 +00:00
Thong Thai
5dace8e0fb
gallium/util: add half texel offset param to util_compute_blit
...
Fixes an issue where the video image is blurry after blitting.
Fixes: c5088b4972 ("gallium: Fix VAAPI postproc blit")
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12251 >
2021-08-08 14:06:54 +00:00
Thong Thai
675508dd81
gallium/auxiliary/vl: Add additional deinterlace enum and tracking
...
Add additional deinterlace enums and a deinterlace field to the
vl_compositor struct, so we can keep track of which deinterlacing
algorithm is currently being used, if any.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12251 >
2021-08-08 14:06:54 +00:00
Bas Nieuwenhuizen
30a359d633
util/fossilize_db: Add extra flock mutex.
...
The flock is per-fd, not per thread, and we do it outside of the main mutex. This was
done to avoid having to wait in the mutex, but we can get a case where one ends up running
the body with the flock unlocked.
Fix this by adding a mutex that doesn't need to be locked for reads.
Fixes: 4f0f8133a3 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12266 >
2021-08-08 13:34:42 +02:00
Bas Nieuwenhuizen
75266ee44a
util/fossilize_db: Unlock the cache file if the entry already exists.
...
Fixes: 4f0f8133a3 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12266 >
2021-08-08 13:34:39 +02:00
Bas Nieuwenhuizen
1c4dce1aa7
util/fossilize_db: Use uint64_t for file size.
...
For those 32-bit systems with 4G of cache.
Fixes: 2ec1bff0f3 "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12266 >
2021-08-08 13:34:35 +02:00
Bas Nieuwenhuizen
d2d642cc01
util/fossilize_db: Only allocate entries after full read.
...
Should void leaking entries on read failure.
Fixes: 2ec1bff0f3 "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204 >
2021-08-07 20:06:31 +00:00
Bas Nieuwenhuizen
96bfefe8d1
util/fossilize_db: Be conservative about header length check for locking.
...
Don't anticipate seeing any partial written headers but just in case we
should probably wait on the lock to make sure whatever header was being
written is finished being written.
Fixes: 4f0f8133a3 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204 >
2021-08-07 20:06:31 +00:00
Bas Nieuwenhuizen
3091277052
util/fossilize_db: Flush files after header write.
...
We should probably flush before we unlock the file again.
Fixes: 4f0f8133a3 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204 >
2021-08-07 20:06:31 +00:00
Bas Nieuwenhuizen
57ca07455c
util/fossilize_db: Reset file position to parsed_offset on cache_offset read failure.
...
Otherwise we might restart reading from the middle of the entry.
Fixes: 2ec1bff0f3 "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204 >
2021-08-07 20:06:31 +00:00
Bas Nieuwenhuizen
3c51a3aa95
util/fossilize_db: Update parsed_offset correctly.
...
If things went perfectly parsed_offset was never updated for the
final entry and we'd seek_set to the start of the last entry. Is
fun when appending to the file next.
Fixes: 2ec1bff0f3 "util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204 >
2021-08-07 20:06:31 +00:00
Vinson Lee
87efa1ee22
spirv_to_dxil: Fix missing-prototypes build error.
...
../src/microsoft/spirv_to_dxil/spirv_to_dxil.c: At top level:
../src/microsoft/spirv_to_dxil/spirv_to_dxil.c:200:1: error: no previous prototype for ‘spirv_to_dxil_get_version’ [-Werror=missing-prototypes]
200 | spirv_to_dxil_get_version()
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 92b0cf8e77 ("spirv_to_dxil: expose version number")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12264 >
2021-08-07 11:11:31 -07:00
Emma Anholt
e5311eae0c
ci/freedreno: Add jobs to manually do a full VK on freedreno.
...
Building toward scheduled nightly runs, add a button to do a full VK run
when you think you're changing test expectations.
Be gentle with the play button on this, 4 people doing this at once
would block marge for everyone else for a while.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12150 >
2021-08-06 20:03:02 +00:00
Emma Anholt
2af172e826
ci/freedreno: Skip the slow dEQP-VK.ubo.random.all_shared_buffer.48 in CI.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12150 >
2021-08-06 20:03:02 +00:00
Emma Anholt
71b38ef036
ci/freedreno: Clean up and fill out the tess timeout annotations.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12150 >
2021-08-06 20:03:02 +00:00
Emma Anholt
9c3b72e1b5
ci/freedreno: Generalize the spirv_ids_abuse skips.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12150 >
2021-08-06 20:03:02 +00:00
Emma Anholt
fd29117551
ci/freedreno: Organize, fill out, and document our VK xfails.
...
This is the full set of xfails for 1.2.7.0 currently.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12150 >
2021-08-06 20:03:02 +00:00
Chia-I Wu
da000ea2ef
venus: free queues after vkDestroyDevice is emitted
...
Otherwise, another thread might reuse their object ids for other
objects. For example,
T1: free queue with object id X
T2: reuse id X
T2: emit vkCreateFoo with id X
T1: emit vkDestroyDevice
virglrenderer happily accepts that which leads to double frees of the
queue: once when X is updated to point to another object and once when
vkDestroyDevice is executed. virglrenderer should be fixed to catch
such invalid object id reuse as well.
Fixes
dEQP-VK.api.object_management.multithreaded_shared_resources.device_group.
Fixes: ddd7533055 ("venus: initial support for queue/fence/semaphore")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12252 >
2021-08-06 19:48:49 +00:00
Rob Clark
4e28dfe58e
freedreno: Device matching based on chip_id
...
Add support for device matching based on chip_id instead of gpu_id, to
handle newer GPUs
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Rob Clark
a1c4f11f4c
freedreno: Make chip_id 64b
...
In the UABI it is already 64b, but userspace ignored the upper 32b. But
it looks like we will start needing the upper 32b. So before we start
actually *using* chip_id, lets make sure everything is treating it as
64b.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Rob Clark
7806843866
freedreno/all: Introduce fd_dev_id
...
Move away from using gpu_id as the primary means to identify which
adreno we are running on, as future GPUs (starting with 7c3) stop
providing a gpu_id as a new naming scheme is introduced.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Rob Clark
7ba6100c2a
freedreno/ir3/lower_io_offsets: Drop gpu_id param
...
It was unused.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Rob Clark
cc72eeb077
freedreno/ir3: Reduce use of compiler->gpu_id
...
For the same reason as previous patch. Mostly we only care about the
generation, so convert things to use compiler->gen instead.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Rob Clark
f92877b7b8
freedreno: Reduce use of screen->gpu_id
...
Newer GPU's are moving away from using gpu_id, including the code
landing upstream for "7c Gen 3". But most of the places in the gallium
driver where we were looking at gpu_id, we only cared about the major
generation. So convert those to use screen->gen instead.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Rob Clark
f100acd0c5
freedreno: Drop device_id
...
This wasn't actually used for anything.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Rob Clark
7a11cc42e7
freedreno: Move generated device table to .h
...
We only need it in a single .c file, so we can make the device table
static. Also rename the struct for device table entries, as I want
to re-use the name 'fd_dev_id'
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12159 >
2021-08-06 18:51:50 +00:00
Mike Blumenkrantz
2f665e52e1
nine: enable tc
...
Acked-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11866 >
2021-08-06 18:40:32 +00:00
Mike Blumenkrantz
740752d232
nine: track bound sampler count to optimize unbinds
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865 >
2021-08-06 17:12:54 +00:00
Mike Blumenkrantz
7a170230f1
nine: update bound sampler mask directly during texture updates
...
Reviewed-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865 >
2021-08-06 17:12:54 +00:00
Mike Blumenkrantz
9205a45da5
nine: split enabled/dummy texture binds into separate iterators
...
this removes a conditional from the loops
Reviewed-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865 >
2021-08-06 17:12:54 +00:00
Mike Blumenkrantz
26d1886a7c
nine: optimize texture binds a bit
...
this can just iterate over the mask of active textures instead of always
iterating over and rebinding all textures
Acked-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: <Axel Davy davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865 >
2021-08-06 17:12:54 +00:00
Matt Turner
0165fde82c
tu: Raise maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to 16
...
... and reduce maxDescriptorSetUpdateAfterBindStorageBuffersDynamic from 12 to
8.
MAX_DYNAMIC_BUFFERS is MAX_DYNAMIC_UNIFORM_BUFFERS +
MAX_DYNAMIC_STORAGE_BUFFERS. We set
maxDescriptorSetUniformBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS
maxDescriptorSetStorageBuffersDynamic = MAX_DYNAMIC_STORAGE_BUFFERS
maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2
The CTS test checks that
maxDescriptorSetUpdateAfterBindUniformBuffersDynamic
- is at least 8; and
- is at least maxDescriptorSetUniformBuffersDynamic
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic
- is at least 4; and
- and is at least maxDescriptorSetStorageBuffersDynamic
Prior to this patch maxDescriptorSetUpdateAfterBindUniformBuffersDynamic was 12
but maxDescriptorSetUniformBuffersDynamic was 16, thus causing the CTS failure
in
dEQP-VK.api.info.vulkan1p2_limits_validation.ext_descriptor_indexing
By raising maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to the same
value as maxDescriptorSetUniformBuffersDynamic, we bring the limits into the
appropriate ranges. We do the same thing for
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic by assigning it the same
value as maxDescriptorSetStorageBuffersDynamic.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12193 >
2021-08-06 16:46:55 +00:00
Gert Wollny
799710be88
mesa: Add EXT_texture_mirror_clamp_to_edge to extension table
...
This is the OpenGL ES version of ARB_texture_mirror_clamp_to_edge.
v2: fix TexParameter validation (Erik)
v3: Use modernized extension test (Erik)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10325 >
2021-08-06 15:57:42 +00:00
Gert Wollny
757bc6d37a
mesa: Add support for EXT_clear_texture
...
This extension implements a subset of ARB_clear_texture (i.e.
only the features that are not available in OpenGL ES have been
dropped).
v2: Move call declarations from function to offsets (Emil)
v3: Update llvmpipe and softpipe expectations
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10325 >
2021-08-06 15:57:42 +00:00
Erik Faye-Lund
028a83d9ad
lavapipe: remove duplicate xfail with typo
...
Seems there's a rogue "time" in here, causing it to look like a new
failure. But if we remove that and resort the list, we'll see that this
failure was already listed.
Fixes: dfccbdff98 ("ci: update to VK-GL-CTS 1.2.7.0")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12233 >
2021-08-06 15:37:34 +00:00
Mike Blumenkrantz
201d46b894
nine: set CSO_NO_USER_VERTEX_BUFFERS for main cso context
...
this skips vbuf for radeonsi and saves some cpu
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11884 >
2021-08-06 15:23:40 +00:00
Mike Blumenkrantz
d20b0c87bc
nine: don't memset sampler state during conversion
...
this ends up having pretty huge overhead
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11887 >
2021-08-06 15:12:54 +00:00
Connor Abbott
e9d2d3ae17
ir3: Document RA-related register flags better
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12216 >
2021-08-06 14:51:53 +00:00
Simon Zeni
f7ee7112ec
gbm: add GBM_FORMAT_R16
...
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12101 >
2021-08-06 13:38:00 +00:00
Timur Kristóf
74181ffcc5
radv: Write RSRC2_GS for NGGC when pipeline is dirty but not emitted.
...
The radv_emit_ngg_culling_state function won't write the
SPI_SHADER_PGM_RSRC2_GS register when it knows in advance that
radv_emit_graphics_pipeline will overwrite it anyway.
However, there is an unhandled case:
radv_emit_graphics_pipeline will not emit anything (including this
register) when the pipeline is already emitted. Hence, improve
the check in radv_emit_ngg_culling_state to consider this.
Fixes: 9a95f5487f
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12237 >
2021-08-06 12:18:37 +02:00
Pierre-Eric Pelloux-Prayer
41e093fc98
st/pbo: add a fast pbo download code-path
...
Based on the glReadPixels code.
pbobench piglit benchmark reports identical/similar results on about 50% of
the test cases. The other test cases get a 2x-50x speedup.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5084
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1030
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096 >
2021-08-06 09:07:32 +02:00
Pierre-Eric Pelloux-Prayer
d2845cfcc4
st/pbo: set nir_tex_instr::is_array field
...
Otherwise the layer argument won't be used.
Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download shaders. ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096 >
2021-08-06 09:07:32 +02:00
Pierre-Eric Pelloux-Prayer
ff7e339f1f
st/pbo: only use x coord when reading a PIPE_TEXTURE_1D
...
This fixes the following NIR validation error in the
st/pbo download FS:
vec2 32 ssa_14 = mov ssa_4.xy
vec2 32 ssa_15 = f2i32 ssa_14
vec1 32 ssa_16 = deref_var &tex (uniform sampler1D)
vec4 32 ssa_17 = (float32)txf ssa_16 (texture_deref), ssa_16 (sampler_deref), ssa_15 (coord)
error: nir_src_num_components(instr->src[i].src) == instr->coord_components (../src/compiler/nir/nir_validate.c:839)
With this change, the FS becomes:
vec4 32 ssa_2 = intrinsic load_frag_coord () ()
vec1 32 ssa_3 = f2i32 ssa_2.x
[...]
vec1 32 ssa_9 = deref_var &tex (uniform sampler1D)
vec4 32 ssa_10 = (float32)txf ssa_9 (texture_deref), ssa_9 (sampler_deref), ssa_3 (coord), ssa_0 (lod)
Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download shaders. ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096 >
2021-08-06 09:07:32 +02:00
Dave Airlie
78b4e417d4
gallivm: handle fisfinite/fisnormal
...
lower one, do the other.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12207 >
2021-08-06 14:28:10 +10:00
Dave Airlie
ad92c2b253
nir: add fisnormal lowering
...
just lower the 32-bit version for now.
Thanks to alyssa for this suggested lowering.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12207 >
2021-08-06 14:27:48 +10:00
Dave Airlie
330e28155f
nir: add 32-bit bool of fisfinite
...
Add the bool lowering as well.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12207 >
2021-08-06 12:06:21 +10:00
Dave Airlie
cf39c3e1e3
vtn: add support for atomic flag test/set/clear
...
This adds support for SpvOpAtomicFlag operations.
This is just a simple implementation that lowers
Clear to Store 0
and
TestAndSet to Cas (0, -1)
There are likely platforms/hw that will want to
lower this all the way through NIR and into their
backend, but this will do for now.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12229 >
2021-08-06 11:11:04 +10:00
Dave Airlie
cd265a9868
nir/libclc: handle null callee name when lowering
...
fixes a crash in the CTS spirv_new get_program_il test
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12230 >
2021-08-06 00:09:17 +00:00
Enrico Galli
cc8a122907
microsoft/compiler: Add support for local_invocation_index
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12228 >
2021-08-05 23:54:26 +00:00
Enrico Galli
f9f3713c84
microsoft/spirv_to_dxil: Enable support for shared memory
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12228 >
2021-08-05 23:54:26 +00:00
Emma Anholt
c00cf7d616
ci/a5xx: Skip some piglit stress tests that destabilize CI.
...
Previously, most piglit GL manual runs on a5xx would get a bunch of
failures in random tests around the same time in the run, with a
characteristic OUT_OF_MEMORY in the logs. With this, that instability
seems to have gone away.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12224 >
2021-08-05 23:33:25 +00:00
Michael Tang
92b0cf8e77
spirv_to_dxil: expose version number
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12227 >
2021-08-05 13:30:42 -07:00
Lionel Landwerlin
bc3c71b87a
anv: don't try to access Android swapchains
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5180
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12217 >
2021-08-05 18:15:52 +00:00
Erik Faye-Lund
0869703300
lavapipe: remove stale xfails
...
These were fixed already in !10219 , but a bad conflict resolution added
them back again. And because the CI doesn't actually end up running
these tests, this went unnoticed.
Fixes: dfccbdff98 ("ci: update to VK-GL-CTS 1.2.7.0")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12220 >
2021-08-05 17:57:35 +00:00
Erik Faye-Lund
08a12feb6e
gallivm: use lp_build_log2_safe for pow
...
lp_build_log2 isn't robust enough to handle special cases for pow, so
let's use lp_build_log2_safe instead.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11800 >
2021-08-05 17:18:57 +00:00
Connor Abbott
2e2e6865b4
tu, freedreno/a6xx: Fix setting PC_XS_OUT_CNTL::PRIMITVE_ID
...
This is supposed to be set when that stage needs the PrimID sysval
preloaded, except for the VS which doesn't have this bit and instead
infers it from the HS or GS bit (depending on whether tess/GS is
enabled). Therefore for HS, GS, and DS we should set it whenever the
corresponding sysval is there. This includes adding a missing
PC_HS_OUT_CNTL, which I confirmed is set when the HS reads PrimID from
the VS. Note that the DS sysval is currently always enabled whenever
there's a GS, if we were to fix that then we should also change the
logic here.
This doesn't fix anything that I know of, but aligns us more with what
the blob does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12166 >
2021-08-05 16:35:41 +00:00
Connor Abbott
8115cde3ba
tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling
...
The previous handling conflated RelPatchID and PrimID, which would
result in incorrect gl_PrimitiveID when doing draw splitting and didn't
work with PrimID passthrough which fills the VPC slot with the "correct"
PrimID value from the tess factor BO which we left 0. Replace PrimID in
the tess lowering pass with a new RelPatchID sysval, and relace PrimID
with RelPatchID in the VS input code in turnip/freedreno at the same
time so that there is no net change in the tess lowering code. However,
now we have to add new mechanisms for getting the user-level PrimID:
- In the TCS it comes from the VS, just like gl_PrimitiveIDIn in the GS.
This means we have to add another register to our VS->TCS ABI. I
decided to put PrimID in r0.z, after the TCS header and RelPatchID,
because it might not be read in the TCS.
- If any stage after the TCS uses PrimID, the TCS stores it in the first
dword of the tess factor BO, and it is read by the fixed-function
tessellator and accessed in the TES via the newly-uncovered DSPRIMID
field. If we have tess and GS, the TES passes this value through to
the GS in the same way as the VS does. PrimID passthrough for reading
it in the FS when there's tess but no GS also "just works" once we
start storing it in the TCS. In particular this fixes
dEQP-VK.pipeline.misc.primitive_id_from_tess which tests exactly that.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12166 >
2021-08-05 16:35:41 +00:00
Connor Abbott
cd687c4e3b
freedreno: Rename and document tess primid-related sysvals
...
DSPATCHID and HSPATCHID, which we mapped gl_PrimitiveID to, are actually
relative to the current subdraw. Subdraws aren't supported yet by turnip
but they are by freedreno for indirect draws.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12166 >
2021-08-05 16:35:40 +00:00
Danylo Piliaiev
97b0981ed9
tu: disable gmem in primary cmdbuffer if secondary has it disabled
...
If secondary command buffer is emitted within a subpass it may have
barriers which forces us to disable gmem for current renderpass.
Fixes: 20547a110e "tu: delay decision of forcing sysmem due to subpass self-dependencies"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12219 >
2021-08-05 18:51:51 +03:00
Michel Dänzer
6ccf11ac2b
ci: Drop "success" job
...
It was added to make sure every pipeline for a merge request has at
least one job which passes (otherwise it's not possible to merge the
MR). Now the "sanity" job always exists in such pipelines, so this
isn't needed anymore.
Fixes: 4c41d1900e "ci: Add jobs running ci-fairy checks"
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12198 >
2021-08-05 12:24:58 +00:00
Rhys Perry
5a536eca9c
aco: calculate correct register demand for branch instructions
...
Since copies for the successor's linear phis are inserted before the
branch, we should consider the definitions and operands of the successor's
linear phis.
Fixes a Detroit: Become Human spilling failure with GCM+GVN.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12035 >
2021-08-05 12:01:58 +00:00
Juan A. Suarez Romero
87a8349411
ci/v3dv: update expected results
...
v1:
- Include CTS fix comment (Juan)
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12168 >
2021-08-05 11:43:42 +00:00
Erik Faye-Lund
d762a01e18
microsoft/compiler: harmonize num_psv_inputs with outputs
...
This doesn't seems to make a practical difference, but it seems better
to do it the same way as we do for outputs, as well as what DXC does.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12197 >
2021-08-05 09:17:40 +00:00
Erik Faye-Lund
63dae1bd8b
microsoft/compiler: fix psv-output calculation
...
Rather surprisingly, the value stored in the NumVectors field of the
DXIL PSV header isn't the number of vectors, but rather the *maximum*
vector used.
This makes a difference when we're not writing to the first element of
an array, where we would previously generate a validation error.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12197 >
2021-08-05 09:17:40 +00:00
Antonio Caggiano
50e849fb94
freedreno/ci: Add a manual job for tracking performance
...
Use Piglit's replay profile to measure and store the time that frames
take to render in the GPU.
This job won't run automatically in regular pipelines, but will be
triggered automatically by a script for every successful pre-merge
pipeline.
This is because we want to generate performance data for every relevant
commit merged in main, but we don't want to keep a device busy during
the pre-merge run.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12185 >
2021-08-05 07:55:32 +00:00
Dave Airlie
518b94e8e1
clover/llvm: turn off optional CL 3 features.
...
We don't support these with clover yet, so turn them off to get
clang back to the older llvm 12 behaviour.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11752 >
2021-08-05 07:07:44 +00:00
Samuel Pitoiset
16793c8efa
ac/surface: implement CmaskAddrFromCoord in NIR on GFX10+
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12182 >
2021-08-05 06:37:09 +00:00
Samuel Pitoiset
1d67fa4d73
ac/surface: add tests for CmaskAddrFromCoord on GFX10+
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12182 >
2021-08-05 06:37:09 +00:00
Samuel Pitoiset
0926b268fc
amd/addrlib: expose CMASK address equations to drivers on GFX10+
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12182 >
2021-08-05 06:37:09 +00:00
Tomeu Vizoso
19670129c5
ci: Update canvas_text trace
...
The previous one had all rendering and setup in a single frame, so
repeatedly replaying it for performance tracking was reaching OOM due to
the repeated creation of resources that weren't being released.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12195 >
2021-08-05 05:44:57 +00:00
Dylan Baker
da00a11bf2
bin/gen_release_notes: Fix commits with multiple Closes:
...
Currently we'd only handle the last one, not all of them. Which is
clearely not correct.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201 >
2021-08-04 23:03:57 +00:00
Dylan Baker
30f7b55e47
bin/gen_release_notes: Don't consider issues for other projects
...
We have enough commits in mesa that have external dependencies that we
need to be sure that a Closes: https://... is actually for mesa and not
for another project.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201 >
2021-08-04 23:03:57 +00:00
Dylan Baker
9dc3672b00
bin/gen_release_notes: Add basic tests for parsing issues
...
Since test coverage here is pretty important for a heuristic like this.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201 >
2021-08-04 23:03:57 +00:00
Dylan Baker
7055282231
docs: Add calendar entries for 21.2 release.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12202 >
2021-08-04 12:12:47 -07:00
Dylan Baker
c2a241faa9
docs: update calendar and link releases notes for 21.2.0
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12202 >
2021-08-04 12:09:26 -07:00
Dylan Baker
98f0db5321
docs: update calendar for 21.2.0-rc3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12202 >
2021-08-04 12:09:23 -07:00
Dylan Baker
ac428b5305
docs: update calendar for 21.2.0-rc2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12202 >
2021-08-04 12:09:21 -07:00
Dylan Baker
04adf1834c
docs: add release notes for 21.2.0
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12202 >
2021-08-04 12:09:11 -07:00
Mike Blumenkrantz
c886ce2991
zink: simplify else clause for mem info gathering
...
it doesn't matter if this is host-visible, it just has to not be device-local
Fixes: 73f6bff07f ("zink: fix mem info query to be more permissive")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12199 >
2021-08-04 14:07:58 -04:00
Mike Blumenkrantz
42442a0d4e
zink: sum available memory heaps instead of assigning
...
this is supposed to accumulate now
Fixes: 73f6bff07f ("zink: fix mem info query to be more permissive")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12199 >
2021-08-04 14:07:58 -04:00
Emma Anholt
8cfa6b4d75
ci/freedreno: Mark border_color as passing on a5xx.
...
They're marked as flaky, but they're all passing on my board, and maybe in
CI too. Let's see if CI still sees them as flaky once the expectations
are right.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12192 >
2021-08-04 17:21:43 +00:00
Emma Anholt
1f66fcf5a6
freedreno/a5xx: Don't try to emit FS images in binning command streams.
...
We don't have a compiled FS in that case, so the shader deref fails. We
don't need the state, anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12192 >
2021-08-04 17:21:43 +00:00
Emma Anholt
c20287f8e4
freedreno/a5xx: Disable TF when pausing or transitioning to non-TF.
...
This is not as clean as on a6xx where we just re-emit the SO state, but it
cleans up our dEQP results a ton.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12192 >
2021-08-04 17:21:43 +00:00
Emma Anholt
1f89ea419d
ci/freedreno: Clear out TF API errors xfails.
...
These tests are flaky and sometimes segfault in CI, but usually pass. We
hadn't noticed their change due to the test being marked as flaky.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12192 >
2021-08-04 17:21:43 +00:00
Timur Kristóf
8918a809ce
ac: Remove deprecated use_late_alloc field as nobody uses it anymore.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11905 >
2021-08-04 15:37:05 +00:00
Timur Kristóf
d911259c3a
radv: Use ac_compute_late_alloc in radv_pipeline.
...
This aligns RADV with RadeonSI in how it handles late alloc,
making it easier for us to deal with deadlocks and such.
Also move setting the RSRC3 registers for VS, GS and NGG
into radv_pipeline.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11905 >
2021-08-04 15:37:05 +00:00
Timur Kristóf
61eb3debcf
radv: Don't toggle PC oversubscription for NGG culling.
...
We are going to add this directly to the pipeline.
If a pipeline has such a shader, NGG culling is turned on
most of the time, so it's not useful to toggle this setting.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11905 >
2021-08-04 15:37:05 +00:00
Timur Kristóf
448592b9ae
aco: Use Navi 10 empty NGG output workaround on NGG culling shaders.
...
Navi 10 can hang when an NGG workgroup has no output,
so we work around that by always exporting a single zero-area
triangle with a single vertex that has all-NaN coordinates.
Thus far, we only employed this for NGG GS, because on all
other stages, the output can't be empty.
However, with NGG culling, the output can be empty, so let's
apply the same workaround there too.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12169 >
2021-08-04 12:28:34 +00:00
Rhys Perry
566970f273
aco: use image_dim and image_array intrinsic indices
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12190 >
2021-08-04 12:09:07 +00:00
Rhys Perry
39db5a569b
radv: set image_dim and image_array intrinsic indices
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12190 >
2021-08-04 12:09:07 +00:00
Dave Airlie
513f9b5dc9
ci: bump to latest virglrenderer for anisotropic support
...
Update ci results
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11944 >
2021-08-04 10:49:55 +00:00
Dave Airlie
2116a4f5cc
virgl: add support for anisotropic texture filtering
...
This is the guest side for adding correct anisotropic filtering support
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11944 >
2021-08-04 10:49:55 +00:00
Dave Airlie
e831c4a537
virgl: disable anisotropic filtering.
...
virgl doesn't yet support anisotropic filtering so don't advertise it.
Fixes: a8987b88ff ("virgl: add driver for virtio-gpu 3D (v2)")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11944 >
2021-08-04 10:49:55 +00:00
Sergii Melikhov
d16b9b27b0
iris: Fix Null pointer dereferences
...
Fix the error from Coverity report: CID 1489765
Signed-off-by: Sergii Melikhov <sergii.v.melikhov@globallogic.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12179 >
2021-08-04 07:52:35 +00:00
Charmaine Lee
6751d832c5
aux/draw: Check for preferred IR to take nir-to-tgsi path in draw module
...
When a vertex program is translated to nir, it uses
nir_to_tgsi_compile_options for drivers with only nir-to-tgsi based
NIR support. But this compile option might not be the same as the NIR
compile option from llvmpipe, hence when the nir shader is bound
to the draw module, it hits an assertion in do_alu_action() when
encounters nir_op_fdot3.
With this patch, draw will take the nir-to-tgsi path if preferred IR
from the driver is TGSI.
Fixes assert running Maya on SVGA device.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12176 >
2021-08-03 22:13:10 +00:00
Jason Ekstrand
0ddac113f8
nir: Removing uses of SSA defs destroys SSA liveness
...
The liveness information will be a superset of real liveness so it's
unlikely something will explode if it tries to use it. However, it is
out-of-date and should be re-run if someone really wants it.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12186 >
2021-08-03 21:36:53 +00:00
Ian Romanick
9dfe7fbc6b
isl: Use CLAMP macro instead of MIN of MAX
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12177 >
2021-08-03 12:55:11 -07:00
Ian Romanick
72259a870f
util: Add and use functions to calculate min and max int for a size
...
Many places need to know the maximum or minimum possible value for a
given size integer... so everyone just open-codes their favorite
version. There is some potential to hit either undefined or
implementation-defined behavior, so having one version that Just Works
seems beneficial.
v2: Fix copy-and-pasted bug (INT64_MAX instead of INT64_MIN) in
u_intmin. Noticed by CI. Lol. Rename functions
`s/u_(uint|int)(min|max)/u_\1N_\2/g`. Suggested by Jason. Add some
unit tests that would have caught the copy-and-paste bug before wasting
CI time. Change the implementation of u_intN_min to use the same
pattern as stdint.h. This avoids the integer division. Noticed by
Jason.
v3: Add changes to convert_clear_color
(src/gallium/drivers/iris/iris_clear.c). Suggested by Nanley.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12177 >
2021-08-03 12:55:02 -07:00
Emma Anholt
08d6361591
ci: Update piglit to 4545a28cd8fea03fbab0e5f90bfbd812c32f3be1
...
Brings in duplicate subtest fixes, gpu_shader4 tests, and more. This
shuffles the radeonsi fractional test run, so we get to catch up with more
failing subtests.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Emma Anholt
f04f8ac692
ci/zink: Use deqp-runner suite support to reduce the CI job count.
...
The tests were passing so quickly, and the 1/4th GLES3 subset changed on
the transition to multiple testsuites, so I promoted it to a full run.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Emma Anholt
55bd582598
ci/virgl: Use deqp-runner suite support to reduce CI job count.
...
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Emma Anholt
cd3b6689b2
ci: Save dEQP results on all tests.
...
Everyone can get artifacts now. Let's make those artifacts useful.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Emma Anholt
ad2995d1e1
ci/i915g: Merge the two dEQP runs together.
...
Fewer buttons for me to have to click for manual MR testing.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Emma Anholt
6f7a921c99
ci/llvmpipe: Use the deqp-runner suite support to consolidate jobs.
...
5 jobs become 2, plus we add KHR-GLES3 and 31 to the test set since
it's cheap.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Emma Anholt
4658a9a479
ci: Uprev deqp-runner and use "suite" support to merge softpipe runs.
...
The deqp-runner "suite" support lets us specify all the deqp variants at
once and shard them across gitlab jobs, so we reduce docker overhead and
get fewer jobs to review the output of.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Emma Anholt
1bdab45594
ci/i915: Update deqp expectations for another test passing.
...
!11411 made this one start passing thanks to reducing instruction counts.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110 >
2021-08-03 18:32:01 +00:00
Lionel Landwerlin
97be8e42e4
intel/disasm: fix missing oword index decoding
...
Also switch to array of strings to show high/low dwords.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: daba2894ff ("intel/disasm: decode/describe more send messages")
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12183 >
2021-08-03 17:26:37 +00:00
Pierre Moreau
b4e5bf0637
clover/nir: Set constant buffer pointer size to host
...
The `argument::size` is supposed to represent the size of a pointer on
the host and not on the device (for which argument::target_size`
exists).
v3: Use `sizeof(buf)` instead of `marg.size`. (Francisco Jerez)
Fixes: 7c6f1d3bf9 ("clover/nir: extract constant buffer into its own section")
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256 >
2021-08-03 16:43:49 +00:00
Pierre Moreau
54dcccd535
clover/api: Interleave details in dispatch table
...
By adding comments regarding which version or extension introduced the
following dispatched functions, it makes it easier to glance at the
table and see which functions are missing for a particular version, but
more importantly makes it easier to compare against cl_icd.h and see if
anything is missing.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256 >
2021-08-03 16:43:48 +00:00
Pierre Moreau
a6c26a6ad9
clover/spirv: Properly size 3-component vector args
...
This resolves clover returning `CL_INVALID_ARG_SIZE` whenever the OpenCL
CTS called `clSetKernelArg()` for 3-component vectors.
Fixes: 2147386505 ("clover/spirv: Add functions for parsing arguments, linking programs, etc.")
v2: Remove “api/clsetkernelarg/set kernel argument for cl_int3” from the
expected fails for llvmpipe
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256 >
2021-08-03 16:43:48 +00:00
Pierre Moreau
f69d1c1c56
clover/spirv: Increase max amount of function args
...
OpenCL only has an upper limit on the size taken by all arguments to a
kernel (implementation-defined, but at least 1024 bytes), and not on the
count of those arguments.
This fixes OpenCL-CTS’s api.min_max_parameter_size.
v2: Use `numeric_limits<>::max()` instead of hardcoded value.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256 >
2021-08-03 16:43:48 +00:00
Karol Herbst
5ffe059fd2
clover: Local memory needs to be aligned.
...
Fixes a couple of OpenCL CTS tests.
v3:
* Add a comment in module.hpp explaining that target_align means
something different for arguments of type local (Francisco Jerez)
* Squash in the fix for the LLVM backend.
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256 >
2021-08-03 16:43:48 +00:00
Pierre Moreau
8061dfef6b
clover: Do not advertise OpenCL x.y when unsupported
...
Instead of hardcoding a fixed version for all devices, compute the
highest version supported by a device based on the different constraints
mandated by each new version.
For example, besides new functionalities, OpenCL 1.1 also increases the
minimum limits regarding the amount of local memory and the amount of
bytes taken by all arguments to a kernel. Some hardware (such as all
GPUs from NVIDIA’s Tesla micro-architecture) can support the additional
features but do not pass those new minimums.
v3:
* Change `get_highest_supported_version()` to return the version instead
of modifying the version components passed as arguments. (Francisco
Jerez)
* Tweak the line wrapping for `has_extension()`. (Francisco Jerez)
v2:
* Invert the ordering of OpenCL and OpenCL C version, to restrict OpenCL
version based on supported OpenCL C version.
* Rename `get_supported_version()` to `get_highest_supported_version()`;
* Use device methods to query parameters instead of manually executing
them;
* Clarify that the limit checking is only for non-custom devices
supporting the full profile.
* Check for mandatory extensions as well;
* Validate CL_DEVICE_MEM_BASE_ADDR_ALIGN;
* Fix the OpenCL>=1.1 minimum limit for CL_DEVICE_LOCAL_MEM_SIZE, from
32 * 1000 to 32 * 1024;
* Restrict to OpenCL 1.0 if OpenCL C 1.1 is not supported.
* Compute the highest supported version based on constraints (ignoring
2.x versions).
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256 >
2021-08-03 16:43:48 +00:00
Erik Faye-Lund
cd79351f02
d3d12: split up root parameter update and set
...
SRV descriptors can require state-transitions before it's legal to set
them on the command-list. We used to just set them right away, and get
away with is, because the validator didn't verify this because we used
to flag the parameters as volatile.
Now that we don't, we trigger validation errors when setting a root
parameter that needs a transition first.
So let's split up the logic a bit, so we can prepare the tables, then do
the transision, and finally set the tables. We do this for all tables
instead of just the SRVs, just because it makes the logic a bit easier to
follow. We leave root constants alone, because they will never require
this, and doing them late would just compilcate things.
Fixes: 1208290558 ("d3d12: Sets all SRV descriptors as data-static")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12187 >
2021-08-03 16:17:11 +00:00
Corentin Noël
06edc6adc8
ci: Use crosvm to run dEQP tests for virgl
...
Allows to use virtio-gpu to actually test the virgl driver.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320 >
2021-08-03 14:24:08 +00:00
Corentin Noël
481e7508be
ci: Increase crosvm version
...
Also require newer dependencies.
This makes it easier to debug possible crosvm issues as a big refactor occured since the
previous commit included in the CI.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320 >
2021-08-03 14:24:08 +00:00
Corentin Noël
0da2ebff27
ci: Increase the default Rust toolchain version
...
We need a newer Rust toolchain to be able to build the latest crosvm.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320 >
2021-08-03 14:24:08 +00:00
Corentin Noël
33d9954bc1
ci: Disable llvmpipe optimizations when running virgl CI
...
We are only using the result once so we spend more time optimizing it than
actually using it.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320 >
2021-08-03 14:24:08 +00:00
Juan A. Suarez Romero
10541d1fad
gallium/hud: initialize query
...
Most of the drivers don't set up the maximum value in the query info. So
when later hud_pane_set_max_value() is invoked, we are using a rather
"random" number.
Turns out that in some 32bit cases, this random number is big enough
that `leftmost_digit` is 0 because DIV_ROUND_UP() overflows, aborting
with an assertion.
Fixes: c91cf7d7d2 ("gallium: implement a heads-up display module")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12181 >
2021-08-03 14:05:32 +00:00
Samuel Pitoiset
ad83c06a5f
radv: fix missing cache flushes when clearing HTILE levels on GFX10+
...
The driver should accumulate the cache flush bits because if it uses
CP DMA for clearing the last level, it won't flush.
Found by inspection.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12170 >
2021-08-03 12:59:57 +00:00
Samuel Pitoiset
ebea075feb
radv: fix selecting the first active CU when profiling with SQTT
...
Fixes: d26bcc0f5c ("radv: always select the first active CU when profiling with SQTT")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12167 >
2021-08-03 12:30:41 +00:00
Erik Faye-Lund
f395057a82
gallivm: remove pointless no_filter_hacks flag
...
This flag now does the same thing as the no_quad_lod flag, so let's get
rid of it to reduce confusion.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12125 >
2021-08-03 12:08:38 +00:00
Emma Anholt
4f56ded362
ci: Stop disabling filter hacks for llvmpipe.
...
Now that we've disabled brilinear and have per-pixel cube derivatives, we
can use the same rendering paths that end users will see.
In a few cases, we switch to the no_quad_lod option instead, because
otherwise we get a piglit failure.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12125 >
2021-08-03 12:08:38 +00:00
Erik Faye-Lund
34423391e0
gallivm: make rho-approximation opt-in instead of opt-out
...
The RHO approximation code has issues passing the OpenGL ES 3.0 CTS, so
let's make correctness the default instead.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12125 >
2021-08-03 12:08:38 +00:00
Timothy Arceri
6538b3e566
nir: add heuristic for instructions in loops with GCM
...
Moving instructions out of large loops tends to cause excessive
spilling. This appears to be a good limit.
In future it might make sense to make this a NIR options so
other drivers can set their own limits.
Tiger Lake
total instructions in shared programs: 20930180 -> 20926952 (-0.02%)
instructions in affected programs: 280768 -> 277540 (-1.15%)
helped: 734
HURT: 192
helped stats (abs) min: 1 max: 61 x̄: 5.16 x̃: 4
helped stats (rel) min: 0.04% max: 10.64% x̄: 3.23% x̃: 3.14%
HURT stats (abs) min: 1 max: 52 x̄: 2.90 x̃: 1
HURT stats (rel) min: 0.03% max: 9.76% x̄: 1.13% x̃: 0.61%
95% mean confidence interval for instructions value: -3.89 -3.08
95% mean confidence interval for instructions %-change: -2.49% -2.16%
Instructions are helped.
total cycles in shared programs: 841825217 -> 838817552 (-0.36%)
cycles in affected programs: 122088078 -> 119080413 (-2.46%)
helped: 941
HURT: 100
helped stats (abs) min: 1 max: 160080 x̄: 3274.31 x̃: 2660
helped stats (rel) min: <.01% max: 41.64% x̄: 5.50% x̃: 4.80%
HURT stats (abs) min: 1 max: 41856 x̄: 734.62 x̃: 26
HURT stats (rel) min: <.01% max: 7.29% x̄: 0.44% x̃: 0.27%
95% mean confidence interval for cycles value: -3236.56 -2541.85
95% mean confidence interval for cycles %-change: -5.26% -4.60%
Cycles are helped.
total sends in shared programs: 977905 -> 977782 (-0.01%)
sends in affected programs: 2279 -> 2156 (-5.40%)
helped: 119
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 6.93% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.42% -6.45%
Sends are helped.
LOST: 2
GAINED: 0
Ice Lake
total instructions in shared programs: 19865361 -> 19861747 (-0.02%)
instructions in affected programs: 185789 -> 182175 (-1.95%)
helped: 593
HURT: 47
helped stats (abs) min: 1 max: 27 x̄: 6.17 x̃: 4
helped stats (rel) min: 0.19% max: 8.65% x̄: 4.53% x̃: 4.60%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.03% max: 0.23% x̄: 0.11% x̃: 0.04%
95% mean confidence interval for instructions value: -5.93 -5.37
95% mean confidence interval for instructions %-change: -4.32% -4.06%
Instructions are helped.
total loops in shared programs: 6120 -> 6117 (-0.05%)
loops in affected programs: 6 -> 3 (-50.00%)
helped: 3
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
total cycles in shared programs: 961777176 -> 959404350 (-0.25%)
cycles in affected programs: 172224180 -> 169851354 (-1.38%)
helped: 936
HURT: 80
helped stats (abs) min: 1 max: 9566 x̄: 2621.08 x̃: 2550
helped stats (rel) min: <.01% max: 41.77% x̄: 4.22% x̃: 3.84%
HURT stats (abs) min: 1 max: 59146 x̄: 1006.34 x̃: 24
HURT stats (rel) min: <.01% max: 3.78% x̄: 0.44% x̃: 0.25%
95% mean confidence interval for cycles value: -2513.72 -2157.20
95% mean confidence interval for cycles %-change: -4.13% -3.57%
Cycles are helped.
total sends in shared programs: 1019995 -> 1019872 (-0.01%)
sends in affected programs: 2283 -> 2160 (-5.39%)
helped: 119
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 6.91% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.39% -6.42%
Sends are helped.
LOST: 4
GAINED: 0
Skylake
total instructions in shared programs: 17994337 -> 17993846 (<.01%)
instructions in affected programs: 146294 -> 145803 (-0.34%)
helped: 190
HURT: 47
helped stats (abs) min: 1 max: 12 x̄: 2.83 x̃: 3
helped stats (rel) min: 0.14% max: 4.29% x̄: 1.08% x̃: 0.90%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.03% max: 0.22% x̄: 0.11% x̃: 0.04%
95% mean confidence interval for instructions value: -2.30 -1.84
95% mean confidence interval for instructions %-change: -0.95% -0.74%
Instructions are helped.
total loops in shared programs: 6029 -> 6023 (-0.10%)
loops in affected programs: 12 -> 6 (-50.00%)
helped: 6
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.
total cycles in shared programs: 939062940 -> 938023548 (-0.11%)
cycles in affected programs: 169671482 -> 168632090 (-0.61%)
helped: 980
HURT: 134
helped stats (abs) min: 1 max: 25000 x̄: 1075.57 x̃: 1052
helped stats (rel) min: <.01% max: 42.75% x̄: 2.51% x̃: 1.32%
HURT stats (abs) min: 1 max: 837 x̄: 109.45 x̃: 20
HURT stats (rel) min: <.01% max: 5.71% x̄: 0.73% x̃: 0.21%
95% mean confidence interval for cycles value: -1005.89 -860.17
95% mean confidence interval for cycles %-change: -2.39% -1.84%
Cycles are helped.
total sends in shared programs: 1026848 -> 1026724 (-0.01%)
sends in affected programs: 2302 -> 2178 (-5.39%)
helped: 120
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 6.91% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.40% -6.43%
Sends are helped.
LOST: 1
GAINED: 1
Broadwell
total instructions in shared programs: 17605621 -> 17605154 (<.01%)
instructions in affected programs: 145691 -> 145224 (-0.32%)
helped: 184
HURT: 48
helped stats (abs) min: 1 max: 12 x̄: 2.83 x̃: 3
helped stats (rel) min: 0.13% max: 4.29% x̄: 1.09% x̃: 0.93%
HURT stats (abs) min: 1 max: 7 x̄: 1.12 x̃: 1
HURT stats (rel) min: 0.03% max: 0.48% x̄: 0.12% x̃: 0.04%
95% mean confidence interval for instructions value: -2.26 -1.77
95% mean confidence interval for instructions %-change: -0.95% -0.73%
Instructions are helped.
total loops in shared programs: 5968 -> 5963 (-0.08%)
loops in affected programs: 10 -> 5 (-50.00%)
helped: 5
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.
total cycles in shared programs: 1000679489 -> 998592756 (-0.21%)
cycles in affected programs: 173421234 -> 171334501 (-1.20%)
helped: 993
HURT: 153
helped stats (abs) min: 1 max: 766608 x̄: 2118.49 x̃: 1080
helped stats (rel) min: <.01% max: 54.61% x̄: 2.61% x̃: 1.73%
HURT stats (abs) min: 1 max: 2200 x̄: 110.61 x̃: 11
HURT stats (rel) min: <.01% max: 5.68% x̄: 0.63% x̃: 0.06%
95% mean confidence interval for cycles value: -3191.23 -450.54
95% mean confidence interval for cycles %-change: -2.47% -1.89%
Cycles are helped.
total sends in shared programs: 996341 -> 996222 (-0.01%)
sends in affected programs: 2151 -> 2032 (-5.53%)
helped: 115
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 7.07% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.55% -6.58%
Sends are helped.
Haswell
total instructions in shared programs: 16038375 -> 16038121 (<.01%)
instructions in affected programs: 216797 -> 216543 (-0.12%)
helped: 185
HURT: 217
helped stats (abs) min: 1 max: 12 x̄: 2.84 x̃: 3
helped stats (rel) min: 0.13% max: 4.23% x̄: 1.30% x̃: 1.20%
HURT stats (abs) min: 1 max: 6 x̄: 1.25 x̃: 1
HURT stats (rel) min: 0.03% max: 5.66% x̄: 0.61% x̃: 0.40%
95% mean confidence interval for instructions value: -0.85 -0.41
95% mean confidence interval for instructions %-change: -0.40% -0.14%
Instructions are helped.
total loops in shared programs: 5947 -> 5942 (-0.08%)
loops in affected programs: 10 -> 5 (-50.00%)
helped: 5
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.
total cycles in shared programs: 967655093 -> 965746713 (-0.20%)
cycles in affected programs: 197288924 -> 195380544 (-0.97%)
helped: 950
HURT: 195
helped stats (abs) min: 1 max: 782820 x̄: 2274.79 x̃: 1260
helped stats (rel) min: <.01% max: 54.26% x̄: 3.02% x̃: 1.71%
HURT stats (abs) min: 1 max: 15790 x̄: 1295.73 x̃: 21
HURT stats (rel) min: <.01% max: 119.85% x̄: 7.76% x̃: 0.11%
95% mean confidence interval for cycles value: -3014.22 -319.19
95% mean confidence interval for cycles %-change: -1.83% -0.55%
Cycles are helped.
total sends in shared programs: 934894 -> 934765 (-0.01%)
sends in affected programs: 2192 -> 2063 (-5.89%)
helped: 115
HURT: 2
helped stats (abs) min: 1 max: 4 x̄: 1.14 x̃: 1
helped stats (rel) min: 0.60% max: 28.57% x̄: 7.68% x̃: 6.67%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 16.67% max: 16.67% x̄: 16.67% x̃: 16.67%
95% mean confidence interval for sends value: -1.23 -0.98
95% mean confidence interval for sends %-change: -8.28% -6.24%
Sends are helped.
LOST: 1
GAINED: 18
Ivy Bridge
total instructions in shared programs: 15269357 -> 15269398 (<.01%)
instructions in affected programs: 190484 -> 190525 (0.02%)
helped: 77
HURT: 206
helped stats (abs) min: 1 max: 6 x̄: 2.47 x̃: 3
helped stats (rel) min: 0.14% max: 5.31% x̄: 1.46% x̃: 1.65%
HURT stats (abs) min: 1 max: 3 x̄: 1.12 x̃: 1
HURT stats (rel) min: 0.03% max: 2.38% x̄: 0.42% x̃: 0.40%
95% mean confidence interval for instructions value: -0.06 0.35
95% mean confidence interval for instructions %-change: -0.21% 0.03%
Inconclusive result (value mean confidence interval includes 0).
total loops in shared programs: 4001 -> 3996 (-0.12%)
loops in affected programs: 10 -> 5 (-50.00%)
helped: 5
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.
total cycles in shared programs: 562045564 -> 561063543 (-0.17%)
cycles in affected programs: 200924872 -> 199942851 (-0.49%)
helped: 748
HURT: 160
helped stats (abs) min: 2 max: 14926 x̄: 1692.94 x̃: 1620
helped stats (rel) min: <.01% max: 53.29% x̄: 3.17% x̃: 1.87%
HURT stats (abs) min: 2 max: 15726 x̄: 1776.86 x̃: 36
HURT stats (rel) min: <.01% max: 114.43% x̄: 10.66% x̃: 0.21%
95% mean confidence interval for cycles value: -1237.33 -925.71
95% mean confidence interval for cycles %-change: -1.54% 0.08%
Inconclusive result (%-change mean confidence interval includes 0).
total sends in shared programs: 893348 -> 893330 (<.01%)
sends in affected programs: 187 -> 169 (-9.63%)
helped: 14
HURT: 0
helped stats (abs) min: 1 max: 2 x̄: 1.29 x̃: 1
helped stats (rel) min: 4.08% max: 22.22% x̄: 11.70% x̃: 10.10%
95% mean confidence interval for sends value: -1.56 -1.02
95% mean confidence interval for sends %-change: -14.92% -8.48%
Sends are helped.
LOST: 1
GAINED: 19
Sandy Bridge
total instructions in shared programs: 11785227 -> 11785774 (<.01%)
instructions in affected programs: 78403 -> 78950 (0.70%)
helped: 65
HURT: 505
helped stats (abs) min: 1 max: 4 x̄: 2.22 x̃: 3
helped stats (rel) min: 0.14% max: 4.17% x̄: 1.19% x̃: 1.38%
HURT stats (abs) min: 1 max: 5 x̄: 1.37 x̃: 1
HURT stats (rel) min: 0.24% max: 3.33% x̄: 1.57% x̃: 1.72%
95% mean confidence interval for instructions value: 0.85 1.07
95% mean confidence interval for instructions %-change: 1.16% 1.36%
Instructions are HURT.
total loops in shared programs: 2441 -> 2437 (-0.16%)
loops in affected programs: 8 -> 4 (-50.00%)
helped: 4
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.
total cycles in shared programs: 497178796 -> 496669298 (-0.10%)
cycles in affected programs: 51483322 -> 50973824 (-0.99%)
helped: 476
HURT: 137
helped stats (abs) min: 2 max: 7502 x̄: 1079.36 x̃: 1260
helped stats (rel) min: <.01% max: 42.50% x̄: 2.31% x̃: 0.86%
HURT stats (abs) min: 2 max: 754 x̄: 31.23 x̃: 18
HURT stats (rel) min: <.01% max: 3.01% x̄: 0.09% x̃: 0.02%
95% mean confidence interval for cycles value: -901.99 -760.32
95% mean confidence interval for cycles %-change: -2.20% -1.36%
Cycles are helped.
total sends in shared programs: 642919 -> 642915 (<.01%)
sends in affected programs: 32 -> 28 (-12.50%)
helped: 4
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 11.11% max: 14.29% x̄: 12.70% x̃: 12.70%
95% mean confidence interval for sends value: -1.00 -1.00
95% mean confidence interval for sends %-change: -15.61% -9.78%
Sends are helped.
Iron Lake
total instructions in shared programs: 8180061 -> 8180248 (<.01%)
instructions in affected programs: 65004 -> 65191 (0.29%)
helped: 59
HURT: 253
helped stats (abs) min: 1 max: 4 x̄: 2.24 x̃: 3
helped stats (rel) min: 0.16% max: 2.23% x̄: 1.04% x̃: 1.29%
HURT stats (abs) min: 1 max: 5 x̄: 1.26 x̃: 1
HURT stats (rel) min: 0.21% max: 3.85% x̄: 0.93% x̃: 0.60%
95% mean confidence interval for instructions value: 0.43 0.77
95% mean confidence interval for instructions %-change: 0.45% 0.68%
Instructions are HURT.
total loops in shared programs: 863 -> 861 (-0.23%)
loops in affected programs: 4 -> 2 (-50.00%)
helped: 2
HURT: 0
total cycles in shared programs: 239357490 -> 238907668 (-0.19%)
cycles in affected programs: 17314006 -> 16864184 (-2.60%)
helped: 176
HURT: 34
helped stats (abs) min: 4 max: 13400 x̄: 2558.05 x̃: 2920
helped stats (rel) min: 0.01% max: 35.58% x̄: 3.76% x̃: 2.69%
HURT stats (abs) min: 2 max: 14 x̄: 11.59 x̃: 14
HURT stats (rel) min: <.01% max: 0.06% x̄: 0.03% x̃: 0.03%
95% mean confidence interval for cycles value: -2440.68 -1843.34
95% mean confidence interval for cycles %-change: -3.78% -2.51%
Cycles are helped.
GM45
total instructions in shared programs: 4985293 -> 4985401 (<.01%)
instructions in affected programs: 58807 -> 58915 (0.18%)
helped: 57
HURT: 202
helped stats (abs) min: 1 max: 4 x̄: 2.26 x̃: 3
helped stats (rel) min: 0.15% max: 2.23% x̄: 1.06% x̃: 1.29%
HURT stats (abs) min: 1 max: 5 x̄: 1.17 x̃: 1
HURT stats (rel) min: 0.21% max: 3.85% x̄: 0.76% x̃: 0.48%
95% mean confidence interval for instructions value: 0.22 0.61
95% mean confidence interval for instructions %-change: 0.24% 0.48%
Instructions are HURT.
total loops in shared programs: 639 -> 638 (-0.16%)
loops in affected programs: 2 -> 1 (-50.00%)
helped: 1
HURT: 0
total cycles in shared programs: 153794236 -> 153546274 (-0.16%)
cycles in affected programs: 9947778 -> 9699816 (-2.49%)
helped: 110
HURT: 31
helped stats (abs) min: 4 max: 13400 x̄: 2257.51 x̃: 1796
helped stats (rel) min: 0.01% max: 35.58% x̄: 4.33% x̃: 2.45%
HURT stats (abs) min: 2 max: 14 x̄: 11.74 x̃: 14
HURT stats (rel) min: <.01% max: 0.06% x̄: 0.03% x̃: 0.03%
95% mean confidence interval for cycles value: -2113.77 -1403.42
95% mean confidence interval for cycles %-change: -4.27% -2.47%
Cycles are helped.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2899
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064 >
2021-08-03 10:54:50 +00:00
Timothy Arceri
a7f2e683de
nir: move nir_block_ends_in_break() to nir.h
...
Will be used in a following commit.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064 >
2021-08-03 10:54:50 +00:00
Timothy Arceri
a9ed4538ab
nir: add indirect loop unrolling to compiler options
...
This is where it should be rather than having to pass it into the
optimisation pass every time.
It also allows us to call the loop analysis pass without having to
duplicate these options which we will do later in this series.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064 >
2021-08-03 10:54:50 +00:00
Timothy Arceri
a654e39f15
intel/compiler: make sure swizzle is applied to if condition
...
This fixes a hang in the following piglit test when GCM moves a
UBO load outside of the loop.
tests/shaders/ssa/fs-if-def-else-break.shader_test
The end NIR ends up looking like this:
vec2 32 ssa_3 = intrinsic load_ubo (ssa_2, ssa_0) (0, 1073741824, 0, 0, 8)
vec1 32 ssa_4 = mov ssa_3.x
vec1 32 ssa_5 = inot ssa_3.y
/* succs: block_1 */
loop {
...
if ssa_5 { }
}
Fixes: 1edf67fc3f ("intel/fs: Generate if instructions with inverted conditions")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064 >
2021-08-03 10:54:50 +00:00
Juan A. Suarez Romero
4f7043fc0c
v3d/simulator: implement performance counters
...
Add support for performance counters when using the simulator.
v2 (Iago):
- Remove brackets from single-line conditionals
- Rename channel to channels
- Ensure perfmon start/stop function is implemented in all versions
- Use an array for perfmons instead of hash table
- Implement performance counters in CSD
v3 (Iago):
- Rename PERFMON_CHUNKS to PERFMONS_ALLOC_SIZE.
- Merge increasing lastid and ensuring space in a single function.
v4 (Iago):
- Assert perfid <= perfmons_size.
v7 (Iago):
- Do not stop perfmon on each submission
v8 (Iago):
- Add comment about stopping the perfmon when retrieving values.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 >
2021-08-03 08:33:52 +00:00
Juan A. Suarez Romero
685281278e
v3d: implement performance counter queries
...
These queries are used to retrieve the different hardware counters
values, useful to detect performance issues.
v2 (Iago):
- Fix copyright
- Assert hwperfmon exists
- Print message on error
- Rename hwperfmon structure to make it clear
v4 (Juan):
- Save last_job_fence when perfmon is stopped
v5 (Juan):
- No need to ask for counter values if no job was submitted
v6 (Juan):
- Ensure to flush all jobs before capturing last job fence
v7 (Iago)
- No braces for single-line body conditionals
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 >
2021-08-03 08:33:52 +00:00
Juan A. Suarez Romero
e928aece50
v3d: add fence wait function
...
Waits for a V3D fence to be signaled.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 >
2021-08-03 08:33:52 +00:00
Juan A. Suarez Romero
c59d8a1798
v3d: move queries to pipe queries
...
All the current queries are pipe-related queries; move them to a
different file to add later performance counter queries.
v3 (Iago):
- Fix copyright.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 >
2021-08-03 08:33:52 +00:00
Juan A. Suarez Romero
9969703547
v3d: attach performance monitor to jobs
...
When a performance monitor is enabled in the context, all the jobs
submitted to the kernel will have attached this monitor ID, so the
kernel will measuring the performance counters selected in the monitor
when these jobs are executed by the GPU (accumulating the results).
v2 (Iago):
- Update comment
- Assert fence is not NULL
- Assert has_perfmon when using perfmon
- Rewrite conditional
- Implement performance counters in CSD
v4 (Juan):
- Track previous perfmon and sync BCL if required (Juan).
- Track if a job with perfmon was submitted (Juan)
v7 (Iago)
- No braces for single-line body conditionals
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 >
2021-08-03 08:33:52 +00:00
Juan A. Suarez Romero
6b9fcb0193
v3d: check if device supports performance monitors
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 >
2021-08-03 08:33:52 +00:00
Juan A. Suarez Romero
ca13868098
drm-uapi: add v3d performance counters
...
Extends CL submit to include performance monitor, and add proper ioctl
calls to create, destroy and query performance monitor counters.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 >
2021-08-03 08:33:52 +00:00
Samuel Pitoiset
a49b397041
ac/surface: implement CmaskAddrFromCoord in NIR
...
It's similar to DCC, only GFX9 is currently supported.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12140 >
2021-08-03 07:02:48 +00:00
Samuel Pitoiset
eedc0b59b7
ac/surface: copy the CMASK equation to radeon_surf
...
Only GFX9 is currently supported.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12140 >
2021-08-03 07:02:48 +00:00
Samuel Pitoiset
1f12c3ccc1
ac/surface: store CMASK pitch and height to radeon_surf
...
Only GFX9+ is currently supported.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12140 >
2021-08-03 07:02:48 +00:00
Samuel Pitoiset
132b205566
ac/surface: add tests for CmaskAddrFromCoord prototype outside of addrlib
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12140 >
2021-08-03 07:02:48 +00:00
Samuel Pitoiset
96e12644f3
amd/addrlib: expose CMASK address equations to drivers on GFX9
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12140 >
2021-08-03 07:02:48 +00:00
Samuel Pitoiset
501db87779
ac: introduce a structure to store DCC address equations for GFX9
...
CMASK addr equations will use the same struct.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12140 >
2021-08-03 07:02:48 +00:00
Paulo Zanoni
b705114d9c
iris: mark the workaround_bo as asynchronous
...
Opt out of implicit synchronization for the workaround bo: we already
never mark it as writable and we only write to it as part of
PIPE_CONTROL synchronization requirements. Setting it as ASYNC should
be enough for i915.ko to pin it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12151 >
2021-08-03 00:26:13 +00:00
Rob Clark
b9129496a2
freedreno: Unleash the dragon!
...
A number of android games are so far, sadly, unaware of open source
drivers. And when they see an unknown driver they lump it in the lowest
performance tier, artificially limiting framerate and/or gfx settings.
So until the games catch up, use driconf to override vendor/renderer
settings for moar fps and nicer gfx.
Furthermore, some games seem to be limiting *too* conservatively when
we otherwise have plenty of headroom even if we claim to be a bigger
adreno. Possibly a concession to battery life or tighter thermal
constraints in a phone, as compared to something like a chromebook.
Or maybe the flagship gaming phone thing is a scam ;-)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135 >
2021-08-02 16:37:26 -07:00
Rob Clark
8813dfab83
freedreno: Support per-device driconf overrides
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135 >
2021-08-02 16:37:26 -07:00
Rob Clark
7094cc78a4
driconf: Add force_gl_renderer override
...
Allow driconf to also override GL_RENDERER string.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135 >
2021-08-02 16:37:26 -07:00
Rob Clark
6edf0d8e90
driconfig: Add support for device specific config
...
Add support for driconf overrides on a per-device level, for cases
where we don't want to override behavior for all devices supported
by a particular driver.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135 >
2021-08-02 16:37:24 -07:00
Emma Anholt
b080aa9466
gallium/driconf: Allow the driver to parse the driconf options.
...
This will give the driver a chance to set a device name separate from the
driver name, using info probed during screen creation. All drivers
querying driconf in screen creation now have to call parsing on their own,
but other drivers get fallback parsing after screen creation.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135 >
2021-08-02 16:35:07 -07:00
Emma Anholt
fdf9ebf317
gallium/dri2: Make dri_init_options just init DRI options.
...
pipe_loader_create_screen() sets up the driconf anyway, so we can just
call this after that.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135 >
2021-08-02 16:35:07 -07:00
Ella-0
23a9339985
v3dv: Implement VK_EXT_custom_border_color
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12076 >
2021-08-02 22:55:33 +00:00
Ella-0
0a464f2e07
v3dv: Add is_unorm, is_snorm and is_float format functions
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12076 >
2021-08-02 22:55:33 +00:00
Chia-I Wu
a753f50668
venus: break up vn_device.c
...
Break it up into vn_{device,instance,physical_device}.c. Suggested by
Ryan Neph.
vn_EnumerateDeviceExtensionProperties and
vn_EnumerateDeviceLayerProperties were previously said to be device
commands. But in this commit, we move them to vn_physical_device.c
instead.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12144 >
2021-08-02 22:45:45 +00:00
Chia-I Wu
22cb100ea0
venus: break up vn_device.h
...
Break it up into vn_{device,instance,physical_device}.h. Suggested by
Ryan Neph.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12144 >
2021-08-02 22:45:45 +00:00
Chia-I Wu
4b364ab4bc
venus: update venus-protocol headers
...
Updated to 1.2.182. Added some NULL checks.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12144 >
2021-08-02 22:45:45 +00:00
Chia-I Wu
b4214adefc
iris, crocus: add idep_genxml to per_hw target dependencies
...
Fixes
In file included from ../src/gallium/drivers/iris/iris_query.c:49:
../src/gallium/drivers/iris/iris_genx_macros.h:81:10: fatal error: genxml/genX_bits.h: No such file or directory
and
In file included from ../src/gallium/drivers/crocus/crocus_query.c:50:
../src/gallium/drivers/crocus/crocus_genx_macros.h:86:10: fatal error: genxml/genX_bits.h: No such file or directory
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12149 >
2021-08-02 22:27:36 +00:00
Marek Olšák
521651d106
st/mesa: remove st_vertex_program::input_to_index
...
It's the same as a prefix bitcount of inputs_read.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Marek Olšák
b5c9a695b9
st/mesa: remove st_vertex_program::index_to_input
...
We just need the mask of used vertex attribs.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Marek Olšák
77c2b022a0
st/mesa: remove lowering of 64-bit vertex attribs to 32 bits
...
pipe_context::create_vertex_elements_state lowers them now.
This removes a bunch of code that is no longer needed.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Marek Olšák
8b6fd3f786
gallium: lower raw 64-bit vertex formats in cso/vbuf instead of st/mesa
...
This lower each 64-bit vertex element into 1 or 2 32-bit vertex elements.
The motivation is to simplify st/mesa, which uses a lot more complicated
code to do the same thing, and do the lowering only on a cso_cache miss.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Marek Olšák
7b23b7c88e
gallium: add pipe_vertex_element::dual_slot to move lowering to CSO creation
...
This just adds the new field. It will be used to lower 64-bit attribs
in drivers (via a helper).
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Marek Olšák
4a713c568b
gallium: add multi-component 64-bit UINT formats for raw double vertex attribs
...
This is the distinction between formats:
- PIPE_FORMAT_R64_FLOAT is the legacy "convert-to-float" vertex format.
- PIPE_FORMAT_R64_UINT is the raw double format.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Marek Olšák
e002f5a086
gallium: change pipe_vertex_element::src_format to uint8_t
...
This removes the bitfield packing/unpacking.
pipe_format entries are reordered to have vertex formats first because
vertex formats must be <= 255.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Marek Olšák
df5a2bbb41
shader_enums,mesa: move VERT_ATTRIB_EDGEFLAG to slot 31 for st/mesa
...
A future commit will replace st_vertex_program::input_to_index with
a prefix bitcount of inputs_read, but it needs vertex inputs to be
in the same order as vertex attribs.
Some of the FF definitions don't make sense with this ordering and are
removed.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Dave Airlie
842b8c8965
crocus: add support for set alpha to one with blt.
...
This is ported from 965 and fixes
dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.*rebind_tex2d_rgb*
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12164 >
2021-08-03 05:38:41 +10:00
Dave Airlie
de625dddee
intel/genxml: fix raster operation field in blt genxml
...
This field should be a uint, further changes on top of previous
ones in this area
Fixes: 4d80ec8fcf ("intel/genxml: fix raster op fields on gen4/5")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12164 >
2021-08-03 05:38:25 +10:00
Dave Airlie
c12444ab88
crocus/gen45: fix mapping compressed textures
...
I don't think iris ever hits this path, but probably has the same bug if
it did.
Fixes texsubimage on gfx4 + gfx4.5
Fixes: 5bf6ec31cc ("crocus/gen4: restrict memcpy mapping to gen5")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12164 >
2021-08-03 05:37:52 +10:00
xantares
48980b7b7a
lavapipe: Fix 32bits windows build
...
Fixes: 94a49828
Closes #5161
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12165 >
2021-08-02 17:59:37 +00:00
Emma Anholt
c2a6143755
turnip: Fix assertions on checking mutable combined samplers support.
...
We would determine that it was unsupported, then ask for the size and
triggered the assertion checking that we never ask for the size of a
combined sampler.
Fixes: ee3495e465 ("turnip: Add support for VK_VALVE_mutable_descriptor_type")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12148 >
2021-08-02 17:41:54 +00:00
Danylo Piliaiev
ea7a42775b
turnip: reduce maxComputeWorkGroupSize
...
Blob advertises { 1024, 1024, 64 }, but from tests they all
could be 1024.
Fixes tests:
dEQP-VK.compute.basic.max_local_size_x
dEQP-VK.compute.basic.max_local_size_y
dEQP-VK.compute.basic.max_local_size_z
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9409 >
2021-08-02 20:19:18 +03:00
Yiwei Zhang
e08960482a
venus: cache ahb backed buffer memory type bits requirement
...
To properly init buffer memory requirement for AHB, memory type bits
from dma_buf fd properties need to be masked. However, creating a test
AHB at buffer creation is too costy. This patch caches the ahb backed
buffer memory type bits at device creation time if the app is requesting
AHB extension.
Cc: 21.2 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12171 >
2021-08-02 17:03:06 +00:00
Sagar Ghuge
5ed5d08141
genxml/gen125: Update debug register fields according to HW
...
Updating fields helps to decode the error state correctly.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12133 >
2021-08-02 16:45:31 +00:00
Sagar Ghuge
910d5f1973
genxml/gen12: Update debug register fields according to HW
...
Updating fields helps to decode the error state correctly.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12133 >
2021-08-02 16:45:31 +00:00
Pierre-Eric Pelloux-Prayer
1ff53359cb
radeonsi: add expected tests results for Navi10 GPU
...
These results will not be enforced by CI, but they'll be helpful to test
a changeset against a baseline.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9561 >
2021-08-02 17:27:15 +02:00
Pierre-Eric Pelloux-Prayer
1c8f23cf93
radeonsi: add a script to run piglit/glcts/deqp tests
...
To make it easy to run deqp-runner/piglit-runner.
It's heavily based on Marek' script from:
https://github.com/marekolsak/marek-build/blob/master/run-piglit.sh
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9561 >
2021-08-02 17:27:15 +02:00
Timur Kristóf
a6110f3c3a
ac/nir: Remove unhelpful nir_opt_cse from ac_nir_lower_ngg_nogs.
...
This CSE call adds to our compile time without adding any real
benefit to the compiled code.
Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 1580 (1.23% of 128647) affected shaders:
CodeSize: 4563912 -> 4562312 (-0.04%); split: -0.07%, +0.03%
Instrs: 870722 -> 870338 (-0.04%); split: -0.09%, +0.04%
Latency: 3349863 -> 3351458 (+0.05%); split: -0.10%, +0.14%
InvThroughput: 617796 -> 617971 (+0.03%); split: -0.01%, +0.03%
VClause: 22604 -> 22568 (-0.16%); split: -0.75%, +0.59%
SClause: 16285 -> 16327 (+0.26%); split: -0.07%, +0.33%
Copies: 83472 -> 83599 (+0.15%); split: -0.07%, +0.22%
PreSGPRs: 62340 -> 62334 (-0.01%)
No Fossil DB changes with NGGC off.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11908 >
2021-08-02 11:38:25 +00:00
Timur Kristóf
da9f4b2e67
nir, aco: Remove vertex and primitive count overwrite intrinsic.
...
It's no longer needed.
No Fossil DB changes.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11908 >
2021-08-02 11:38:25 +00:00
Timur Kristóf
4b540aef2c
ac/nir: Don't count vertices and primitives in wave after culling.
...
These are not needed anymore, because the EXEC mask doesn't depend on them.
Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 58239 (45.27% of 128647) affected shaders:
Latency: 138113669 -> 138285372 (+0.12%)
InvThroughput: 22404840 -> 22405245 (+0.00%)
No Fossil DB changes with NGGC off.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11908 >
2021-08-02 11:38:25 +00:00
Timur Kristóf
a2d02c0c11
ac/nir: Use gs_accepted variable after culling.
...
This prevents us from recalculating the EXEC mask later
in the shader, and removes the requirement for
counting the number of primitives.
The stats are better than expected because they also
show that some code that is still there is now DCE'd by ACO.
Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 58239 (45.27% of 128647) affected shaders:
SpillSGPRs: 330 -> 340 (+3.03%)
CodeSize: 166356072 -> 162805724 (-2.13%)
Instrs: 31920041 -> 31089256 (-2.60%)
Latency: 138815742 -> 138113669 (-0.51%); split: -0.54%, +0.03%
InvThroughput: 22459553 -> 22404840 (-0.24%); split: -0.26%, +0.02%
SClause: 753746 -> 753765 (+0.00%); split: -0.00%, +0.01%
Copies: 3226647 -> 3268973 (+1.31%); split: -0.45%, +1.76%
Branches: 1223441 -> 1223440 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 2025339 -> 2091013 (+3.24%)
No Fossil DB changes with NGGC off.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11908 >
2021-08-02 11:38:25 +00:00
Timur Kristóf
8159868699
ac/nir: Use es_accepted variable after culling.
...
This avoids re-calculating the exec mask for ES vertices,
and makes it unnecessary to count the number of vertices left.
Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 58239 (45.27% of 128647) affected shaders:
CodeSize: 166521108 -> 166356072 (-0.10%); split: -0.10%, +0.00%
Instrs: 31961308 -> 31920041 (-0.13%); split: -0.13%, +0.00%
Latency: 138820463 -> 138815742 (-0.00%); split: -0.04%, +0.04%
InvThroughput: 22460177 -> 22459553 (-0.00%); split: -0.00%, +0.00%
SClause: 753744 -> 753746 (+0.00%)
Copies: 3093140 -> 3226647 (+4.32%); split: -0.03%, +4.34%
No Fossil DB changes with NGGC off.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11908 >
2021-08-02 11:38:25 +00:00
Timur Kristóf
1bbea90f50
aco, nir, ac: Simplify sequence of getting initial NGG VS edge flags.
...
Instead of v_bfe + v_lshl_or for each vertex, get all 3 edge flags
at once of every vertex. This takes fewer VALU instructions than
previously.
Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 56917 (44.24% of 128647) affected shaders:
CodeSize: 161028288 -> 158751628 (-1.41%)
Instrs: 30917985 -> 30519571 (-1.29%)
Latency: 130617204 -> 129975532 (-0.49%); split: -0.50%, +0.01%
InvThroughput: 21280238 -> 20927401 (-1.66%)
Copies: 3011120 -> 3011125 (+0.00%); split: -0.00%, +0.00%
No Fossil DB changed with NGGC off.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11908 >
2021-08-02 11:38:25 +00:00
Connor Abbott
b157a5d0d6
tu: Implement non-aligned multisample GMEM STORE_OP_STORE
...
We have to a bit careful here when disabling draw states. This also
necessitates moving the actual recording of the stores to the end so
that we set the dirty flag correctly.
Closes : #4462
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12102 >
2021-08-02 11:20:25 +00:00
Connor Abbott
7948c4b0b4
tu: Make tile stores use a dedicated CS
...
We were trying to calculate how much space they need, That was already
difficult and one of the most opaque and hard-to-verify uses of sub_cs,
but it will become even more difficult with the 3D path. What's worse is
that sometimes we have to touch that path when we start touching
registers that would affect rasterization, and there's no indication
that you have to then recalculate the size etc. Just rip this out and
start keeping a separate CS for it instead. Note that this adds a small
amount of memory wastage and extra buffers (at worst one buffer per
command buffer).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12102 >
2021-08-02 11:20:25 +00:00
Iago Toral Quiroga
1815a76e3d
v3dv: handle IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12098 >
2021-08-02 10:25:37 +00:00
Iago Toral Quiroga
98044fd7e3
v3dv: fill in drmFormatModifierTilingFeatures
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12098 >
2021-08-02 10:25:37 +00:00
Rhys Perry
0460f01fdc
ac/llvm: implement v2f16 fsat
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12143 >
2021-08-02 10:02:51 +00:00
Pierre-Eric Pelloux-Prayer
b83da28863
dlist: implement vertices deduplication
...
Now that the vertices attributes are in RAM, we can easily
compute their hash and compare to earlier vertices (in the
same list so they have compatible vertex_size).
We can't do that for list that will be executed using
loopback because the replay code ignore the index buffer.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11927 >
2021-08-02 11:13:20 +02:00
Pierre-Eric Pelloux-Prayer
e012b34e61
dlist: upload vertices in compile_vertex_list
...
Previously vertices were uploaded on-the-fly: each time
the position attribute was set, the newly added vertex
was copied to the mapped bo.
Replace this with a plain RAM buffer, and do the upload
at the end of compile_vertex_list.
This allows to remove the we-need-to-unmap-the-buffer-
before-drawing special case, but more importantly it
will allow to implement vertices deduplication in the
next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11927 >
2021-08-02 11:13:16 +02:00
Lionel Landwerlin
f86faee9f4
drm-shim: implement stat/fstat when xstat variants are not there
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 027095065d ("drm-shim: fix compile with glibc >= 2.33")
Acked-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12129 >
2021-08-02 00:19:26 +00:00
Ian Romanick
5cee8434fd
mesa: Fix tiny race condition in _mesa_debug_get_id
...
Two threads enter and see *id == 0. Both threads update the value.
Upon returning, one of the threads might see the overwritten value some
of the time and the updated value other times. Use cmpxchg to ensure
that there's only ever one value written to *id.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12136 >
2021-08-01 23:58:08 +00:00
Ian Romanick
5ffbee84a4
intel/compiler: Add id parameter to shader_perf_log callback
...
There are two problems with the current architecture.
In OpenGL, the id is supposed to be a unique identifier for a particular
log source. This is done so that applications can (theoretically)
filter particular log messages. The debug callback infrastructure in
Mesa assigns a uniqe value when a value of 0 is passed in. This causes
the id to get set once to a unique value for each message.
By passing a stack variable that is initialized to 0 on every call,
every time the same message is logged, it will have a different id.
This isn't great, but it's also not catastrophic.
When threaded shader compiles are used, the id *pointer* is saved and
dereferenced at a possibly much later time on a possibly different
thread. This causes one thread to access the stack from a different
thread... and that stack frame might not be valid any more. :(
I have not observed any crashes related to this particular issue.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12136 >
2021-08-01 23:58:08 +00:00
Ian Romanick
043c5bf966
intel/compiler: Add id parameter to shader_debug_log callback
...
There are two problems with the current architecture.
In OpenGL, the id is supposed to be a unique identifier for a particular
log source. This is done so that applications can (theoretically)
filter particular log messages. The debug callback infrastructure in
Mesa assigns a uniqe value when a value of 0 is passed in. This causes
the id to get set once to a unique value for each message.
By passing a stack variable that is initialized to 0 on every call,
every time the same message is logged, it will have a different id.
This isn't great, but it's also not catastrophic.
When threaded shader compiles are used, the id *pointer* is saved and
dereferenced at a possibly much later time on a possibly different
thread. This causes one thread to access the stack from a different
thread... and that stack frame might not be valid any more. :(
This fixes shader-db crashes of various kinds on Iris with threaded
shader compiles enabled.
Fixes: 42c34e1ac8 ("iris: Enable threaded shader compilation")
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12136 >
2021-08-01 23:58:08 +00:00
Michel Zou
80160a67ab
meson: dont use missing dumpbin path
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Cc: 21.2 mesa-stable
Closes #5142
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12139 >
2021-08-01 23:31:33 +00:00
Icecream95
a2b37e9592
pan/mdg: Analyze helper termination after scheduling
...
Similar to the fix in 6bf8e960fa ("pan/bi: Do helper termination
analysis on clauses")
Though apparently a "theoretical issue only", fixes artefacts in
DarkPlaces with both D3D9 and GL renderers.
Fixes: 9a7f0e268b ("pan/mdg: Use the helper invo analyze passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12156 >
2021-08-01 21:39:12 +00:00
Dave Airlie
e79a78a16f
intel/decode: add gfx4 vertex shader decode
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12160 >
2021-08-02 07:23:58 +10:00
Dave Airlie
0dec873f2a
intel/decode: add gfx4 constant buffer decode
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12160 >
2021-08-02 07:23:38 +10:00
Icecream95
490d09f1a4
pan/bi: Fix infinite loop parsing arguments for bifrost_compiler
...
While char is signed on macOS AArch64, on Linux it is unsigned. This
means it cannot represent the -1 return value of getopt_long.
Change the type of `c` to int, the type that getopt_long returns, so
that the -1 will be kept intact and can be checked for.
Fixes: c6be4f85e3 ("pan/bi: Use getopt for bifrost_compiler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12153 >
2021-08-01 13:04:20 +00:00
Icecream95
1acc3394c4
pan/bi: Use padding bytes for checking whether to stop disassembly
...
Both Panfrost and the DDK add padding zero bytes to the end of
shaders, so we can use this instead of the end-of-shader clause for
checking whether to stop disassembling.
Shaders can have end-of-shader clauses partway through; these shaders
will now be completely disassembled instead of cut off at the first
end-of-shader clause.
A tag byte of zero is an invalid encoding, so unlike the previous
version of this test only check the first word.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12153 >
2021-08-01 13:04:20 +00:00
Icecream95
8574ca4491
pan/bi: Print the clause of branch targets
...
Rather than just printing an offset such as '(pc + 192)', print the
target of branches as a clause number that matches up with the clause
headers printed by disassemble_bifrost.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12153 >
2021-08-01 13:04:20 +00:00
Mike Blumenkrantz
f5b9d16823
zink: add locking for zink_shader::programs
...
shaders are screen objects now with liveshader caching,
so modifications after creation need to be locked
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12147 >
2021-07-31 13:56:18 +00:00
Eric Engestrom
5c8673d67f
docs: update calendar and link releases notes for 21.1.6
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12116 >
2021-07-30 23:10:09 +00:00
Eric Engestrom
ffb95954bf
docs: add release notes for 21.1.6
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12116 >
2021-07-30 23:10:09 +00:00
Juan A. Suarez Romero
dfccbdff98
ci: update to VK-GL-CTS 1.2.7.0
...
v2:
- Read mustpass files from vk-default.txt (Matt)
- Remove freedreno atomic geom tests from fail list (Emma)
- Move freedreno flake to separated line (Emma)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12069 >
2021-07-30 20:02:13 +00:00
Corentin Noël
6336df3a62
ci: Re-enable piglit trace for virgl
...
The glmark2/texture-texture-filter=linear.rdc trace is now passing.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12100 >
2021-07-30 20:24:06 +02:00
Hoe Hao Cheng
86250c7251
zink: make codegen compatible with python 3.5
...
Fixes: f1432fd3 ("zink: generate extension infrastructure using a python script")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12137 >
2021-07-30 17:35:22 +00:00
Samuel Pitoiset
57ff4caf7f
radv: init radv_image::l2_coherent when creating the layout
...
Otherwise, it might not be correctly initialized for Android.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12103 >
2021-07-30 17:06:26 +00:00
Samuel Pitoiset
87b0962fef
radv: do not use radeon_set_context_reg_seq() for only one register
...
radeon_set_context_reg() is a shortcut for that.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12099 >
2021-07-30 17:05:38 +02:00
Samuel Pitoiset
f693b94d2f
radv: reduce number of emitted DWORDS for contiguous context registers
...
radeon_set_context_reg() emits 3 DWORDS, while
radeon_set_context_reg_seq() + 2 values only needs 4 DWORDS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12099 >
2021-07-30 17:05:35 +02:00
Pavel Asyutchenko
4374e7fb45
vulkan/overlay: Fix violation of VUID-VkMappedMemoryRange-size-01389
...
Mapping lentgh must be a multiple of 'nonCoherentAtomSize' bytes
when using VK_WHOLE_SIZE in vkFlushMappedMemoryRanges.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12131 >
2021-07-30 11:38:40 +00:00
Erik Faye-Lund
175bc33da7
gallivm: let nir_lower_tex handle projectors
...
There's no need for us to do this lowering ourselves while emitting
code, when there's already a helper that can do this for us that we're
even using. Let's just set the right flag, and not worry about
projectors any more.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12126 >
2021-07-30 11:19:50 +00:00
Pierre-Eric Pelloux-Prayer
3914bd457b
amd/registers: fix fields conflict detection
...
The existing code handled the case where the new definition of the
same field was larger than the old one.
This commit adds a check to handle the reverse case: the new def
is smaller than the old one (= so writing using the merged macro
would affect the next fields).
The affected fields are:
* LGKM_CNT (in SQ_WAVE_IB_STS)
* DONUT_SPLIT (in VGT_TESS_DISTRIBUTION)
* HEAD_QUEUE (in GDS_GWS_RESOURCE)
DONUT_SPLIT is the only one used by radeonsi/radv.
Fixes: e6184b0892 ("amd/registers: scripts for processing register descriptions in JSON")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12063 >
2021-07-30 08:50:38 +00:00
Pierre-Eric Pelloux-Prayer
2ea88d7cea
gallium/va: don't use key=NULL in hash tables
...
Add 1 to the key index otherwise we hit the following assert
in hash_table_insert:
assert(!key_pointer_is_reserved(ht, key));
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12105 >
2021-07-30 10:24:16 +02:00
Tomeu Vizoso
f376597d00
freedreno/ci: Move rules for restricted jobs to test-source-dep.yml
...
GitLab doesn't merge the rules array from a job that is extended, so we
were missing the changes rules.
To avoid this, create a .freedreno-rules-restricted job that includes
the changes rules and the restricted user checks.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Fixes: 92f9141f00 ("ci/freedreno: Test with non-redistributable traces")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5139
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12122 >
2021-07-30 08:42:57 +02:00
Dave Airlie
c8783001c7
intel/fs: restrict max push length on older GPUs to a smaller amount
...
Fixes crash in dEQP-GLES2.functional.uniform_api.random.79
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12093 >
2021-07-30 15:17:21 +10:00
Connor Abbott
d9a4a0aebd
tu: Handle multisample vkCmdCopyColorImage()
...
There was a bit of code already to select the 3d path, but we actually
need another shader variant for it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12080 >
2021-07-29 23:54:29 +00:00
Alyssa Rosenzweig
1e29f57b3a
pan/bi: Validate the live set starts empty
...
Otherwise there is an uninitialized read, and the register allocation
will fail. (In the sense of failing a precondition. This manifests as
synthetic interference leading to higher register pressure and useless
moves. The allocation itself is ok, but it indicates a real bug.)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12130 >
2021-07-29 23:40:46 +00:00
Alyssa Rosenzweig
7d60a8881d
pan/bi: Stub 64-bit in count_write_registers
...
When Valhall lands, we'll need to be more methodical about this. In the
mean time, this gets validation passing on
KHR-GLES31.core.compute_shader.atomic-case3 which was crashing in RA and
now again passes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12130 >
2021-07-29 23:40:46 +00:00
Alyssa Rosenzweig
502ffe6fbf
pan/bi: Handle asymmetric staging in bi_count_read_registers
...
Needed for atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12130 >
2021-07-29 23:40:46 +00:00
Alyssa Rosenzweig
e3f14b9850
pan/bi: Add bi_entry_block helper
...
Useful for checking invariants at the start of the program.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12130 >
2021-07-29 23:40:46 +00:00
Alyssa Rosenzweig
c4f8b52e06
pan/bi: Lower fragment output with <4 components
...
This avoids undefined behaviour in the shader, which will fail
validation added later in the series. shader-db results are neglible --
the extra moves required in a few cases are cancelled out by the extra
moves eliminated by allowing register allocation to work properly.
total instructions in shared programs: 146903 -> 146907 (<.01%)
instructions in affected programs: 33 -> 37 (12.12%)
helped: 0
HURT: 1
total tuples in shared programs: 123616 -> 123613 (<.01%)
tuples in affected programs: 764 -> 761 (-0.39%)
helped: 6
HURT: 4
helped stats (abs) min: 1.0 max: 4.0 x̄: 1.67 x̃: 1
helped stats (rel) min: 0.54% max: 5.88% x̄: 2.64% x̃: 1.86%
HURT stats (abs) min: 1.0 max: 2.0 x̄: 1.75 x̃: 2
HURT stats (rel) min: 4.55% max: 13.33% x̄: 8.57% x̃: 8.19%
95% mean confidence interval for tuples value: -1.73 1.13
95% mean confidence interval for tuples %-change: -2.72% 6.41%
Inconclusive result (value mean confidence interval includes 0).
total clauses in shared programs: 25656 -> 25654 (<.01%)
clauses in affected programs: 43 -> 41 (-4.65%)
helped: 2
HURT: 1
helped stats (abs) min: 1.0 max: 2.0 x̄: 1.50 x̃: 1
helped stats (rel) min: 6.25% max: 12.50% x̄: 9.38% x̃: 9.38%
HURT stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel) min: 33.33% max: 33.33% x̄: 33.33% x̃: 33.33%
total cycles in shared programs: 12114.21 -> 12114.12 (<.01%)
cycles in affected programs: 27.42 -> 27.33 (-0.30%)
helped: 4
HURT: 3
helped stats (abs) min: 0.04166700000000034 max: 0.08333299999999966 x̄: 0.06 x̃: 0
helped stats (rel) min: 0.57% max: 1.59% x̄: 1.02% x̃: 0.96%
HURT stats (abs) min: 0.0416669999999999 max: 0.08333299999999999 x̄: 0.06 x̃: 0
HURT stats (rel) min: 4.17% max: 16.67% x̄: 8.80% x̃: 5.56%
95% mean confidence interval for cycles value: -0.07 0.05
95% mean confidence interval for cycles %-change: -2.90% 9.27%
Inconclusive result (value mean confidence interval includes 0).
total arith in shared programs: 4601.08 -> 4601.04 (<.01%)
arith in affected programs: 29 -> 28.96 (-0.14%)
helped: 6
HURT: 4
helped stats (abs) min: 0.04166700000000001 max: 0.08333299999999966 x̄: 0.06 x̃: 0
helped stats (rel) min: 0.57% max: 10.00% x̄: 3.63% x̃: 1.39%
HURT stats (abs) min: 0.04166700000000001 max: 0.08333399999999991 x̄: 0.07 x̃: 0
HURT stats (rel) min: 5.56% max: 16.67% x̄: 10.85% x̃: 10.60%
95% mean confidence interval for arith value: -0.05 0.05
95% mean confidence interval for arith %-change: -3.95% 8.28%
Inconclusive result (value mean confidence interval includes 0).
total quadwords in shared programs: 110008 -> 110002 (<.01%)
quadwords in affected programs: 1090 -> 1084 (-0.55%)
helped: 11
HURT: 8
helped stats (abs) min: 1.0 max: 7.0 x̄: 2.18 x̃: 1
helped stats (rel) min: 0.61% max: 13.16% x̄: 4.07% x̃: 1.82%
HURT stats (abs) min: 1.0 max: 6.0 x̄: 2.25 x̃: 1
HURT stats (rel) min: 3.70% max: 42.86% x̄: 12.55% x̃: 7.50%
95% mean confidence interval for quadwords value: -1.76 1.13
95% mean confidence interval for quadwords %-change: -2.95% 8.81%
Inconclusive result (value mean confidence interval includes 0).
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12130 >
2021-07-29 23:40:46 +00:00
Connor Abbott
9b0a4cc893
ir3: Delete old packed struct encoding
...
turnip clear/blit shaders were the last user of these.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12079 >
2021-07-29 23:20:18 +00:00
Connor Abbott
fc0c0e9d45
tu: Use NIR for clear/blit shaders
...
This is much more maintainable, extensible, and easy to read than
hand-rolled structs approximating assembly. This also removes the last
use of the old hand-written packing structs. There are a few minor
differences:
- The shaders are larger because ir3 currently doesn't support (rpt),
which means that some shaders are larger than one instrlen and the
current logic has to be extended to allow for that. This seems a small
price to pay, ir3 will gain support for (rpt) eventually, and we
shouldn't have limitations like this baked in anyway. For example some
GL blob r8g8 <-> r16 copy shaders are apparently quite large.
- Due to the inability to switch inputs/outputs on the fly, we need to
split the VS into two variants. I made the layer-writing variant also
used for other clears, because the old method of overloading c0.z/c1.z
to mean both "src x coordinate" and "z clear value" in the same shader
seemed too clever and I didn't want to add yet another variant. This
means that non-layered clears will also write the layer (to 0), but
that shouldn't be a big deal performance-wise.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12079 >
2021-07-29 23:20:18 +00:00
Iván Briano
df338fe7d1
anv: Don't copy the lineStipple values if lineStipple is not enabled
...
If the passed VkPipelineRasterizationLineStateCreateInfoEXT wasn't zero
initialized, we copy garbage values that are later on used to set the
state and may end up crashing when they are beyond the limits of the HW.
v2 (Lionel): Simplify if condition
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12121 >
2021-07-29 23:10:12 +00:00
Alyssa Rosenzweig
c6be4f85e3
pan/bi: Use getopt for bifrost_compiler
...
Specify gpu id with --gpu-id or marketing name with --gpu. Still have
compile/disasm as commands, but allow -v for verbose printing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12134 >
2021-07-29 22:54:16 +00:00
Jesse Natalie
4c5f1ef3ca
microsoft/clc: Add a test for compiling a kernel with a read-write image
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10163 >
2021-07-29 14:54:48 -07:00
Jesse Natalie
6126dd29a4
microsoft/compiler: Implement texture loads from UAVs
...
This comes to the backend as image_load rather than txf but the
DXIL intrinsic is the same at the end of the day.
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10163 >
2021-07-29 14:54:31 -07:00
Joshua Watt
7bcb223639
v3d, vc4: Fix dmabuf import for non-scanout buffers
...
Failure to create a buffer for scanout should not be fatal when
importing a buffer. Buffers allocated from a render-only device may not
be able to scanned out directly but can still be used for other
rendering purposes (e.g. as a texture).
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12081 >
2021-07-29 20:14:00 +00:00
Emma Anholt
b3e1f45cfb
nir_to_tgsi: Add support for nir_intrinsic_load_sample_pos.
...
The sysval translation already handles it.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11937 >
2021-07-29 19:47:06 +00:00
Emma Anholt
0253ff6d55
nir_to_tgsi: Declare buffers for all of num_ssbos.
...
Now all SSBO tests pass on virgl when taking the nir-to-tgsi path.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11937 >
2021-07-29 19:47:06 +00:00
Eric Anholt
846a4512e9
nir_to_tgsi: Add support for HW atomics.
...
Found missing when taking virgl on the nir-to-tgsi path. Needs an SSBO
fix as well to pass all of the atomic_counters tests.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11937 >
2021-07-29 19:47:05 +00:00
Alyssa Rosenzweig
be7d964ff0
pan/bi: Remove incorrect errata workaround
...
This worked around a symptom of the underlying issue worked around in
the previous commit. This workaround is wrong in the sense of failing to
correct some broken code sequences and needlessly rejecting some working
code sequences.
total tuples in shared programs: 123770 -> 123630 (-0.11%)
tuples in affected programs: 9548 -> 9408 (-1.47%)
helped: 133
HURT: 0
helped stats (abs) min: 1.0 max: 2.0 x̄: 1.05 x̃: 1
helped stats (rel) min: 0.42% max: 16.67% x̄: 4.07% x̃: 1.15%
95% mean confidence interval for tuples value: -1.09 -1.01
95% mean confidence interval for tuples %-change: -4.98% -3.17%
Tuples are helped.
total cycles in shared programs: 12114.83 -> 12114.50 (<.01%)
cycles in affected programs: 34.08 -> 33.75 (-0.98%)
helped: 9
HURT: 1
helped stats (abs) min: 0.04166599999999998 max: 0.04166700000000034 x̄: 0.04 x̃: 0
helped stats (rel) min: 0.72% max: 12.50% x̄: 2.99% x̃: 2.04%
HURT stats (abs) min: 0.04166700000000034 max: 0.04166700000000034 x̄: 0.04 x̃: 0
HURT stats (rel) min: 0.62% max: 0.62% x̄: 0.62% x̃: 0.62%
95% mean confidence interval for cycles value: -0.05 -0.01
95% mean confidence interval for cycles %-change: -5.27% <.01%
Inconclusive result (%-change mean confidence interval includes 0).
total arith in shared programs: 4603.42 -> 4601.54 (-0.04%)
arith in affected programs: 50.50 -> 48.62 (-3.71%)
helped: 41
HURT: 1
helped stats (abs) min: 0.04166599999999998 max: 0.08333299999999999 x̄: 0.05 x̃: 0
helped stats (rel) min: 0.72% max: 33.33% x̄: 17.23% x̃: 13.33%
HURT stats (abs) min: 0.04166700000000034 max: 0.04166700000000034 x̄: 0.04 x̃: 0
HURT stats (rel) min: 0.62% max: 0.62% x̄: 0.62% x̃: 0.62%
95% mean confidence interval for arith value: -0.05 -0.04
95% mean confidence interval for arith %-change: -20.93% -12.69%
Arith are helped.
total quadwords in shared programs: 110116 -> 110009 (-0.10%)
quadwords in affected programs: 7829 -> 7722 (-1.37%)
helped: 106
HURT: 0
helped stats (abs) min: 1.0 max: 2.0 x̄: 1.01 x̃: 1
helped stats (rel) min: 0.49% max: 7.14% x̄: 1.91% x̃: 1.35%
95% mean confidence interval for quadwords value: -1.03 -0.99
95% mean confidence interval for quadwords %-change: -2.23% -1.59%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12114 >
2021-07-29 19:33:32 +00:00
Alyssa Rosenzweig
67b9b73f9f
pan/bi: Test restrictions on same-cycle temporaries
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12114 >
2021-07-29 19:33:32 +00:00
Alyssa Rosenzweig
2cdf95703a
pan/bi: Restrict swizzles on same cycle temporaries
...
Hand typed. We could generate this from the XML to avoid the repititon
but I think the cure is worse than the disease.
This fixes instruction encoding faults seen in conformance tests.
Only a single shader-db affected, and it was likely already broken...
quadwords HURT: shaders/glmark/22-1.shader_test MESA_SHADER_FRAGMENT: 133 -> 135 (1.50%)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12114 >
2021-07-29 19:33:32 +00:00
Simon Ser
47f000c170
lima: fail in get_handle(TYPE_KMS) without a scanout resource
...
The previous logic was returning a handle valid for the render-only
device if rsc->scanout was NULL. However the caller doesn't expect
this: the caller will use the handle with the KMS device.
Instead of returning a handle for the wrong device, fail if we don't
have one.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074 >
2021-07-29 21:01:10 +02:00
Simon Ser
4c092947df
panfrost: fail in get_handle(TYPE_KMS) without a scanout resource
...
The previous logic was returning a handle valid for the render-only
device if rsc->scanout was NULL. However the caller doesn't expect
this: the caller will use the handle with the KMS device.
Instead of returning a handle for the wrong device, fail if we don't
have one.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074 >
2021-07-29 21:01:10 +02:00
Simon Ser
465eb7864b
freedreno: fail in get_handle(TYPE_KMS) without a scanout resource
...
The previous logic was returning a handle valid for the render-only
device if rsc->scanout was NULL. However the caller doesn't expect
this: the caller will use the handle with the KMS device.
Instead of returning a handle for the wrong device, fail if we don't
have one.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Emma Anholt <emma@anholt.net >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074 >
2021-07-29 21:01:10 +02:00
Simon Ser
9da901d2b2
etnaviv: fail in get_handle(TYPE_KMS) without a scanout resource
...
The previous logic was returning a handle valid for the render-only
device if rsc->scanout was NULL. However the caller doesn't expect
this: the caller will use the handle with the KMS device.
Instead of returning a handle for the wrong device, fail if we don't
have one.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074 >
2021-07-29 21:01:10 +02:00
Simon Ser
3b3cd51286
etnaviv: fix renderonly check in etna_resource_alloc
...
When the driver hasn't been initialized via renderonly, screen->ro
will be NULL. This fixes a crash when passing USE_SCANOUT to etnaviv
when it's missing renderonly.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074 >
2021-07-29 20:59:21 +02:00
Thomas H.P. Andersen
71a5bcb865
nine: Fix assert in tx_src_param
...
A previous commit cleaned up the asserts but the last part of
this assert looks like it got mixed up. It should have allowed
param->rel for D3DSPR_INPUT if version is 3.0. Instead it does
&& on the enum value D3DSPR_ADDR which is of course always true,
with the version check. The result is that we miss input
validation with version 3.0.
Spotted by a compile warning
Fixes: 5974401a4a ("st/nine: Regroup param->rel tests")
Reviewed-by: Axel Davy davyaxel0@gmail.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11880 >
2021-07-29 18:37:51 +00:00
Emma Anholt
390a3fcdc4
nir_to_tgsi: Add support for TXP.
...
This doesn't perfectly emit all the TXPs we might be able to (if you get
any non-TXP-able projectors, that whole sampler dim gets lowered), but it
should be a big boost to i915g.
softpipe shader-db:
total instructions in shared programs: 2953625 -> 2951201 (-0.08%)
instructions in affected programs: 108901 -> 106477 (-2.23%)
total temps in shared programs: 565869 -> 566632 (0.13%)
temps in affected programs: 8922 -> 9685 (8.55%)
i915g shader-db:
total instructions in shared programs: 372570 -> 370254 (-0.62%)
instructions in affected programs: 39825 -> 37509 (-5.82%)
total tex_indirect in shared programs: 11420 -> 11074 (-3.03%)
tex_indirect in affected programs: 913 -> 567 (-37.90%)
LOST: 0
GAINED: 12
Closes : #4984
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11912 >
2021-07-29 09:05:09 -07:00
Emma Anholt
9ffd00bcf1
nir_to_tgsi: Pack our tex coords into vec4 nir_tex_src_backend[12].
...
For TGSI, we need the coordinate, comparator, bias, and LOD all together
in the first two vec4 args, and by doing it in the backend we were
generating extra MOVs.
softpipe shader-db results:
total instructions in shared programs: 2985416 -> 2953625 (-1.06%)
instructions in affected programs: 499937 -> 468146 (-6.36%)
total temps in shared programs: 544769 -> 565869 (3.87%)
temps in affected programs: 105469 -> 126569 (20.01%)
i915g shader-db:
total instructions in shared programs: 371625 -> 369594 (-0.55%)
instructions in affected programs: 24903 -> 22872 (-8.16%)
total tex_indirect in shared programs: 11381 -> 11365 (-0.14%)
tex_indirect in affected programs: 43 -> 27 (-37.21%)
LOST: 7
GAINED: 16
The temps increase is the pre-existing issue that we never release temps
for NIR regs, which doesn't matter much for softpipe (just memory/cache
footprint) but does for i915g as seen by shaders that no longer compile
(though overall we seem to win).
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11912 >
2021-07-29 09:05:05 -07:00
Emma Anholt
6f5f79e042
i915g: Add support for shader-db.
...
I wanted to make sure that NIR-to-TGSI wouldn't regress this driver's code
generation, so make it possible to use standard shader-db on it.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11912 >
2021-07-29 09:05:00 -07:00
Lionel Landwerlin
b8e29e8936
anv: fix submission batching with perf queries
...
If we have 2 command buffers back to back, one with a query pool, one
without, we don't want to retain the second query pool value (NULL).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 0a7224f3ff ("anv: group as many command buffers into a single execbuf")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12107 >
2021-07-29 13:53:14 +00:00
byte[]
b077301a22
i965: Explicitly abort instead of exiting on batch failure
...
This avoids a deadlock condition when registered atexit handlers attempt to
acquire a mutex, but the program was going to exit with an error anyway
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11813 >
2021-07-29 13:33:07 +00:00
Rohan Garg
9375f62a54
i965: Write a custom allocator for the intel memobj struct
...
This helps ensure we're not doing out of bounds access later.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12075 >
2021-07-29 11:50:49 +00:00
Rohan Garg
1f0964d6b6
i965: Take into account the offset when marking a valid data region
...
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12085 >
2021-07-29 11:40:04 +00:00
Erik Faye-Lund
0cfd1da8b3
lavapipe: do not mark unsupported tests as crashing
...
These were fixed previously, but due to the CI not really running all
tests any more, I didn't notice these fixes. Let's bring the expected
results up to date.
Fixes: 2e29857bb6 ("llvmpipe: only report supported shader-image formats")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12077 >
2021-07-29 12:53:38 +02:00
Juan A. Suarez Romero
fe9d2d2046
broadcom: remove v3dv3 from neon library
...
No need to build the simulator with NEON; and also v3dv3 simulator
is not for VC4, so don't inherit v3dv3 requirement when building vc4
driver.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5126
Fixes: d198e26a1e ("broadcom/common: move v3d_tiling to common")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12078 >
2021-07-29 08:26:11 +00:00
Alejandro Piñeiro
86111fdc9c
spirv: set medium precision with RelaxedPrecision decorator
...
This allows the variables decorated with RelaxedPrecision to have the
proper precision. It is worth to note that the decorator can be
applied on other cases, but those would be handled on the future.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7614 >
2021-07-29 03:48:43 +00:00
Alejandro Piñeiro
476dc3c050
vulkan: add vk_spec_info_to_nir_spirv util method
...
All vulkan drivers have been copying anv's code to convert
VkSpecializationInfo into nir_spirv_specialization.
Recently there was a Vulkan spec change on allowed values for
VkSpecializationInfo, and all drivers got affected.
This commits creates a new helper, and uses it on all Vulkan Mesa
drivers.
v2: use (uint8_t*) castings, instead of void*, to avoid C2036 with
MSVC (detected by the CI, inspired on what radv was doing)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12047 >
2021-07-29 03:28:52 +00:00
Enrico Galli
fec1a04c53
microsoft/compiler: Correctly flag when using raw buffers
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12119 >
2021-07-29 01:44:45 +00:00
Enrico Galli
1295c5cb33
microsoft/compiler: Add support for arrays to image_store
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12119 >
2021-07-29 01:44:45 +00:00
Enrico Galli
16ef26ffcb
nir_lower_readonly_images_to_tex: Fix typeo on image arrays
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12119 >
2021-07-29 01:44:45 +00:00
Alyssa Rosenzweig
486e236c33
glsl/standalone: Lower COMPUTE shader precision
...
Fragment isn't last for GLSL stages, compute is.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12082 >
2021-07-29 01:20:46 +00:00
Mike Blumenkrantz
09d9b8cf9a
features: mark off timelines for lavapipe
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12071 >
2021-07-29 00:06:10 +00:00
Mike Blumenkrantz
94a4982805
lavapipe: implement timeline semaphores
...
this uses a singly-linked list of timeline ids to compare against the device
queue's cmdbuf counter and determine which timeline id maps to which cmdbuf and
thus which fence can be waited on
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12071 >
2021-07-29 00:06:10 +00:00
Mike Blumenkrantz
326253786e
lavapipe: use consistent semaphore variable naming
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12071 >
2021-07-29 00:06:10 +00:00
Mike Blumenkrantz
032d4a0e7d
lavapipe: rework queue to use u_queue
...
this simplifies the entire queue mechanism and makes it more consistent:
previously some cases (e.g., null cmdbuf submission) would immediately
be marked as finished, which meant that fences could theoretically become
desynchronized, breaking application assumptions
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12071 >
2021-07-29 00:06:10 +00:00
Mike Blumenkrantz
461662bf3c
zink: simplify some dumb code in invalidate_buffer (v2)
...
the ref has to be preserved so that rebind doesn't destroy it prematurely
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12118 >
2021-07-28 23:56:06 +00:00
Mike Blumenkrantz
2668489cf9
Revert "zink: simplify some dumb code in invalidate_buffer"
...
This reverts commit 6bda555cc0 .
this needs to stay dumb in order to preserve the ref on the resource
without destroying it during rebind
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12118 >
2021-07-28 23:56:06 +00:00
Emma Anholt
d413fd0219
gallivm: Always take the per-pixel LOD path for cubemaps.
...
The VK spec requires that derivatives are mapped to the face, and given
that the face is per pixel that implies that we need per-pixel
derivatives. This also seems to match hardware behavior.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10219 >
2021-07-28 23:38:38 +00:00
Emma Anholt
371cf5d06a
gallivm: Default brilinear filtering to off.
...
It's non-conformant for GL and Vulkan, and not expected to be a desired
quality/speed tradeoff for applications using llvmpipe. The option is
left in place using GALLIVM_PERF=brilinear.
Causes minor rasterization changes in our traces:
- improved sharpness of the trees in CS
- more consistent mipmap filtering of the ground in CS:Source, STK and the
RaytracedShadows demo.
- changing some aliasing on shadow maps in 0ad (not consistently
visibly better or worse)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10219 >
2021-07-28 23:38:38 +00:00
Lionel Landwerlin
7e3bad0f8e
nir/lower_shader_calls: adding missing stack offset alignment
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 8dfb240b1f ("nir: Add raytracing shader call lowering pass.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12112 >
2021-07-28 23:04:21 +00:00
Chia-I Wu
a94192f69d
venus: print warnings when stuck in busy waits
...
The first warning is printed after stuck in vn_relax for at least about
3.5s. The actual time can be much longer depending on the
kernel/load/hw.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12115 >
2021-07-28 22:50:36 +00:00
Mike Blumenkrantz
7d0fe5863f
zink: force threadsafe mapping for query results when necessary
...
this would otherwise use the ctx-based slab allocator, which races
and crashes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12015 >
2021-07-28 22:37:02 +00:00
Alyssa Rosenzweig
d972326c45
pan/bi: Teach meson about format pack tests
...
Now we have all our Bifrost unit tests under meson and can remove the
test entrypoint from bifrost_compiler. This does require a small
refactoring for our util_dynarray handling to make sure we don't leak
memory. Otherwise meson-arm64-asan complains.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109 >
2021-07-28 22:16:14 +00:00
Alyssa Rosenzweig
8a6c214b6a
pan/bi: Teach meson about Bifrost packing test
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109 >
2021-07-28 22:16:14 +00:00
Alyssa Rosenzweig
9bb731012e
pan/bi: Teach meson about scheduler predicate test
...
One step of 3 to getting all our tests in meson test.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109 >
2021-07-28 22:16:14 +00:00
Alyssa Rosenzweig
ca36943466
pan/bi: Add BIT_ASSERT helper for unit testing
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109 >
2021-07-28 22:16:14 +00:00
Alyssa Rosenzweig
9358d1fca6
pan/bi: Expose unit tested scheduler predicates
...
I want to move the tests to their own executable to integrate better
with meson.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109 >
2021-07-28 22:16:14 +00:00
Alyssa Rosenzweig
0d08ce287b
pan/bi: Remove dated ASSERTED properties
...
This was used when we were only unit testing. Now that we have an actual
scheduler, it's pure noise.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109 >
2021-07-28 22:16:14 +00:00
Alyssa Rosenzweig
526ae8979e
pan/bi: Inline away bi_must_last
...
Totally trivial.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109 >
2021-07-28 22:16:14 +00:00
Dylan Baker
097cf3952b
freedreno/ir3: Add build id to the disassembler test
...
This is required (at least for me on x86) to get the tool to pass it's
own test, otherwise it fails the build_id assertion.
Fixes: 1462b00391
("freedreno/ir3: Add a unit test for our disassembler.")
Acked-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12084 >
2021-07-28 21:26:45 +00:00
Mike Blumenkrantz
5ff0f4a901
zink: never use staging buffer for unsynchronized buffer maps
...
this is ultra broken, do not attempt
Fixes: 6bfbce0447 ("zink: rework buffer mapping")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12111 >
2021-07-28 21:15:26 +00:00
Jesse Natalie
3d64a97cf6
mesa/main: Check for fbo attachments when importing EGL images to textures
...
Fixes an assert when binding an fbo with a texture bound to one of its attachments,
if the texture was updated with an EGL image after it was bound.
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11998 >
2021-07-28 20:23:21 +00:00
Ian Romanick
dff0d9911d
iris: Split iris_upload_shader in two
...
Now the part that uploads the shader and the part that finishes the
creation of the shader are separated. Each now has a more reasonable
number of parameters.
Suggested-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
42c34e1ac8
iris: Enable threaded shader compilation
...
There are a couple minor things that can be improved:
1. Eliminate (or reduce) the dynamic allocation of the
threaded_compile_job.
2. For apps like shader-db, improve the case where nr_threads=0. Right
now this adds thread switching and mutex overhead.
3. Other performance improvements? iris_uncompiled_shader::variants has
some special properties that make it ripe for replacement with a
lockless list. Without gathering some data, it's hard to guess what
impact that could have.
v2: Fix whitespace and formatting issues. Noticed by Ken.
s/threaded_compile_job/iris_threaded_compile_job/g. Suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
9011cc7405
iris: add sync_compile option
...
This can be useful to simplify debugging compiler issues.
Similar to 9445a4ab43 ("radeonsi: add radeonsi_sync_compile option").
v2: Actually query the driconf to set screen->driconf.sync_compile.
Noticed by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
2d1a2a1c09
iris: Don't pass the shader key to iris_compile_[shader stage]
...
Use the copy of the key embedded in the compiled shader.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
2024d47048
iris: Add the variant to the list as early as possible
...
I tried to find a way to break this into some smaller commits, but
everything is very intertwined. :(
When searching the variants list in the iris_uncompiled_shader, add the
new variant if it is not found. This will be necessary for threaded
shader compilation. This conceptually simple change had a bunch of
fallout.
Much of this was at least conceptually borrowed from radeonsi.
- Other threads might find a variant in the list before the variant has
been compiled. To accomdate this, add a fence. Each thread will wait
on the fence in the variant when searching the list.
- A variant in the list may fail compilation. To accomodate this, add a
flag. All paths will examine iris_compiled_shader::compilation_failed
before trying to use the variant.
- The race condition between multiple threads trying to create the same
variant at the same time is handled *before* both thread spend the
effort to compile the shader. The means that iris_upload_shader
cannot change shaders on the caller, so it does not need to return
anything.
v2: Change "found" parameter of find_or_add_variant to "added." This
inverts the values returned, and it probably makes uses of the returned
value more easily understood. Always set the value in the called
function. Suggested by Ken.
v3: Move shader->compilation_failed check to avoid shader != NULL test.
Rearrange some logic and add a comment in iris_update_compiled_tcs.
Suggested by Ken. Don't call find_or_add_variant in
iris_create_shader_state. See
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229#note_1000843
for more details. Noticed by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
0e48b1a99d
iris: Allocate shader variant in caller of iris_upload_shader
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
ca19be1a8d
iris: Extract allocation bits from iris_upload_shader to iris_create_shader_variant
...
The added assertion in iris_create_shader_variant helped catch a bug in
the next commit.
v2: Drop (unnecessary) initialization of shader->assembly.res when
moving to iris_create_shader_variant. Suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
d0fac4e4f8
iris: Ref count the uncompiled shaders
...
I tried /just/ ref counting the uncompiled shaders, but that is not
sufficient. At the very least, it's a problem for blorp shaders that
only have variants (and no uncompiled shader).
This is in prepartion for using the live shader cache.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
d5ec4716de
iris: Merge iris_create_[shader stage]_state funcs into iris_create_shader_state
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
eafcee4ab1
iris: Unify iris_create_[shader stage]_state functions
...
v2: Merge old iris_create_shader_state into the new function.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
0d32ec5467
iris: Unify iris_delete_[shader stage]_state functions
...
This is in prepartion for using the live shader cache.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
16b34334dc
iris: Fix return type of iris_compile_*
...
Trivial.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
38dea8ef35
iris: Add a comment for iris_uncompiled_shader::nir
...
This would have saved me a few minutes searching around.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Ian Romanick
d78e980523
util/queue: Don't crash in util_queue_destroy when init failed
...
This simplifies the error exit paths for drivers that use these queues.
v2: Move allocation of queue->jobs after initializing the mutxes and
condition variables. Noticed by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229 >
2021-07-28 17:32:44 +00:00
Mike Blumenkrantz
d2b4a59474
st/texture: refactor get_src_format() to be more useful
...
take more params in order to enable better reuse
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11982 >
2021-07-28 17:07:15 +00:00
Mike Blumenkrantz
f0a24c8c9d
mesa/st: add format-finding capabilities to pbo get_dst_format()
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11982 >
2021-07-28 17:07:15 +00:00
Mike Blumenkrantz
25788721c1
mesa/st: enable calling st_choose_format() purely for translation
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11982 >
2021-07-28 17:07:15 +00:00
Mike Blumenkrantz
daf2a039f5
mesa/st: break up st_choose_matching_format()
...
having a function that just returns the equivalent format is handy
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11982 >
2021-07-28 17:07:15 +00:00
Mike Blumenkrantz
6276973a9a
mesa/st: break up st_GetTexSubImage
...
this makes the function more readable and enables a lot of the code
to be reused for other purposes
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11982 >
2021-07-28 17:07:15 +00:00
Connor Abbott
7a14484bca
ir3: Preserve gl_ViewportIndex in the binning shader
...
Fixes dEQP-VK.draw.shader_viewport_index.* with TU_DEBUG=forcebin.
Fixes: efff734220 ("turnip: multiViewport and VK_EXT_shader_viewport_index_layer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12104 >
2021-07-28 16:49:46 +00:00
Alyssa Rosenzweig
c0d5c06fed
gallium/tests: Fix warning calculating absdiff
...
With clang building tests:
../src/gallium/tests/trivial/compute.c:1215:29: warning: taking the absolute value of unsigned type 'unsigned int' has no effect [-Wabsolute-value]
if (abs(((uint32_t *)x)[j] -
^
../src/gallium/tests/trivial/compute.c:1215:29: note: remove the call to 'abs' since unsigned values cannot be negative
if (abs(((uint32_t *)x)[j] -
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12087 >
2021-07-28 16:19:26 +00:00
Lionel Landwerlin
f1a66e7c90
loader/dri3: create linear buffer with scanout support
...
If we have a different GPU dealing with display, we fallback to
exchanging linear buffers with the compositor. We should specify in
creating the linear buffer that this could be used for display.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4706
Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11942 >
2021-07-28 15:53:36 +00:00
Danylo Piliaiev
20547a110e
tu: delay decision of forcing sysmem due to subpass self-dependencies
...
DXVK always inserts vertex stage subpass self-dependency for every
subpass regardless of whether there actually would be a barrier.
This effectively disabled gmem rendering with DXVK.
Thus we delay the decision to disable gmem rendering until we
see a barrier with vertex stages.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12038 >
2021-07-28 15:35:44 +00:00
Tomeu Vizoso
8d8a91617d
docs/ci: Update http cache config to let Authorization headers pass through
...
When downloading traces from a restricted repository, the Authorization
header will be set. Previous to this change, the http proxy would drop
it.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6441 >
2021-07-28 13:49:11 +00:00
Antonio Caggiano
92f9141f00
ci/freedreno: Test with non-redistributable traces
...
Add a job to test with traces that we cannot redistribute, listed in a
separate file. Since those traces might not be accessible by everyone,
this job is created only when the pipeline is triggered by `marge-bot`.
This job is optional because otherwise it could be blocking a merge
request of someone who cannot really debug the issue due to lack of
access to these traces.
The documentation available under `docs/ci` goes into more details
explaining the rationale behind optional traces.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6441 >
2021-07-28 13:49:11 +00:00
Zhu Yuliang
b88fd3ccc0
gallium/vl: don't leak fd in vl_dri3_screen_create
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12092 >
2021-07-28 13:03:02 +00:00
Pierre-Eric Pelloux-Prayer
bdcefb8ec4
radeonsi: preserve derivatives after discards for ARB shaders
...
Contrary to the GLSL spec, the ARB fp spec doesn't explicitely
states that derivatives are undefined after discards.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5018
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11972 >
2021-07-28 08:49:30 +00:00
Pierre-Eric Pelloux-Prayer
8cd2e82c89
mesa: move gl_program::is_arb_asm to shader_info
...
This will be used from radeonsi in the next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11972 >
2021-07-28 08:49:30 +00:00
Erik Faye-Lund
bff8a948f7
lavapipe: do not assert on more than 32 samplers
...
We can have more than 32 samplers, but the code below will assert in that
case. The return value is not used for samplers, so let's just return
zero early and be done with it.
Fixes: c18ff60087 ("lavapipe: emit correct textures_used for texture-arrays")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11845 >
2021-07-28 08:16:28 +00:00
Chia-I Wu
206fe780d5
vulkan/wsi/x11: do not inherit last_present_mode
...
Under XWayland, the first present after a window resize is sometimes
completed with COPY (seems to happen when the previous present with the
old size is pending; not really sure). The following presents are
completed with FLIP.
When a swapchain is created with an old swapchain, and
old_chain->last_present_mode is FLIP, chain->last_present_mode is set to
FLIP as well. This causes the new swapchain to be marked
VK_SUBOPTIMAL_KHR, which is sticky, if the first present is completed
with COPY.
Instead of inheriting, treat each swapchain as independent. We will
miss the case where an old swapchain is flipping but a new swapchain is
copying. But swapchain reallocation normally happens in response to
present engine state change. If the newly allocated swapchain is
copying, another reallocation is unlikely to fix that.
Fixes: 61309c2a72 ("vulkan/wsi/x11: Return VK_SUBOPTIMAL_KHR for X11")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12030 >
2021-07-28 01:05:50 +00:00
Mike Blumenkrantz
6bfbce0447
zink: rework buffer mapping
...
this collects a bunch of changes which need to be made but which can't
be split up incrementally without breaking things:
* move map offset to zink_transfer::offset for consistent handling
* fix stream uploader map rules to only apply for discard cases so
the stream uploader doesn't explode
* fix the staging buffer map rules to apply to any non-staging readback
* stop making huge staging buffers for readback
* break out the DONTBLOCK case since this is only coming from qbo readback
* add explicit read-only sync for maps to stall on writes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12090 >
2021-07-28 00:42:56 +00:00
Mike Blumenkrantz
de2da3dadf
zink: use MAP_ONCE for qbo readback
...
this implies that the buffer can be unmapped
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12090 >
2021-07-28 00:42:56 +00:00
Alyssa Rosenzweig
ce6d43548b
pan/va: Allow floating-point swizzles on ATEST
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
5649f24d16
pan/bi: Align staging registers on Valhall
...
This handles the following from the Valhall specification (that I wrote):
If multiple subsequent staging registers are accessed, the base must
be aligned to 2. However, even if 4 registers are accessed, it is
not necessary to align to 4, only to 2. This restriction allows the
hardware to use a 64-bit data path without handling unaligned
access, which is more efficient. This restriction does not apply if
only a single register is accessed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
a6ccbf48e9
pan/bi: Clarify the logic of bi_reconverge_branches
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
30f8fb82c9
pan/bi: Clean up and export bi_reconverge_branches
...
Decides when we need "branch reconvergence" (canonical term), the
logical opposite of "back-to-back execution" (non-canonical term, this
is old code in Bifrost terms). So invert the return value, rename, and
export so we can use it when packing Valhall instructions.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
e3554a9a3a
pan/bi: Add branch_offset immediate
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
4f359cae43
pan/bi: Garbage collect stuff in bi_layout.c
...
Predates clause scheduling.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
73f8ef2961
pan/bi: Fix UBO push with nir_opt_shrink_vectors
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
16579ca4b7
pan/bi: Add constant folding unit test
...
I just played with the implementation, let's ensure I didn't break it.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
87ebad74e5
pan/bi: Refactor constant folding for testability
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
972d517d41
pan/bi: Use bi_apply_swizzle in constant folding
...
Much more legible now.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
ce8e269e60
pan/bi: Add helper to swizzle a constant
...
Instead of open-coding special cases in multiple places, just keep a
canonical version that handles every case.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
b55fb073a4
pan/bi: Add strip_index helper
...
Needed to correctly lower sources to moves, used in the FAU lowering.
Technically, the issue is already present on Bifrost, but it's hidden
because Bifrost packing doesn't validate the absense of unsupported
modifiers. Valhall packing adds more safety, which caught this issue.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
a5727909e1
pan/bi: Rename CLPER_V7 back to CLPER
...
v6 is really the oddball here. CLPER on v9 supports a superset of v7.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
f9616b7463
pan/bi: Rename NOP.i32 to NOP
...
Simpler and matches the syntax of Valhall I've picked out.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
245c0ec755
pan/bi: Fix typo in FAU enum
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
fccbf4985d
pan/bi: Model Valhall special values as FAU
...
Not sure if this is "really" FAU but it's convenient to treat it as
such.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
9324510173
pan/bi: Model RSCALE for Valhall
...
Faster than FMA_RSCALE. We'll want to optimize this (e.g. for exp2).
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
62147d4126
pan/bi: Model *ADD_IMM instructions in IR
...
Needed for Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
5b0d6672f0
pan/bi: Remove unused BIR_FAU_HI
...
Redundant with offset.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
1cde245f76
pan/bi: Add discard flag to bi_index
...
Needed to model Valhall instructions. Should also be useful to RA if we
ever get around to doing something SSA based.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
be95198de5
pan/bi: DCE after bifrost_nir_lower_algebraic_late
...
Needed for sat_signed to fuse, since we run modifier prop before backend
DCE.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
e6fdbb85bc
pan/bi: Constify BIR manipulation
...
For use in Valhall packing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
0149dee377
pan/bi: Remove redundant check in clamp fusing
...
Already checked above.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
07b259defc
pan/bi: Add instruction unit test macro
...
Checks for instruction equality.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
6053741610
pan/bi: Add instruction equality helper
...
Useful for unit testing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
0394cc7c1d
pan/bi: Add helpers for unit testing
...
At some point I should stop reinventing GTest but, look, writing tests
at all is big for me, one thing at a time, ok? 😋
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
cdc79d2a03
pan/bi: Output binaries from standalone compiler
...
Useful for shader replacement.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
8cbabbd532
pan/bi: Only call clause code on Bifrost
...
Valhall will have its own simpler code path.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
dc569585a6
pan/bi: Add quirks for Mali G78
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
18dedd80db
pan/bi: Do more mesa/st stuff in standalone compiler
...
From freedreno.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
f01f5e7168
pan/bi: Zero initialize shader_info
...
Fixes the following assert with the standalone compiler
bifrost_compiler: ../src/panfrost/bifrost/bi_opt_push_ubo.c:134: bi_opt_push_ubo: Assertion `ctx->info->push.count == 0' failed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
027a8bf82c
pan/bi: Parse file names in standalone compiler
...
Would like to compile compute shaders too.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
e5b5132c63
pan/bi: Remove unused option
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
1b85dfb6a5
pan/bi: Remove unused pointer from bi_instr
...
Yikes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Mike Blumenkrantz
59951b6f24
zink: use dynamic line stipple
...
save those pipeline bits!
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12011 >
2021-07-27 23:22:19 +00:00
Mike Blumenkrantz
b61c96b692
ci: add another zink job with timelines disabled
...
this codepath needs to be maintained for *vague handwaving*
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12089 >
2021-07-27 23:09:47 +00:00
Mike Blumenkrantz
64785df389
zink: add env var to disable timelines
...
for ci use only
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12089 >
2021-07-27 23:09:47 +00:00
Mike Blumenkrantz
627371fe01
zink: export PIPE_CAP_TGSI_BALLOT
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
410d4dc529
zink: remove VK_EXT_shader_subgroup_ballot from device info
...
restrict this to 1.2 only
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
a05693d332
zink: implement compiler handling for subgroup ballot builtins/intrinsics
...
these are all lowered and unremarkable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
252165d925
zink: lower subgroup ballot instructions
...
this handles rewrites of ballot-related instructions/builtins to spirv
vec4 types from the native GLSL U64 type
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
4bd6a0299b
zink: change descriptor flushing to assert
...
there should never be flushing due to pool depletion; instead, trigger an
oom flush and stall to replenish the pool after the draw/compute
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12012 >
2021-07-27 22:34:21 +00:00
Philipp Zabel
8ba44103b3
etnaviv: fix gbm_bo_get_handle_for_plane for multiplanar images
...
Implement resource_get_param for PIPE_RESOURCE_PARAM_NPLANES and fix
resource_get_handle to walk to the correct linked resource for
multiplanar images, allowing gbm_bo_get_handle_for_plane to be called
with plane > 0.
This fixes an assert that is triggered when a wayland client tries
to send weston an NV12 dmabuf, for example:
weston: .../mesa/src/gbm/backends/dri/gbm_dri.c:752: gbm_dri_bo_get_handle_for_plane: Assertion `plane == 0' failed.
Fixes: 788f6dc857 ('Revert "gallium/dri: fix dri2_from_planar for multiplanar images"')
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12037 >
2021-07-27 23:13:57 +02:00
Rohan Garg
f1cd56cdc1
virgl: Enable caching for sampler views and render targets
...
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11241 >
2021-07-27 20:34:38 +00:00
Rohan Garg
8cb795b477
Revert "Revert "virgl: Cache depth and stencil buffers""
...
This reverts commit a8e75bb73c .
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11241 >
2021-07-27 20:34:38 +00:00
Rohan Garg
a425c5df78
virgl: Add more meta data to cached resources
...
By expanding the meta data about resources in the cache we can match more
resources such as 3D textures, samplers and render targets.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11241 >
2021-07-27 20:34:38 +00:00
Alyssa Rosenzweig
8d104a387a
pan/va: Integrate the tests into meson test
...
This way we will get testing in CI. Invoke as
meson test --suite=panfrost
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
b2046750c4
pan/va: Add disassembler test harness
...
Uses the same set of cases. This is a standalone C program because the
easy way of hooking into the disassembler from Python with subprocesses
was slow. This seems cleaner anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
f917fb63e7
pan/va: Add assembler test harness
...
Integration regression testing. Nothing fancy.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
372879cf6c
pan/va: Add negative test cases for the assembler
...
These are lines of assembly that look valid but are not, and should
raise a parser error but not otherwise crash the assembler or produce
invalid code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
70430d322f
pan/va: Add dis/assembler test cases
...
These are valid pairs of hexdumped assembled instructions and the
corresponding disassembly, to be used to regression test both the
assembler and the disassembler.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
688827f3c5
pan/va: Add disassembler generator
...
When we bring up the Valhall compiler in Mesa, we will like to have a
disassembler in native code, so we shouldn't write our disassembler in
Python. Instead, we write a disassembler generator in Python with mako
templates, which will produce a va_disasm_instr entrypoint from the
architecture defined in ISA.xml and valhall.py.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
227547db48
pan/va: Check for FAU conflicts in the assembler
...
Logic described in the "Uniform/constant restrictions" section of the
Valhall specification. (You know, my Valhall specification. Is there
another one?)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
508dfba913
pan/va: Add Valhall assembler
...
This Python script acts as a standalone assembler. It takes Valhall
instructions with Mesa-flavour syntax, parses them, errors out if there
are syntax errors, and writes out an assembled binary if there are not.
It also is available as a programmatic interface for automated testing.
While this attempts to handle syntax errors, it does not check
semantics. It will happily compile programs that fault, provided each
instruction locally 'looks' plausible.
The code itself is quite small, despite supporting most of the known
ISA, because the syntax is regular and the heavylifting is done by
ISA.xml and valhall.py.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
c43327c049
pan/va: Assert no instructions are duplicated
...
Caught a bug in the published PDF. Whoops!
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
02e378b628
pan/va: Add ISA.xml parser and support code
...
This Python module parses the ISA.xml file added in the previous
commits, extracts all the useful information, and combines it with
extra annotations. In total, it provides a programmatic way to interface
with the Valhall instruction set.
from valhall import instructions, enums
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
Alyssa Rosenzweig
316486dd9f
pan/va: Add initial ISA.xml for Valhall
...
This handwritten file is the product of over a hundred hours of
reverse-engineering and represents the sum of what I've learned about
the Valhall architecture. It will be used in the next commits as the
backbone of a Valhall toolchain.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025 >
2021-07-27 20:20:32 +00:00
suijingfeng
44aa7e25dd
llvmpipe: correct the debug information printed with GALLIVM_PERF=nopt
...
GALLIVM_PERF_NO_OPT is "belond" to GALLIVM_PERF environment variable,
not GALLIVM_DEBUG. when GALLIVM_PERF=nopt is passed to llvmpipe,
"-sroa -early-cse -simplifycfg -reassociate -constprop -instcombine -gvn"
should not be printed. Those llvm optimation techniques should only be
printed when the default(-O2) optimation is enabled.
$ GALLIVM_PERF=nopt GALLIVM_DEBUG=dumpbc glmark2
Before apply this patch:
Invoke as "opt -sroa -early-cse -simplifycfg -reassociate -mem2reg -constprop -instcombine -gvn ir_setup_variant_0.bc | llc -O2 [-mcpu=<-mcpu option>] [-mattr=<-mattr option(s)>]"
After apply this patch:
Invoke as "opt -mem2reg ir_fs304_variant0.bc | llc -O0 [-mcpu=<-mcpu option>] [-mattr=<-mattr option(s)>]"
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Signed-off-by: suijingfeng <suijingfeng@loongson.cn >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11994 >
2021-07-27 19:57:21 +00:00
Lepton Wu
7ff30a0499
gallium: Reset {d,r}Priv in dri_unbind_context
...
The code in dri_make_current just checks the value of the pointers
to decide to update texture_stamp or not. This is buggy since a new
allocated drawable could share the same address with the previous
released drawable. Fix the stale pointer issue by always resetting
these pointers to NULL in dri_unbind_context.
v2:
Move the reset codes to the end of the function.
Signed-off-by: Lepton Wu <lepton@chromium.org >
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12050 >
2021-07-27 18:40:11 +00:00
Jason Ekstrand
49908c602f
anv/android: Rework our handling of AHardwareBuffer imports
...
The current code we have for this is a bit of a mess, likely due to
trying too hard to put it in anv_android.c. The external_format bit in
anv_image, for instance, really means "quit creation early" which is
something we want to do for AHardwareBuffer imports regardless of
whether or not they use a native format. It gets set both by declaring
an AHardwareBuffer external handle type and by VkExternalFormatANDROID.
However, VkExternalFormatANDROID is only allowed for AHardwareBuffer
imports. If we ever did get an external format outside the context of
an AHardwareBuffer import, we would end up with a useless partially
created image.
When we detect an AHardwareBuffer import, we punt off to a function in
anv_android.c that does nothing interesting but call anv_create_image
with AUX disabled and external_format = true. The aux disable here is
useless because the actual isl_surf layout is done by resolve_ahw_image
which also sets ISL_SURF_USAGE_DISABLE_AUX_BIT. As far as external
formats go, anv_image_from_external() sets it regardless of whether or
not there is actually an external format.
This commit replaces anv_image::external_format with anv_image::from_ahb
which is the thing we actually want to track for this. We delete
anv_image_from_external and a bunch of the external_format handling
because it's all useless. The end result is massively simpler and,
while it appears to blur the boundary between Android code and the rest
of the driver, it makes the whole flow more obvious.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12040 >
2021-07-27 14:45:28 +00:00
Connor Abbott
d903f51631
tu: Triage some CTS failures
...
These should be fixed by the linked VK-GL-CTS change. I couldn't
reproduce the other renderpass failure on a650 though.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12065 >
2021-07-27 13:55:46 +00:00
Tomeu Vizoso
59c2337f22
panvk: Implement vkCmdClearAttachments
...
For now it only supports one RT and color attachments.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019 >
2021-07-27 15:18:35 +02:00
Tomeu Vizoso
cd97eb123e
panvk: Expose panvk_cmd_alloc_fb_desc and panvk_cmd_alloc_tls_desc
...
For use in panvk_meta.c.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019 >
2021-07-27 15:18:35 +02:00
Tomeu Vizoso
f295e7f1d9
panvk: A pipeline might not be bound when the render pass is ended
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019 >
2021-07-27 15:18:34 +02:00
Tomeu Vizoso
7a0acc35af
panvk: Move check for fragment requirement up to the draw
...
As the panvk_cmd_alloc_fb_desc function might be called outside a draw,
without a pipeline having been bound to the command buffer.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019 >
2021-07-27 15:18:34 +02:00
Tomeu Vizoso
cef56d5824
panvk: Close batch when ending a command buffer
...
In some cases, there will be an open batch because an event operation
has been recorded, or a non-rendering command.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019 >
2021-07-27 15:18:34 +02:00
Tomeu Vizoso
616aa3f138
panvk: Start a new batch when the job index gets above the limit
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019 >
2021-07-27 15:18:34 +02:00
Tomeu Vizoso
498e5f44fa
panvk: Don't try to update samplers if they are immutable
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019 >
2021-07-27 15:18:34 +02:00
Juan A. Suarez Romero
15ac51f758
ci/v3dv: update vulkan expected results
...
Add a couple of flakes.
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12068 >
2021-07-27 12:44:50 +00:00
Yevhenii Kolesnikov
c3f47f6e30
glsl: Properly handle .length() of an unsized array
...
There are two distinct cases:
- The last member of a shader storage block (length determined at run-time)
- Implicitly-sized array (length determined at link-time)
Fixes: 273f61a005 ("glsl: Add parser/compiler support for unsized array's length()")
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11952 >
2021-07-27 10:02:50 +00:00
Yevhenii Kolesnikov
441826aaaa
glsl: Add operator for .length() method on implicitly-sized arrays
...
ARB_shader_storage_buffer_object extension (promoted to core in 4.3) allows us
to call .length() method on arrays declared without an explicit size. The length is
determined at link time as a maximum array access.
Fixes: 273f61a005 ("glsl: Add parser/compiler support for unsized array's length()")
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11952 >
2021-07-27 10:02:50 +00:00
Erico Nunes
e6cdb01c51
lima: avoid crash with negative viewport values
...
The viewport value computations done in lima_set_viewport_states
can result in a negative value for viewport.
These could end up converted to unsigned values in
lima_clip_scissor_to_viewport causing crashes from invalid
scissor commands.
Prevent this by limiting the minimum value to zero as is already
done for the left and bottom values.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2938
Cc: mesa-stable
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12055 >
2021-07-27 08:48:28 +00:00
Pierre-Eric Pelloux-Prayer
11d6441b94
dlist: don't handle unmerged draws as merged
...
The comment was incorrect: we can have N draws using the
same mode with N > 1 (eg: GL_QUAD_STRIP draws
cannot be merged).
This commit fixes the drawing code to use the correct draw
function.
This fixes a hang in Starsector (see issue #5086 ).
Fixes: b328d8e9bc ("dlist: use an union instead of allocating a 1-sized array")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11978 >
2021-07-27 08:19:16 +00:00
Iago Toral Quiroga
0b36c2916d
v3dv: expose VK_KHR_multiview
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:32 +00:00
Iago Toral Quiroga
c19dcec604
v3dv: implement interaction of queries with multiview
...
When multiview is enabled, queries must begin and end in the
same subpass and N consecutive queries are implicitly used,
where N is the number of views enabled in the subpass.
Implementations decide how results are split across queries.
In our case, only one query is really used, but we still need
to flag all N queries as available by the time we flag the one
we use so that the application doesn't receive unexpected errors
when trying to retrieve values from them.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:32 +00:00
Iago Toral Quiroga
374215de1a
v3dv: fix query error handling
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:32 +00:00
Iago Toral Quiroga
b1620caaaf
v3dv: track first and last subpass that use a view index
...
When multiview is enabled, we no longer care about when a particular
attachment is first or last used in a render pass, since not all views
in the attachment will meet that criteria. Instead, we need to track
each individual view (layer) in each attachment and emit our stores,
loads and clears accordingly.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:32 +00:00
Iago Toral Quiroga
34724bafa4
v3dv: skip processing tiles for layers that are not in the view mask
...
If a multiview subpass doesn't use a particular layer then we can ignore
that layer completely.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
32cb8809aa
v3dv: use correct number of layers for multiview
...
The Vulkan spec states that when multiview is enabled the number of
layers in the framebuffer is set to one and that each attachment
must then have at least as many layers as referenced by view masks
in the subpasses in which is used.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
f46f5eac7c
v3dv: don't merge subpasses with different view masks
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
5fd55ab16d
v3dv: broadcast multiview draw commands
...
We implement multiview by replicating draw commands for all enabled
views and setting a command buffer state for the currently active
view we are broadcasting to.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
d5acae3206
broadcom/compiler: implement nir_intrinsic_load_view_index
...
This is used for multiview's gl_ViewIndex built-in.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
5872c7ca7b
v3dv: inject a custom passthrough geometry shader for multiview pipelines
...
This allows us to use layered rendering to broadcast draw calls to the
appropriate views (layers).
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
9da26af074
v3dv: move all our NIR pre-processing to preprocess_nir
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
f5e67e1ce7
v3dv: store multiview info in our render pass data
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Iago Toral Quiroga
dc86e032cb
v3dv: drop unused parameters
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034 >
2021-07-27 07:31:31 +00:00
Samuel Pitoiset
72f55cf7c4
radv: implement VK_EXT_shader_atomic_float2
...
Some floating atomic instructions are not available on GFX8-9.
No LLVM support.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12060 >
2021-07-27 08:44:36 +02:00
Samuel Pitoiset
6694c37ea0
aco: implement VK_EXT_shader_atomic_float2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12060 >
2021-07-27 08:44:31 +02:00
Chia-I Wu
71912de1d2
venus: log more WSI messages
...
They can be useful before resorting to gdb or perfetto.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12073 >
2021-07-27 06:21:47 +00:00
Eduardo Lima Mitev
ee3495e465
turnip: Add support for VK_VALVE_mutable_descriptor_type
...
v1. Hyunjun Ko <zzoon@igalia.com >
- Add to hanlde VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE
- Don't support VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
v2. Hyunjun Ko <zzoon@igalia.com >
- Fix some indentations and nitpicks.
- Add the extension to features.txt
v3. Hyunjun Ko <zzoon@igalia.com >
- Remove unnecessary asserts.
Signed-off-by: Eduardo Lima Mitev <elima@igalia.com >
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9322 >
2021-07-27 04:53:02 +00:00
Chia-I Wu
567bbfd56b
venus: suballocate memory in more cases
...
When a dedicated allocation is not required, ignore it and suballocate.
Fixes dEQP-VK.api.invariance.random.
Cc: 21.2 mesa-stable
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12072 >
2021-07-27 03:53:52 +00:00
Chia-I Wu
f06b0df741
venus: clean up vn_AllocateMemory
...
Mainly to add vn_device_memory_should_suballocate.
Cc: 21.2 mesa-stable
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12072 >
2021-07-27 03:53:52 +00:00
Roland Scheidegger
cac5711d43
llvmpipe: fix nir dot products (fsum op)
...
When the dot product uses a source which can be optimized to a scalar,
after a bunch of nir optimization steps the source to fsum will be a scalar
with a x replicate swizzle. Hence nir_src_num_components is just 1 and the
fsum was just a no-op which is not correct. Arguably this could be optimized
a bit better, but just determine the number of addends by using nir_op_infos
instead (the operand fetch was fixed already by 39a938ecf4 doing the same).
Fixes: 4eb0475b5a ("gallivm/nir: add fsum support")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12066 >
2021-07-27 00:50:55 +00:00
Mike Blumenkrantz
6691a48bcc
zink: EXT_vertex_input_dynamic_state
...
this eliminates vertex attributes from the pipeline state, massively
deduplicating the number of pipelines needed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12009 >
2021-07-27 00:36:27 +00:00
Mike Blumenkrantz
907e4a0f02
zink: improve oom flushing
...
flush on 30k works and also check oom_flush
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12010 >
2021-07-27 00:28:02 +00:00
Mike Blumenkrantz
9460c350b1
zink: merge draw_count and compute_count, move to batch struct
...
one fewer deref and now it's a single counter
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12010 >
2021-07-27 00:28:02 +00:00
Mike Blumenkrantz
48473ec967
zink: more explicitly check shader stages during compile
...
this is a bit more obvious
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12013 >
2021-07-27 00:14:44 +00:00
Mike Blumenkrantz
7665e656c1
zink: remove no longer used internal resource function
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:52:49 -04:00
Mike Blumenkrantz
3137795e38
zink: replace some direct batch_usage calls with resource abstractions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:52:47 -04:00
Mike Blumenkrantz
12417c030b
zink: use new resource batch usage utils for is_resource_busy
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:52:00 -04:00
Mike Blumenkrantz
6bda555cc0
zink: simplify some dumb code in invalidate_buffer
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:51:53 -04:00
Mike Blumenkrantz
79ccc17da5
zink: use resource batch usage helpers in invalidate_buffer()
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:48:07 -04:00
Mike Blumenkrantz
e5d6ce6e5e
zink: collapse a conditional in zink_batch_resource_usage_set()
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:48:07 -04:00
Mike Blumenkrantz
13d732ec5b
zink: add some resource util functions for batch usage
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:48:07 -04:00
Mike Blumenkrantz
0a2b03376d
zink: force batch completion check on query result
...
non-timeline drivers have no screen-based method of "checking" batch
completion, so the context method has to be used here to avoid an infinite
loop
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:48:07 -04:00
Mike Blumenkrantz
5bab4cc546
zink: add screen function for checking usage completion
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008 >
2021-07-26 19:48:07 -04:00
Rob Clark
53c39f710f
freedreno/a6xx: Add missing PC_CCU_INVALIDATE_x
...
The kernel normally inserts these between submits, but when we merge
submits in userspace we need to add them ourselves.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5114
Fixes: cccdc513e3 ("freedreno/drm/sp: Implement deferred submit merging")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12049 >
2021-07-26 21:11:35 +00:00
Mike Blumenkrantz
1dc7b9b08b
zink: use array size in spirv bo length calculations
...
I don't know why I was dropping this, but doing so breaks drivers that have
optimization passes based on the lengths of these variables
Fixes: c1cdf30a11 ("zink: apply Delete All The Code methodology to the ubo/ssbo variables")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12070 >
2021-07-26 20:59:07 +00:00
Roman Stratiienko
ed98e54f19
kmsro: Add 'kirin' driver support
...
Kirin is used by hisilicon SOCs (Hikey boards, etc.)
Driver is available in the mainline kernel [1]
[1]: https://elixir.bootlin.com/linux/v5.13/source/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c#L928
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11755 >
2021-07-26 20:39:17 +00:00
Dave Airlie
5bf6ec31cc
crocus/gen4: restrict memcpy mapping to gen5
...
This is due to gen4 + 4.5 having some rather strange swizzling
that we can't actually detect properly in userspace
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12058 >
2021-07-26 20:28:37 +00:00
Thong Thai
856e2b7529
frontends/va: change to per-layer rate control
...
Allows for each layer in a Scalable Video Coding (SVC) video to have its
own rate control setting, when encoding H.264.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:06:22 -04:00
Thong Thai
c2695823fd
frontends/omx: change rate ctrl struct to array
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:06:17 -04:00
Thong Thai
687bbe2270
radeon/vcn/enc: change to per-temporal layer rate control
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:06:13 -04:00
Thong Thai
65ad80f1d8
radeon/vce: change rate ctrl struct to array
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:06:09 -04:00
Thong Thai
21da3be7a2
r600: change rate ctrl struct to array
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:06:05 -04:00
Thong Thai
1e0d512595
gallium: change rate ctrl struct to array
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:06:00 -04:00
Thong Thai
ec53e519c3
frontends/va: handle h264 num_temporal_layers for SVC encoding
...
Allows for the number of temporal layers to be specified when encoding
Scalable Video Coding (SVC) H.264 videos.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:05:56 -04:00
Thong Thai
8236320a0b
radeonsi: enable H.264 temporal encoding support for VCN
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:05:48 -04:00
Thong Thai
51935d594e
radeon/vcn/enc: H.264 SVC encode
...
Implement H.264 temporal, Scalable Video Coding (SVC) for VCN devices by
sending the required parameters to the firmware, and creating H.264 NALU
prefix and SEI scalability_info headers.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:05:43 -04:00
Thong Thai
41f4b69354
gallium: update h264 struct to track temporal layers
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:05:39 -04:00
Thong Thai
96c581e897
frontends/va: check number of temporal layers supported by encoder
...
Checks the encoder to determine the number of temporal layers supported,
and returns max_num_temporal_layers_minus1, along with setting the
corresponding control flag if multiple layers are supported.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:05:33 -04:00
Thong Thai
a23beb9c43
gallium: add temporal layers cap enum
...
Determine the number of temporal layers the encoder supports. Used for
encoding Scalable Video Coding (SVC) videos.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850 >
2021-07-26 15:05:26 -04:00
Danylo Piliaiev
b45cddda18
tu: handle half-reg fs outputs
...
This would allow to enable translation of RelaxedPrecision spirv
variable decorator into mediump which for us means fp16.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12067 >
2021-07-26 16:25:14 +00:00
Karol Herbst
1387d1d411
nv30: fix emulated vertex index buffers
...
We ended up applying the offset twice. Quite embarrassing.
This fixes a bunch of vertex shader related issues like the gnome desktop
is less broken and probably a lot of other applications.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5061
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12054 >
2021-07-26 15:39:25 +00:00
Samuel Pitoiset
0497588eac
radv: allow unused VkSpecializationMapEntries
...
Fixes future CTS: dEQP-VK.pipeline.spec_constant.*.basic.*unused_*
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12062 >
2021-07-26 14:09:09 +02:00
Daniel Schürmann
bc500da67d
nir/shrink_vectors: shrink vecN properly
...
This patch allows to shrink vecN instructions where
one or more components at any position are unused.
Stat changes for softpipe:
total instructions in shared programs: 2986101 -> 2985416 (-0.02%)
instructions in affected programs: 51216 -> 50531 (-1.34%)
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Daniel Schürmann
36fe7398c0
nir/shrink_vectors: shrink ALU properly
...
ALU instructions of which not all components are read,
can be shrunk to the number of read components.
Previously, this would only remove trailing components.
This patch enables to remove components from any position.
Stat changes for softpipe:
total instructions in shared programs: 3001291 -> 2984698 (-0.55%)
instructions in affected programs: 225585 -> 208992 (-7.36%)
total loops in shared programs: 1389 -> 1358 (-2.23%)
loops in affected programs: 36 -> 5 (-86.11%)
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Daniel Schürmann
8317fe314c
nir/opt_shrink_vectors: reverse iteration order
...
This pass should be backwards in order to reach the fixed point
in linear time.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Daniel Schürmann
d27417b597
nir: consider write_mask in nir_ssa_def_components_read()
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Daniel Schürmann
73905c4d01
nir/opt_shrink_vectors: don't shrink vectors used by intrinsics
...
Store intrinsics shrink the sources by creating a new vecN.
Other intrinsics cannot shrink their sources.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Daniel Schürmann
ece99eb69f
nir/lower_alu_to_scalar: don't skip gaps in write_mask
...
Otherwise, this may lead to segmentation faults.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Juan A. Suarez Romero
4eb0475b5a
v3dv: assert job->cmd_buffer is valid
...
In v3dv_write_uniforms_wg_offsets() function, the job's cmd_buffer is a
valid command buffer, so there is no reason to check if its NULL or not.
This fixes CID#1487441 ("Dereference after null check") error.
v1:
- `job->cmd_buffer` is the same as `cmd_buffer` (Alejandro)
v2:
- Use `cmd_buffer` instead of `job->cmd_buffer` (Iago)
Fixes: 31a786c80a ("v3dv: handle QUNIFORM_FB_LAYERS")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11999 >
2021-07-26 07:28:37 +00:00
Lionel Landwerlin
8a99873712
isl: fix mapping of format->stringname
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: ed6e586562 ("intel: properly constify isl_format_layouts")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5110
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12051 >
2021-07-26 07:16:28 +00:00
Shmerl
8aa6002943
vulkan/overlay: don't display histogram and range for device and format
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4320
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12056 >
2021-07-25 21:29:31 +00:00
Dave Airlie
2138d1b9e6
teximage: return correct desktop GL error for compressedteximage
...
For GL4.6 the spec says to return GL_INVALID_OPERATION for this.
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12032 >
2021-07-26 05:59:18 +10:00
Alyssa Rosenzweig
9cc0834ca6
asahi: Generalize src_offset for non-4byte formats
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 18:00:39 -04:00
Alyssa Rosenzweig
a3e0b3b912
asahi: Add integers to agx_vertex_formats
...
Handles all the easy cases.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 18:00:07 -04:00
Alyssa Rosenzweig
3cd6f62388
agx: Shift vertex buffer stride in the compiler
...
Required to support non-32-bit vertex formats efficiently.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:57:19 -04:00
Alyssa Rosenzweig
c7ba0fb04d
agx: Add agx_format_shift routine
...
Required to calculate alignments for vertex buffers correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:45:38 -04:00
Alyssa Rosenzweig
b329fe8264
asahi: Pass instance_divisor to the compiler
...
Passes dEQP-GLES3.functional.instanced.*
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:26:02 -04:00
Alyssa Rosenzweig
96c98e0d25
agx: Define p_extract for type converts
...
Useful for grabbing the high 32-bit word of a 64-bit value.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:25:40 -04:00
Alyssa Rosenzweig
3417ecb4d7
agx: Implement instanced arrays
...
Divide by instance divisor if needed. Same strategy as ACO.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:25:11 -04:00
Alyssa Rosenzweig
538e3a3100
agx: Include divisors in the vertex shader key
...
Needed to lower the divisions.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:24:47 -04:00
Alyssa Rosenzweig
0c353d47be
agx: Add udiv-by-constant routine
...
Uses the ridiculousfish algorithm, will be used to lower instanced
arrays into something efficient.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:24:02 -04:00
Alyssa Rosenzweig
50a4c993fd
agx: Add agx_ushr helper
...
Syntax sugar for the underlying bitfield manipulation instruction.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:23:42 -04:00
Alyssa Rosenzweig
3c1f754a71
agx: Handle load_instance_id
...
Preloaded into r6, as predicted.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:12:18 -04:00
Alyssa Rosenzweig
3f5eebe5e6
agx: Drop dated /* TODO: RA */
...
We skip over vertex ID in RA now, it's fine.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:12:03 -04:00
Alyssa Rosenzweig
1b1dd2e522
asahi: Enable instancing
...
Passes dEQP-GLES3.functional.draw.draw_arrays_instanced.lines.single_attribute
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:04:25 -04:00
Alyssa Rosenzweig
465224379c
agx: Plug memory leak in register allocator
...
Fixes: 85e18deb18 ("agx: Assign registers locally")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reported-by: Coverity
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:00:22 -04:00
Alyssa Rosenzweig
7848100f27
agx: Use consistent ncomps
...
Fixes register allocation failure in:
dEQP-GLES3.functional.ubo.single_basic_array.shared.row_major_mat4_fragment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:55:16 -04:00
Alyssa Rosenzweig
cce1a2fc19
agx: Dump register file when failing to allocate
...
Usually shows a bug.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:54:34 -04:00
Alyssa Rosenzweig
5fb9159eb9
agx: Fix mismatched units in load_ubo
...
Fixes assertion failure in
dEQP-GLES3.functional.ubo.single_basic_type.shared.highp_float_fragment
Assertion failed: ((value & 1) == 0), function agx_print_sized, file
../src/asahi/compiler/agx_print.c, line 39.
Fixes: 033d4d09fc ("agx: Implement load_ubo/kernel_input")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:39:44 -04:00
Alyssa Rosenzweig
5deb7c26d6
agx: Don't set helper invocation kill bit
...
In the future we'll need data flow analysis similar to what we do in
panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:27:35 -04:00
Alyssa Rosenzweig
8aa5ba4012
asahi: Assert texture layer is nonzero
...
The app shouldn't do funny things with layers... currently unsupported,
one issue at a time...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
41417a9949
asahi: Require tiling for cube maps
...
Makes my dEQP happy.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
3ecc14a747
asahi: Simplify can_tile type signature
...
dev parameter inherited from panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
904ce66433
asahi: Allow tiled cube maps
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
7b4eb731f1
asahi: Use agx_rsrc_offset for linear transfer_map
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
695fe3897d
asahi: Implement cube map tiling transfers
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
143783538a
asahi: Calculate resource offsets for cube maps
...
Needed to transfer.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
be3d4ce8c4
asahi: Calculate cube map stride
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
db6d5a0860
asahi: Set texture dimension field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
1671022bf2
asahi: Identify texture dimension field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
23f5ad668f
asahi: Fix sampler filtering flag
...
Typo in the XML. Fixes broken filtering. Still chasing an off-by-one.
Fixes: cad54e2721 ("asahi: Add command buffer XML definitions")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
f376a90d21
asahi: Identify texture address field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Enrico Galli
73262d4bd4
microsoft/spirv_to_dxil: Adding continue opt pass to fix DXIL loop gen
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12048 >
2021-07-24 14:47:41 +00:00
Chia-I Wu
bd9550b026
vulkan/wsi: replace prime_blit_buffer by a bool
...
venus only needs to know if a WSI image is a prime blit source. In an
upcoming swapchain image rework, the prime blit destination is unknown
when the WSI image is created. Replace prime_blit_buffer by a bool.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12046 >
2021-07-23 15:31:20 -07:00
Georg Lehmann
890b1c0f2a
aco: Use cpp_msvc_compat_args.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11610 >
2021-07-23 20:28:58 +00:00
Georg Lehmann
c6bcafcc07
radv: Use c_msvc_compat_args.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11610 >
2021-07-23 20:28:58 +00:00
Alyssa Rosenzweig
b17f90ab4a
panvk: Fix sampler filter modes on Bifrost
...
The logic was incorrectly inverted, although it is correct for Midgard
and in OpenGL.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
058d4d3b3e
panfrost: Make panfrost_batch_get_bifrost_tiler per-gen
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
6f0c235da1
panfrost: Move init_batch to GenXML vtbl
...
Secretly depends on GenXML.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
3d0f6592b2
panfrost: Use PAN_ARCH for the rest of pan_cmdstream
...
Mostly trivial substitutions to get rid of dev->arch, dev->quirks, and
pan_is_bifrost()
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
d7a0720ef1
panfrost: Add a concatenation macro for genxml
...
This is safer, since it allows the thing being concatenated to itself be
an expande macro, which we'll use as a stopgap to construct tiler jobs
with unified code. It's also a bit more readable, I think.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
f4b0d17395
panfrost: #ifdef fragment RSD packing
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
a222ead4de
panfrost: #ifdef pan_merge_empty_fs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
433ca313ad
panfrost: Share blend code across architectures
...
Midgard code is basically a subset of the Bifrost/Valhall code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
84c33f188f
panfrost: Share sampler code across archs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
c80732eab3
panfrost: Match sampler "nearest" names
...
Midgard calls this nearest but Bifrost calls it point sample. Of the
two, nearest is the standard term, so change the Bifrost XML to use that
name. That way we can share more code constructing samplers.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
fd298985c8
panfrost: Don't make get_index_buffer_bounded per-gen
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
2670c4db91
panfrost: Statically determine uses_clamp
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
284b71a2e1
panfrost: Compile pan_cmdstream per-gen
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
4cce6b913e
panfrost: Move sysval analysis out of per-gen
...
Arch-independent.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
5039c66ae9
panfrost: Make sampler view creation private
...
Move it up in the file to avoid forward decls.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
d0e6db100c
panfrost: Move context initalization to the vtable
...
Now there's only a single genx entrypoint.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Emma Anholt
366de834aa
ci/freedreno: Enable the MSAA deqp tests.
...
We've had issues with these before when merging to Chrome OS, so let's
make sure we're testing them now that we can do surfaceless pbuffer MSAA.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1859 >
2021-07-23 19:22:44 +00:00
Adam Jackson
18e7633b38
egl/dri2: Stop disabling pbuffer support on msaa configs
...
We started doing this in:
commit 4d6d55deef
Author: Tapani Pälli <tapani.palli@intel.com >
Date: Mon Sep 26 10:03:32 2016 +0300
egl: stop claiming support for pbuffer + msaa
This fixes a crash in egl-create-msaa-pbuffer-surface Piglit test
and same crash in many dEQP EGL tests.
Whatever bug that was papering over appears to be fixed by now, I can
no longer reproduce that crash with piglit. Furthermore, disabling that
bit in the generic dri2 code had the side effect that the surfaceless
platform would advertise EGLConfigs with _no_ supported surface types
(since surfaceless only supports pbuffers).
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1859 >
2021-07-23 19:22:44 +00:00
Ryan Neph
0972b0f754
virgl: disallow null-terminated debug messages
...
virglrenderer doesn't support null-terminated message strings, so
there's no reason for the guest to allow it.
Signed-off-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12043 >
2021-07-23 11:04:19 -07:00
Jason Ekstrand
1431f6c765
nir: Validate newly documented texture restrictions
...
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Mike Blumenkrantz
499cc7a9ec
nir/validate: refactor validate_assert to have a return value
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Erik Faye-Lund
e212a191a6
dxil: Set coord_components on the txf in lower_int_sampler
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Jason Ekstrand
74ec2b12be
nir/lower_tex: Rework invalid implicit LOD lowering
...
Only fragment and some compute shaders support implicit derivatives.
They're totally meaningless without helper invocations and some
understanding of the dispatch pattern. We've got code to lower
nir_texop_tex in these shader stages to use an explicit derivative of 0
but it was pretty badly broken:
1. It only handled nir_texop_tex, not nir_texop_txb or nir_texop_lod.
2. It didn't take min_lod into account
3. It was conflated with adding a missing LOD parameter to opcodes
which expect one such as nir_texop_txf. While not really a bug,
this does make it way harder to reason about the code.
4. Unless you set a flag (which most drivers don't), it left the
opcode nir_texop_tex instead of nir_texop_txl which it should have
been.
This reworks it to go through roughly the same path as other LOD
lowering only with a constant lod of 0 instead of calling out to
nir_texop_lod. We also get rid of the lower_tex_without_implicit_lod
flag because most drivers set it and those that don't are probably
subtly broken. If someone really wants to get nir_texop_tex in their
vertex shaders, they can write a new patch to add the flag back in.
Fixes: e382890e25 "nir: set default lod to texture opcodes that..."
Fixes: d5ac5d6e83 "nir: Add option to lower tex to txl when..."
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Alyssa Rosenzweig
f9442e46ff
pan/mdg: Garbage collect silly quirk
...
As discussed with Jason and Connor, this is probably subtly broken on
Mali T720.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Jason Ekstrand
7ecfbaf7f0
intel/blorp: Use nir_texop_txl
...
We set an explicit LOD immediately afterwards so we don't want implicit
mipmap selection.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Jason Ekstrand
fa717a202c
docs,nir: Document NIR texture instructions
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Jason Ekstrand
4465ca296d
nir: Suffix all the MCS texture stuff _intel
...
It's intel-specific, used to get at MSAA compression information.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Jason Ekstrand
cdde108af5
panfrost: Don't handle nir_texop_txf_ms_mcs
...
It's an intel-specific opcode and will never be seen on panfrost
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Jason Ekstrand
a7b429e8ec
amd: Don't handle nir_tex_src_ms_mcs
...
It's an intel-specific texture source and will never be seen on AMD.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Jason Ekstrand
a2332d963d
ttn: Don't handle texop_txf_ms_mcs
...
It's an intel-specific opcode and will never come through TGSI.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775 >
2021-07-23 15:53:57 +00:00
Juan A. Suarez Romero
82d84a35a1
v3d: handle debug options with debug_named_value
...
Switch from using debug_control structure to debug_named_value
structure.
The main nice feature is that it provides a "help" option, so using
"V3D_DEBUG=help" will print all the debug options with a brief
description.
Useful to avoid going to https://docs.mesa3d.org/envvars.html everytime
we need to know the available options.
v1:
- Modify a couple of debug option documentation (Alejandro)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12036 >
2021-07-23 15:25:48 +00:00
Alyssa Rosenzweig
061508d310
targets/graw-xlib: Add missing dep_x11
...
Required to build Mesa on macOS with
-Dbuild-tests=true -Dglx=gallium-xlib
Without this change, the build fails with
In file included from ../src/gallium/targets/graw-xlib/graw_xlib.c:8:
../src/gallium/include/frontend/xlibsw_api.h:5:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
With `brew sh` X11 is found but linking fails due to `llvm-ar` missing
in the path. That issue appears to be unrelated to this missing
dependency. X11 is installed via XQuartz, so Homebrew should not be
required.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12022 >
2021-07-23 15:02:15 +00:00
Timothy Arceri
0e0633ca49
glsl: relax rule on varying matching for shaders older than 4.20
...
This expands on commit c54c42321e . See the code comment for full
justifications. At the time of the previous commit Ian wanted to
limit the relaxing of the rule to GLSL 3.30 as that was the highest
version of shaders seen in the wild that were having trouble with
the stricter rules.
However since then I've found that the long standing issue with tess
shaders failing to compile in the game 'Layers Of Fear' is due to
this same issue. The game uses 4.10 shaders and also makes use of
explicit varying locations, so here we relax the rule to 4.20 and
make sure to apply the restriction to shaders using varyings with
explicit locations also.
Fixes: c54c42321e ("glsl: relax rule on varying matching for shaders older than 4.00")
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11873 >
2021-07-23 03:06:26 +00:00
Dave Airlie
1e5a470b43
draw/llvmpipe: multiply polygon offset units by 2
...
I was trying to fix this test, but noticed brw_clip.c in i965
does a * 2 here, and it seems to fix this test as well.
Fixes:
dEQP-GLES2.functional.polygon_offset.default_displacement_with_units
Fixes: f9e2c24326 ("draw,llvmpipe,util: add depth bias calculation for arb_depth_buffer_float")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12029 >
2021-07-23 01:00:02 +00:00
Sagar Ghuge
ef29bb6bc5
intel/compiler: Handle ternary add in lower_simd_width
...
We need to lower the add3 instruction simd width otherwise in simd32
mode, we endup writing 4 register wide data which is not allowed.
Reported-by: Jordan Justen <jordan.l.justen@intel.com >
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11985 >
2021-07-22 23:38:04 +00:00
Sagar Ghuge
0608e76e00
intel/compiler: Fix missing break in switch
...
CoverityID: 1487496
Fixes: cde9ca616d "intel/compiler: Make decision based on source type instead of opcode"
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11985 >
2021-07-22 23:38:04 +00:00
Alyssa Rosenzweig
11cb374a30
panfrost,panvk: Remove broken v4 spilling code
...
Tells you how much use Mali T720 gets that nobody noticed but
Icecream95...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reported-by: Icecream95 <ixn@disroot.org >
Acked-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12027 >
2021-07-22 23:19:54 +00:00
Emma Anholt
b1dbbc3dc1
freedreno: Lock access to msm_pipe for RB object suballocation.
...
Hopefully this fixes the flakes that have happened since the suballoc
changes.
Fixes: 737d4caa83 ("freedreno: Suballocate our long-lived ring objects.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12002 >
2021-07-22 21:45:31 +00:00
Eric Anholt
af0fa5016d
gallium/ureg: Sort the output decls.
...
glsl_to_tgsi had been emitting outputs in sorted order, and it seems virgl
has a dependency on that -- it collects outputs into an array and indexes
by the subtracting the ".First" value of the first one seen, even if
that's not the first entry in the array.
Fixes the regressions in deqp-gles2 on virgl with ST_DEBUG=force_nir, and
fixes neverball trace rendering.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11934 >
2021-07-22 21:17:49 +00:00
Jason Ekstrand
929558776e
intel/eu: Don't validate LSC transpose on ops that don't have it
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11991 >
2021-07-22 21:06:33 +00:00
Dave Airlie
1087cf680a
gallivm/img: use uint for image coord builder.
...
VK CTS has a test that does -256 for sample index but since we use
signed >= we fail and write to random memory, changing to uint here
for comparisons for out of bounds and address calcs should ensure,
we stay within bounds even for negative vals.
Remove unused int_type/bld while here.
Fixes dEQP-VK.texture.multisample.invalid_sample_index.sample_count_4
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11913 >
2021-07-22 20:47:48 +00:00
Dave Airlie
e8fce38ed6
llvmpipe: rework query fence signalling for get_query_result_resource
...
For compute shaders stats avail was never signalling because nothing
flushed.
Fixes dEQP-VK.query_pool.statistics_query.host_query_reset.compute_shader_invocations.64bits_cmdcopyquerypoolresults_primary
and others
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11913 >
2021-07-22 20:47:48 +00:00
Jason Ekstrand
17f7b4b83e
turnip: Replace tu_lower_image_size with nir_lower_image
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12005 >
2021-07-22 14:22:35 -05:00
Jason Ekstrand
e83fe65cd8
radv,radeonsi: Do cube size divide-by-6 lowering in NIR
...
No point in carrying all this code around twice each in two back-ends.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12005 >
2021-07-22 14:22:35 -05:00
Jason Ekstrand
60b5faf572
nir/lower_tex: Add a lower_txs_cube_array option
...
Several bits of hardware require the division by 6 to happen in the
shader. May as well have common lowering for it.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12005 >
2021-07-22 14:22:35 -05:00
Jason Ekstrand
c6102dda0a
nir/lower_image: Handle index and bindless image_size
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12005 >
2021-07-22 14:22:35 -05:00
Alyssa Rosenzweig
1d6c790f9f
pan/bi: Mark mod to string as maybe unused
...
Fixes warnings like the following under clang:
src/panfrost/bifrost/bi_printer.c:599:1: warning: unused function 'bi_widen_as_str' [-Wunused-function]
bi_widen_as_str(enum bi_widen widen)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12003 >
2021-07-22 17:55:49 +00:00
Alyssa Rosenzweig
7346ab85b1
pan/bi: Remove duplicate NIR compiler options
...
Fixes the warning caught by clang (why did gcc miss this one?)
../src/panfrost/bifrost/bifrost_compile.h:81:45: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.lower_bitfield_extract_to_shifts = true,
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12003 >
2021-07-22 17:55:49 +00:00
Alyssa Rosenzweig
b56f5c27de
pan/bi: Add explicit cast for lod_or_mode
...
The enums alias. Fixes the following warning under clang:
../src/panfrost/bifrost/bifrost_compile.c:2515:25: warning: implicit conversion from enumeration type 'enum bifrost_texture_fetch' to different enumeration type 'enum bifrost_lod_mode' [-Wenum-conversion]
BIFROST_TEXTURE_FETCH_TEXEL;
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12003 >
2021-07-22 17:55:49 +00:00
Alyssa Rosenzweig
a95dd9494d
panfrost: Only build libpanfrost with GL/VK
...
It's not needed for the standalone compiler. These depend on xf86drm.h which is
not available on other platforms where we might want to build the standalone
compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12003 >
2021-07-22 17:55:49 +00:00
Alyssa Rosenzweig
55e6dd3724
panfrost: Remove unnecessary bifrost_compiler deps
...
These dependencies are not necessarily portbale, but bifrost_compiler itself is.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12003 >
2021-07-22 17:55:49 +00:00
Alyssa Rosenzweig
c10b886688
meson: Build panfrost with tools=panfrost
...
...even if neither GL or VK drivers are being built. Useful for building the
standalone compiler on non-Linux systems.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12003 >
2021-07-22 17:55:49 +00:00
Kai Wasserbäch
3a2d317b99
gallivm: fix FTBFS on i386 with LLVM >= 13, StackAlignmentOverride is gone
...
Use the newly added wrapper lp_set_module_stack_alignment_override() to
achieve the same end result.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org >
Closes : mesa/mesa#4906
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11940 >
2021-07-22 17:30:42 +00:00
Kai Wasserbäch
c1b4c64a28
gallivm: add new wrapper around Module::setOverrideStackAlignment()
...
We need it in the next commit to replace setting the stack alignment on
i386 with LLVM >= 13 through the TargetOption::StackAlignmentOverride,
which was removed in the upstream commit
<3787ee4571 >.
Unfortunately Module::setOverrideStackAlignment() is not available
through the C API and we need to wrap it ourselves.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org >
Reference: mesa/mesa#4906
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11940 >
2021-07-22 17:30:42 +00:00
Simon Ser
2a860bb8c3
egl: add support for EGL_EXT_device_drm_render_node
...
This new EGL extension has been introduced in [1].
When we have a DRM device and a render node, we can advertise the
extension and return the render node name for the
EGL_DRM_RENDER_NODE_FILE_EXT query.
For the special software EGL device, we can advertise the extension
and return NULL for the EGL_DRM_RENDER_NODE_FILE_EXT query, because
we can guarantee that llvmpipe will never use a render node for
rendering operations.
However, llvmpipe might be using a primary node when used with the
GBM platform. So we can't advertise EXT_device_drm in this case.
When we have a DRM device but no render node, that means we're on a
split render/display SoC. We _should_ return the render node used
by the renderonly driver, however Mesa needs more plumbing to allow
this, so let's just disable the extension for now.
[1]: https://github.com/KhronosGroup/EGL-Registry/pull/127
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11797 >
2021-07-22 17:12:35 +00:00
Simon Ser
1b96c4e24f
EGL: sync headers with Khronos
...
Taken from EGL-Registry commit dc0b58dca533c5882c38bc623d133190fff883a4.
Signed-off-by: Simon Ser <contact@emersion.fr >
Acked-by: Emil Velikov <emil.l.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11797 >
2021-07-22 17:12:35 +00:00
Juan A. Suarez Romero
a45117a325
ci/v3d: add piglit flake test
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12020 >
2021-07-22 16:16:29 +00:00
Rhys Perry
211d1dfd34
aco: don't create v_madmk_f32/v_madak_f32 from v_fma_legacy_f16
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5105
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12004 >
2021-07-22 15:43:31 +00:00
Rob Clark
215adc2f18
freedreno/registers: update dsi registers to support tpg
...
Based-on: https://patchwork.freedesktop.org/patch/445672/?series=92870&rev=1
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12021 >
2021-07-22 08:25:25 -07:00
Timothy Arceri
f3ec4a934d
util: add workaround for Full Bore
...
Unfortunately I contacted the dev about this issue years ago and he
made a fix, but it has never been released after all these years.
This stops the screen from being completely black in game.
CC: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11941 >
2021-07-22 10:55:28 +00:00
Dave Airlie
2f5cd08ede
llvmpipe: add support for time elapsed queries.
...
It turns out for QBO you really need to explicitly support time
elapsed queries to avoid wierd interactions with the non-qbo
query paths.
Fixes: 506e51b856 ("llvmpipe: initial query buffer object support. (v2)")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11946 >
2021-07-22 09:17:05 +00:00
Daniel Stone
d8bfad70dc
Revert "CI: Disable LAVA devices"
...
This reverts commit 1f4ff4ed2e .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12016 >
2021-07-22 08:42:40 +01:00
Mike Blumenkrantz
e42bb25ee2
zink: fix cached descriptor allocation clamping
...
the number of allocated sets should be directly compared to the maximum
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11690 >
2021-07-21 21:25:18 -04:00
Mike Blumenkrantz
8db2d53418
zink: improve lazy descriptor pool handling
...
do set allocation when getting pool, queue filled pools for delete
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11690 >
2021-07-21 21:25:18 -04:00
Mike Blumenkrantz
849c520887
zink: add define for descriptor alloc clamping
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11690 >
2021-07-21 21:25:18 -04:00
Mike Blumenkrantz
559e009af1
zink: clamp descriptor allocation bucket sizing to defined limit
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11690 >
2021-07-21 21:25:18 -04:00
Mike Blumenkrantz
2736bf4e17
zink: split mem cache per type
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11966 >
2021-07-22 00:32:50 +00:00
Mike Blumenkrantz
7aca74e219
zink: inline mem cache hash table
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11966 >
2021-07-22 00:32:50 +00:00
Mike Blumenkrantz
fdfa155f2b
zink: move mem cache to sub-struct
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11966 >
2021-07-22 00:32:50 +00:00
Mike Blumenkrantz
d8905446d6
zink: rework oom flushing
...
tracking mem usage on the context is bad because if an app is always using
a large amount of memory across multiple batches, it triggers the oom flushes
on every flush and forces fencing
instead, add an explicit flag for oom flushing and another for stalling, then
flag oom flushing and stalling as needed, with set_framebuffer_state being an
additional flush point now since it's guaranteed not to split renderpasses
also proactively prune pending batch states if there's a lot of them
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11965 >
2021-07-22 00:22:24 +00:00
Mike Blumenkrantz
0dc77c8aa5
zink: add a param to check_batch_completion for toggling lock-taking
...
need this to avoid deadlocks
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11965 >
2021-07-22 00:22:24 +00:00
Mike Blumenkrantz
e7f958d841
zink: use a local var for draw mode during draw
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11965 >
2021-07-22 00:22:24 +00:00
Mike Blumenkrantz
10e7cb5888
zink: make batch_rp and norp static inlines
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11965 >
2021-07-22 00:22:24 +00:00
Mike Blumenkrantz
2795537d5c
zink: make zink_end_render_pass public
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11965 >
2021-07-22 00:22:24 +00:00
Mike Blumenkrantz
1ffe73c71a
zink: split draw_count checking to local variable
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11965 >
2021-07-22 00:22:24 +00:00
Mike Blumenkrantz
49ee703e11
zink: split and move maybe_flush_or_stall mechanic
...
the batch state counting belongs in the flush call, and draws/computes
should each just check their counts and flush directly
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11965 >
2021-07-22 00:22:24 +00:00
Mike Blumenkrantz
9823b970fb
zink: handle vertex buffer offset overflows
...
there's a screen limit for vertex buffer offsets (???), so if a buffer
is going to overflow that limit, just rebind it as a new tmp buffer and
clamp the offset to 0
this also applies to buffer rebinds
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11836 >
2021-07-22 00:04:58 +00:00
Mike Blumenkrantz
d5dd1259c5
zink: change vbo_bind_count to a mask of slots
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11836 >
2021-07-22 00:04:58 +00:00
Mike Blumenkrantz
ba3c4ce385
zink: add mechanism for generating VkBuffers for rebinding
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11836 >
2021-07-22 00:04:58 +00:00
Chia-I Wu
47946855f1
meson: allow egl_native_platform to be specified
...
After commit f8dc22bf61 , it was no longer possible to have explicitly
enabled platforms with surfaceless being the EGL native platform. This
fixes that by adding -Degl-native-platform.
Fixes: f8dc22bf61 ("meson: drop deprecated EGL platform build options")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11992 >
2021-07-21 23:12:58 +00:00
Chia-I Wu
384181921c
egl/surfaceless: try kms_swrast before swrast
...
Before commit f7e0cdcf1a , we tried these in order
- if (!ForceSoftware) surfaceless_probe_device(disp, false);
- surfaceless_probe_device(disp, true);
- surfaceless_probe_device_sw(disp);
The commit changed it to
- surfaceless_probe_device(disp, ForceSoftware);
- surfaceless_probe_device_sw(disp);
and broke 2D virtio-gpu and vgem when ForceSoftware is false. This
commit restores the old behavior.
Fixes: f7e0cdcf1a ("egl/surfaceless: simplify dri2_initialize_surfaceless()")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11992 >
2021-07-21 23:12:58 +00:00
Roland Scheidegger
43ccc6c091
llvmpipe: always use draw_regions intersection
...
This was still used in the linear branch, since it works all a little
differently there (in particular, when using guard band we have to
intersect the draw regions with the viewport, since draw won't clip
for us). However, we should always intersect with draw_regions
(regardless if that includes the intersection with vp or not), since
the viewport can be larger than the fb size, and we don't want to
draw outside the fb (usually harmless, but important for occlusion
queries and shader image/buffer writes).
This fixes various dEQP-GLES31.functional.fbo.no_attachments failures
(which uses oversized viewport with occlusion queries).
The other ci changes aren't really bugs (the humus/Portals image
looks the same, we cannot expect bit-identical results, and
for the piglit quad-invariance test, I think we merely passed it
by accident since our interpolation may give different results
depending on where on the screen a tri is regardless of linear
rasterizer).
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11969 >
2021-07-21 23:08:26 +02:00
Roland Scheidegger
ba7fd5b561
llvmpipe/linear: don't try to use tgsi analysis for nir shaders
...
Even though it's probably harmless, we shouldn't try it, so just skip it,
eventually need to hook in nir analysis there.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11969 >
2021-07-21 22:40:18 +02:00
Dave Airlie
f90b6c875a
llvmpipe: add some extra linear rast checks.
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11969 >
2021-07-21 22:40:18 +02:00
Dave Airlie
fd9cc1d007
llvmpipe/linear: fix ppc64/s390 build
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11969 >
2021-07-21 22:40:18 +02:00
Jose Fonseca
5a1d3bcf26
llvmpipe: Add a linear rasterizer optimized for 2D rendering.
...
This change adds:
- an alternative rasterizer, which rasterizes bins in a left->right &
top->bottom linear fashion;
- triangle -> rectangle detection;
- 1:1 blit detection;
- a special TGSI -> LLVM IR code generation that uses 8-bit SSE integers
in AoS fashion (as opposed to 32bits floats.)
Altogether these changes yield a 2x to 3x performance improvement for 2D
workloads. It was designed to render Windows 7 Aero and other Windows
built-in 3D applications (like Windows Media Player, Internet Explorer
11, UWP applications) with minimum CPU utilization, but it should be
generally applicable to other 2D-on-3D applications, like desktop
compositors, HTML browsers, 3D based UI toolkits, etc.
This was mostly the brainchild of Keith Whitwell back in 2010. I wrote
TGSI -> AoS translation. And many others added bug-fixes and
enhancements over the years: Roland Scheidegger, Brian Paul, and James
Benton.
Known issues:
- piglit spec@!opengl 1.1@quad-invariance will warn that "left and right
half should match" due to rounding error difference
- These optimized paths to kick in is that depth-buffer must not be
used, so some applications which want to benefit from these improvements
might need to be modified to ensure they use painter's algorithm instead
of depth-buffers.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Brian Paul <brianp@vmware.com >
Acked-by: Keith Whitwell <keithw@vmware.com >
v2: Incorporate Dave Airlie feedback: cleanup LP_DEBUG_xx; shrink 3+
empty lines.
v3: silence unused var warning, adapt to new upstream code (point setup)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11969 >
2021-07-21 22:40:18 +02:00
Caio Marcelo de Oliveira Filho
4dc81cc631
anv: Advertise support for VK_EXT_shader_atomic_float2
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11981 >
2021-07-21 20:15:21 +00:00
Caio Marcelo de Oliveira Filho
a3e53495a9
vulkan: Update XML and headers to 1.2.185
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11981 >
2021-07-21 20:15:21 +00:00
Caio Marcelo de Oliveira Filho
baefdceeaf
spirv: Implement SPV_EXT_shader_atomic_float16_add
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11981 >
2021-07-21 20:15:21 +00:00
Jordan Justen
8c29891fa4
intel/compiler: Remove cube array size lowering in compiler backend
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9466 >
2021-07-21 11:34:49 -07:00
Jordan Justen
e2a30ebf44
intel/compiler: Lower cube image sizes using nir_lower_image()
...
Reworks:
* Re-merge early/late passes using Jason's nir image deref patches
* Create and use a common nir_lower_image() pass. (s-b Jason)
* Remove cube array size handling in image load/store lowering
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9466 >
2021-07-21 11:34:49 -07:00
Jordan Justen
b5514a2236
intel/compiler: Rename brw_nir_lower_image_load_store to brw_nir_lower_storage_image
...
Reworks:
* Add crocus
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9466 >
2021-07-21 11:02:15 -07:00
Jordan Justen
6898549d56
nir: Add nir_lower_image() to lower cube image sizes
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9466 >
2021-07-21 11:02:15 -07:00
Felix DeGrood
27534a49cf
iris: add tile cache flush to iris_copy_region
...
Add tile cache flush on iris_copy_region(). Temp workaround
until more robust tracking system implemented.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5029
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11935 >
2021-07-21 17:28:41 +00:00
Jason Ekstrand
b0fba89cf6
nir/lower_subgroups: Handle down-casts in uint_to_ballot_type
...
This is required for Zink where the API ballot type is a uint64_t and
the "hardware" ballot type is uvec4.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11989 >
2021-07-21 16:41:56 +00:00
Daniel Stone
7b8bb81e82
CI: Disable LAVA devices
...
We've had a physical machine death, and the restore/transfer is achingly
slow at the moment. Some of the devices are still fine, but
conservatively just kill the lot until it's all recovered.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11997 >
2021-07-21 17:26:43 +01:00
Timothy Arceri
9f3fde6f36
intel/compiler: Use GCM in nir_optimize
...
There is still some work to do before we can enable GVN.
In these shader-db results, Skylake and older platforms used i965 while
newer platforms used Iris. I believe this accounts for the difference
in "sends." The shaders helped for sends are all Synmark shaders.
On Sandybridge, the shaders helped for sends were the same ones hurt for
spills and fills. These are also all Synmark shaders.
Tiger Lake and Ice Lake had similar results. (Ice Lake shown)
total instructions in shared programs: 19868594 -> 19868452 (<.01%)
instructions in affected programs: 6607 -> 6465 (-2.15%)
helped: 12
HURT: 1
helped stats (abs) min: 12 max: 12 x̄: 12.00 x̃: 12
helped stats (rel) min: 1.94% max: 2.62% x̄: 2.38% x̃: 2.58%
HURT stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel) min: 0.45% max: 0.45% x̄: 0.45% x̃: 0.45%
95% mean confidence interval for instructions value: -13.27 -8.58
95% mean confidence interval for instructions %-change: -2.67% -1.65%
Instructions are helped.
total cycles in shared programs: 962404540 -> 962008224 (-0.04%)
cycles in affected programs: 961274 -> 564958 (-41.23%)
helped: 23
HURT: 1
helped stats (abs) min: 10 max: 32536 x̄: 17438.96 x̃: 23658
helped stats (rel) min: 0.02% max: 80.04% x̄: 42.05% x̃: 51.58%
HURT stats (abs) min: 4780 max: 4780 x̄: 4780.00 x̃: 4780
HURT stats (rel) min: 3.26% max: 3.26% x̄: 3.26% x̃: 3.26%
95% mean confidence interval for cycles value: -22989.90 -10036.43
95% mean confidence interval for cycles %-change: -55.01% -25.32%
Cycles are helped.
Skylake and Broadwell had simliar results. (Skylake shown)
total instructions in shared programs: 17996652 -> 17996154 (<.01%)
instructions in affected programs: 96622 -> 96124 (-0.52%)
helped: 85
HURT: 0
helped stats (abs) min: 1 max: 12 x̄: 5.86 x̃: 5
helped stats (rel) min: 0.39% max: 2.65% x̄: 0.68% x̃: 0.39%
95% mean confidence interval for instructions value: -6.42 -5.30
95% mean confidence interval for instructions %-change: -0.84% -0.52%
Instructions are helped.
total cycles in shared programs: 939899189 -> 939289732 (-0.06%)
cycles in affected programs: 3719430 -> 3109973 (-16.39%)
helped: 60
HURT: 39
helped stats (abs) min: 18 max: 32444 x̄: 10437.30 x̃: 6940
helped stats (rel) min: 0.08% max: 80.40% x̄: 23.99% x̃: 12.07%
HURT stats (abs) min: 10 max: 4970 x̄: 430.28 x̃: 323
HURT stats (rel) min: 0.05% max: 3.41% x̄: 1.55% x̃: 1.60%
95% mean confidence interval for cycles value: -8095.51 -4216.75
95% mean confidence interval for cycles %-change: -18.65% -9.21%
Cycles are helped.
total sends in shared programs: 1026997 -> 1026927 (<.01%)
sends in affected programs: 6090 -> 6020 (-1.15%)
helped: 70
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 1.15% max: 1.15% x̄: 1.15% x̃: 1.15%
95% mean confidence interval for sends value: -1.00 -1.00
95% mean confidence interval for sends %-change: -1.15% -1.15%
Sends are helped.
Haswell and Ivy Bridge had similar results. (Haswell shown)
total instructions in shared programs: 16040891 -> 16040252 (<.01%)
instructions in affected programs: 109132 -> 108493 (-0.59%)
helped: 87
HURT: 0
helped stats (abs) min: 1 max: 12 x̄: 7.34 x̃: 7
helped stats (rel) min: 0.05% max: 2.61% x̄: 0.75% x̃: 0.51%
95% mean confidence interval for instructions value: -7.84 -6.85
95% mean confidence interval for instructions %-change: -0.90% -0.61%
Instructions are helped.
total cycles in shared programs: 968579567 -> 967867117 (-0.07%)
cycles in affected programs: 30688439 -> 29975989 (-2.32%)
helped: 241
HURT: 62
helped stats (abs) min: 4 max: 31929 x̄: 3901.22 x̃: 2282
helped stats (rel) min: 0.04% max: 79.63% x̄: 12.70% x̃: 4.44%
HURT stats (abs) min: 4 max: 8230 x̄: 3673.27 x̃: 637
HURT stats (rel) min: 0.01% max: 63.87% x̄: 24.54% x̃: 3.56%
95% mean confidence interval for cycles value: -3100.23 -1602.41
95% mean confidence interval for cycles %-change: -7.94% -2.22%
Cycles are helped.
total sends in shared programs: 935025 -> 934955 (<.01%)
sends in affected programs: 6090 -> 6020 (-1.15%)
helped: 70
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 1.15% max: 1.15% x̄: 1.15% x̃: 1.15%
95% mean confidence interval for sends value: -1.00 -1.00
95% mean confidence interval for sends %-change: -1.15% -1.15%
Sends are helped.
LOST: 1
GAINED: 0
Sandy Bridge
total instructions in shared programs: 11785330 -> 11786504 (<.01%)
instructions in affected programs: 53462 -> 54636 (2.20%)
helped: 16
HURT: 36
helped stats (abs) min: 1 max: 17 x̄: 10.06 x̃: 9
helped stats (rel) min: 0.47% max: 3.29% x̄: 2.03% x̃: 1.90%
HURT stats (abs) min: 5 max: 38 x̄: 37.08 x̃: 38
HURT stats (rel) min: 1.77% max: 2.98% x̄: 2.94% x̃: 2.98%
95% mean confidence interval for instructions value: 16.26 28.90
95% mean confidence interval for instructions %-change: 0.75% 2.08%
Instructions are HURT.
total cycles in shared programs: 498009911 -> 497378300 (-0.13%)
cycles in affected programs: 6848277 -> 6216666 (-9.22%)
helped: 108
HURT: 28
helped stats (abs) min: 4 max: 25394 x̄: 6037.42 x̃: 766
helped stats (rel) min: 0.02% max: 60.58% x̄: 11.60% x̃: 4.83%
HURT stats (abs) min: 96 max: 6834 x̄: 729.64 x̃: 742
HURT stats (rel) min: 0.17% max: 16.23% x̄: 1.57% x̃: 1.55%
95% mean confidence interval for cycles value: -5907.99 -3380.40
95% mean confidence interval for cycles %-change: -11.67% -6.11%
Cycles are helped.
total spills in shared programs: 2316 -> 2526 (9.07%)
spills in affected programs: 280 -> 490 (75.00%)
helped: 0
HURT: 35
total fills in shared programs: 1540 -> 1750 (13.64%)
fills in affected programs: 280 -> 490 (75.00%)
helped: 0
HURT: 35
total sends in shared programs: 642985 -> 642950 (<.01%)
sends in affected programs: 3045 -> 3010 (-1.15%)
helped: 35
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 1.15% max: 1.15% x̄: 1.15% x̃: 1.15%
95% mean confidence interval for sends value: -1.00 -1.00
95% mean confidence interval for sends %-change: -1.15% -1.15%
Sends are helped.
LOST: 1
GAINED: 0
Iron Lake and GM45 had similar results. (Iron Lake shown)
total cycles in shared programs: 239442382 -> 239429400 (<.01%)
cycles in affected programs: 20816 -> 7834 (-62.37%)
helped: 2
HURT: 0
In Fossil-db, all of the shaders hurt for spill and fills are compute
shaders from Shadow of the Tomb Raider. Two shaders were helped for
sends, and these are also from SotTR.
All of the shaders helped for loops were from Geekbench5. These all
went from 3 loops to 2.
Tiger Lake
Instructions in all programs: 160852396 -> 160855303 (+0.0%)
SENDs in all programs: 6878559 -> 6878559 (+0.0%)
Loops in all programs: 38350 -> 38305 (-0.1%)
Cycles in all programs: 7369162339 -> 7344236445 (-0.3%)
Spills in all programs: 193762 -> 193876 (+0.1%)
Fills in all programs: 306417 -> 306600 (+0.1%)
Ice Lake
Instructions in all programs: 144592523 -> 144593946 (+0.0%)
SENDs in all programs: 6930697 -> 6930697 (+0.0%)
Loops in all programs: 38344 -> 38299 (-0.1%)
Cycles in all programs: 8732456458 -> 8707823383 (-0.3%)
Spills in all programs: 216692 -> 216806 (+0.1%)
Fills in all programs: 334089 -> 334272 (+0.1%)
Skylake
Instructions in all programs: 135618746 -> 135619971 (+0.0%)
SENDs in all programs: 6896728 -> 6896724 (-0.0%)
Loops in all programs: 38343 -> 38298 (-0.1%)
Cycles in all programs: 8391957144 -> 8368935657 (-0.3%)
Spills in all programs: 194741 -> 194879 (+0.1%)
Fills in all programs: 301048 -> 301255 (+0.1%)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/597 >
2021-07-21 14:24:00 +00:00
Timothy Arceri
c742a99fb6
intel/compiler: call nir_opt_dead_cf() after we have finished all opts
...
This will avoid a regression with the following patch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/597 >
2021-07-21 14:24:00 +00:00
Timothy Arceri
5cc36887ab
nir/gcm: be less destructive with instruction order
...
This changes the pass to extract pinned instructions and not just unpinned
instructions when rescheduling instructions. This stops pinned instructions
from being bunched together when instructions are reinserted into the blocks
which can result in regressions with regards to cycles and instruction
counts on i965 and register use/Max Waves on AMD hardware.
In order to do this we also throw away the post-order depth-first
search linearization algorithm used to re-insert the instructions, which
itself causes possible regressions when instructions are reinserted into
a less than ideal new order (of which the bunched together pinned
instructions is one example). Instead we simply insert instructions in the
reverse order they were extracted. This will simply place instructions
that were scheduled earlier onto the end of their new block and
instructions that were scheduled later to the start of their new block.
With this everything should remain in order without the need to run
over uses.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/597 >
2021-07-21 14:24:00 +00:00
Ian Romanick
436668874a
nir/gcm: Clear out pass_flags before starting
...
With this pass enabled in Intel drivers, running shader-db on
shaders/unity/38.shader_test resulted in
Program received signal SIGSEGV, Segmentation fault.
gcm_schedule_early_src (src=0x555555d45348, void_state=0x7fffffffba40) at ../../SOURCE/master/src/compiler/nir/nir_opt_gcm.c:297
297 if (info->early_block->index < src_info->early_block->index)
(gdb) print src_info->early_block
$1 = (nir_block *) 0x0
I tracked this down to an early exit from gcm_schedule_early_instr on
the parent instruction because instr->pass_flags was 0x1c. That
should be an impossible value for this pass, so I inferred that
pass_flags must have dirt left from some previous pass.
Fixes: 8dfe6f672f ("nir/GCM: Use pass_flags instead of bitsets for tracking visited/pinned")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/597 >
2021-07-21 14:24:00 +00:00
Mike Blumenkrantz
3ab74d0ffa
nir: add nir_imm_ivec3 builder
...
the other ones exist, so why not this one too
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11983 >
2021-07-21 13:57:14 +00:00
Daniel Schürmann
1d8e9430d2
aco: include <cstddef> in aco_util.h
...
It's needed for ptrdiff.
Fixes: 59fdaa1985 ('aco: reorder and cleanup #includes')
Closes : #5076
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11947 >
2021-07-21 13:37:00 +00:00
suijingfeng
7c81a9d56f
gallivm: fix pass init order on mips64 with llvm 8
...
llvm 8 has some missing pass dependencies, fix the mips64 case
as well.
See similiar fix:
[1] f59ff014b1
[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3805
Reviewed-by: Adam Jackson <ajax@redhat.com >
Signed-off-by: suijingfeng <suijingfeng@loongson.cn >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11955 >
2021-07-21 13:14:05 +00:00
suijingfeng
2f07c675b9
pass egl-symbols-check test on mips64el
...
Without this patch the egl symbols check test fail on mips platform:
72/87 mesa:egl / egl-symbols-check FAIL 0.20s (exit status 1)
src/egl/libEGL.so.1.0.0: unknown symbol exported: _fbss
src/egl/libEGL.so.1.0.0: unknown symbol exported: _fdata
src/egl/libEGL.so.1.0.0: unknown symbol exported: _ftext
See Mips Run say thoes special symbols are automatically defined by the
linker to allow programs to discover the start and end of their various
section. They are descended from conventions that grew up in UNIX-like OSs,
and are peculiar to the MIPS environment.
_fbss : Start of uninitialized data segment
_fdata : Start of initialized data segment
_ftext : Start of text segment
Reviewed-by: Adam Jackson <ajax@redhat.com >
Signed-off-by: suijingfeng <suijingfeng@loongson.cn >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11955 >
2021-07-21 13:14:05 +00:00
suijingfeng
88b234d7a7
gallivm: add basic mips64 support and set mcpu to mips64r5 on ls3a4000
...
ls3a4000 and ls2k1000 cpu is mips64r5 compatible with MSA SIMD
instruction set implemented, while ls3a3000 is mips64r2 compatible only.
Due to lacking llvm support for loongson CPU, llvm::sys::getHostCPUName().
return "generic" on all loongson mips CPU.
So we override the MCPU to mips64r5 if MSA is implemented, feedback to
mips64r2 for all other ordinaries.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Signed-off-by: suijingfeng <suijingfeng@loongson.cn >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11955 >
2021-07-21 13:14:05 +00:00
Daniel Stone
6455ab6e5a
egl/wayland: Allow EGLSurface to outlive wl_egl_window
...
According to the EGL spec, it is entirely valid for an EGLSurface to
outlive the native_window it was created from, provided that SwapBuffers
and MakeCurrent return EGL_BAD_NATIVE_WINDOW.
We don't have any facility to error on MakeCurrent, so just make sure we
can bundle on safely through rendering for now, then return
EGL_BAD_NATIVE_WINDOW from SwapBuffers.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2251
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4902
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11979 >
2021-07-21 12:13:25 +00:00
Daniel Stone
0e2464d26b
egl/wayland: Error on invalid native window
...
We unconditionally require a wl_egl_window to be passed as the native
window type, and do not permit a default window. The spec requires us to
return EGL_BAD_NATIVE_WINDOW when doing this, rather than crashing.
Further, if an EGLSurface has already been created for an existing
native window, we are required to return EGL_BAD_ALLOC.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2251
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4902
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11979 >
2021-07-21 12:13:25 +00:00
Daniel Schürmann
3870c52159
aco/ra: don't allocate vector space for MIMG NSA operands
...
In this case, the MIMG vaddr components are not vector-aligned anymore, anyway.
Totals from 11866 (7.90% of 150170) affected shaders: (GFX10.3)
VGPRs: 733064 -> 728408 (-0.64%); split: -0.66%, +0.02%
CodeSize: 67968356 -> 67968440 (+0.00%); split: -0.02%, +0.02%
MaxWaves: 214022 -> 214014 (-0.00%)
Instrs: 12798200 -> 12797232 (-0.01%); split: -0.02%, +0.01%
Latency: 196427665 -> 196418706 (-0.00%); split: -0.02%, +0.01%
InvThroughput: 37082037 -> 37080799 (-0.00%); split: -0.02%, +0.02%
VClause: 246097 -> 246031 (-0.03%); split: -0.16%, +0.13%
Copies: 494852 -> 493923 (-0.19%); split: -0.52%, +0.34%
Branches: 220323 -> 220294 (-0.01%); split: -0.03%, +0.02%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11980 >
2021-07-21 09:38:15 +00:00
Marcin Ślusarz
8250f2ae29
anv: share some code between vkCmdDrawIndirectCount and vkCmdDrawIndexedIndirectCount
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11975 >
2021-07-21 09:23:15 +00:00
Juan A. Suarez Romero
dcfc4bb89a
ci/v3dv: update expected results
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11970 >
2021-07-21 09:07:52 +00:00
Marcin Ślusarz
b6843d990b
intel/tools/aubinator_error_decode: tag hanging instruction
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11957 >
2021-07-21 08:20:06 +00:00
Corentin Noël
18fa820506
ci: actually run piglit tests with virgl
...
Make sure that the host is using llvmpipe while the guest is using virgl as driver.
Note that the neverball/neverball.trace trace actually regressed in a way that the
foreground is missing.
Fixes: f1b952fa ("ci: Run tests inside Crosvm")
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11986 >
2021-07-21 09:36:10 +02:00
Iago Toral Quiroga
2608ee4031
v3dv: fix I/O lowering for GS
...
Fixes 9e7d9a6ef ('v3dv: add support for geometry shaders to pipelines')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11977 >
2021-07-21 05:44:31 +00:00
Dave Airlie
8c6196e7e8
crocus/gen4-5: fix ff gs emit on VS vue map change.
...
This should fix some texturing problems seen on gen4/5, I reproduced it
with a minecraft.trace file
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11993 >
2021-07-21 14:56:26 +10:00
Dave Airlie
74245ca037
docs: update anisotropic info for softpipe/llvmpipe/lavapipe
...
both drivers have proper implementations
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
a54cd0a83e
llvmpipe/virgl/ci: update traces for aniso
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Mike Blumenkrantz
1769ce3404
lavapipe: add support for anisotropic texturing
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
0d4d7594d1
llvmpipe: enable GL_ARB_texture_filter_anisotropic
...
Update checksums as images are same as softpipe.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
0bb23ed6db
draw: add sampler max_aniso query.
...
Add support for draw shaders for retrieve max anisotropy.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
9cfcf3783b
llvmpipe: add support for max aniso query.
...
This just joins the sampler code to the llvmpipe shader stages.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
ce2b711c0a
gallivm: add support for anisotropic sampling.
...
This is a port of the softpipe anisotropic filtering
to llvmpipe. It should produce pretty similiar results.
This contains the proposed fix to the softpipe calculating
dq after scaling.
It also contains a number of other fixes around vector lengths
etc caught during test.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
a672f9ebf0
llvmpipe: add filter table shader accessor
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
4366a77dae
draw: add shader access to aniso filter table.
...
This allows the draw shaders to access the global filter table
vis the context ptr.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Dave Airlie
848d4e7e43
gallivm: add anisotropic filter weight table.
...
The anisotropic filtering needs access to a table of weights,
to make the calculations easier. This routes the table
through from shader parameter and makes it available for the
sampler code.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804 >
2021-07-21 10:19:51 +10:00
Mike Blumenkrantz
3a3748d999
gallium: add pipe_sampler_state::pad member
...
when zeroing the struct without memset, this needs to be zeroed to avoid
garbage data in the padding
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11886 >
2021-07-20 23:41:50 +00:00
Jason Ekstrand
393ee837fb
nir: Add a format field to _deref image intrinsics
...
The rules here are the same as for texture instructions. The bits on
the intrinsic are the ground truth and are allowed to vary from the
deref a bit as-needed. If the intrinsic says PIPE_FORMAT_NONE, then we
can look at the variable, if visible, to get format information. This
means that we need to be careful when we rewrite intrinsics based on the
deref to only override the format from the _deref intrinsic from the
image variable unless the intrinsic is PIPE_FORMAT_NONE.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11849 >
2021-07-20 23:18:22 +00:00
Jason Ekstrand
0b57272af8
nir: Set src_components = -1 for image intrinsic deref sources
...
Semantically, -1 means "Unknown; don't validate" but it's really only
used for derefs because they often need to be flexible. We don't really
need that flexibility for image intrinsics but this makes it more
consistent. More immediately useful is that this gives us the ability
to tell _deref forms of these intrinsics apart from the lowered ones.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11849 >
2021-07-20 23:18:22 +00:00
Jason Ekstrand
c0afb60258
nir: Set IMAGE_DIM and IMAGE_ARRAY on deref intrinsics
...
The rules here are the same as for texture instructions. The bits on
the intrinsic are the ground truth and are allowed to vary from the
deref a bit as-needed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11849 >
2021-07-20 23:18:22 +00:00
Jason Ekstrand
ea7fcd5a97
glsl/nir: Use nir_ssa_undef() from nir_builder
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11849 >
2021-07-20 23:18:22 +00:00
Iván Briano
0b9562a94a
anv: Allow unused VkSpecializationMapEntries
...
Fixes future CTS: dEQP-VK.pipeline.spec_constant.*.basic.*unused_*
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11987 >
2021-07-20 21:42:50 +00:00
Neha Bhende
b5e782f5f4
aux/draw: use nir_to_tgsi for draw shader in llvm path
...
Some drivers doesn't support PIPE_SHADER_CAP_INTEGERS.
This leads to using load_ubo_vec4 which throws llvmpipe off the guard since
it doesn't expect load_ubo_vec4 in shader. Use nir_to_tgsi utility in
such a case.
This fixes crash seen with conform's mustpass.c, select.c and feedback.c.
Also, few gl-select related piglit tests exhibit same crash. Found in vmware's
internal testing
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
v2: incorporated Emma's comments. Added check for PIPE_SHADER_CAP_INTEGERS and
remove PIPE_SHADER_IR_TGSI check
v3: As per Emma's comment, removed expected crashes for i915 piglit
v4: update expetcted passes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11911 >
2021-07-20 19:05:30 +00:00
Michel Zou
4c36224f95
zink: Fix unused-variable warning
...
Fixes: 9b40fc48
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11920 >
2021-07-20 18:44:39 +00:00
Mike Blumenkrantz
50f9519ea5
nir/lower_point_size_mov: zero nir_state_slot::swizzle in new variable
...
this is otherwise uninitialized during nir_serialize calls
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11932 >
2021-07-20 16:34:51 +00:00
Mike Blumenkrantz
1132df843c
freedreno: use new tc util for setting bytes_mapped_limit
...
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
c3914bb2e8
zink: use new tc util for setting bytes_mapped_limit
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
01414d435c
radeonsi: use new tc util for setting bytes_mapped_limit
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
671d579b46
util/tc: add a util function for setting bytes_mapped_limit
...
tc drivers set this based on os_get_total_physical_memory()/divisor,
which is going to be totally wrong for 32bit processes and explode
the address space
this util function can be used to handle per-platform clamping
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
3db856689d
zink: add changed flag for blend states
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11968 >
2021-07-20 13:12:55 +00:00
Alejandro Piñeiro
df243d0094
broadcom: don't define internal BPP values twice
...
We have a "maximum bpp of all render targets" field for several
packets. For them we were defining manually the possible values. But
all the possible values are the ones defined at the already defined
type "Internal BPP". So in practice we were defining the possible BPP
values twice.
Also for those fields, sometimes we were using the "Internal BPP" type
and in some other cases we were not, so this commit also adds some
consistency.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11976 >
2021-07-20 12:06:56 +00:00
Juan A. Suarez Romero
dc40157888
broadcom/compiler: emit TMU flush before a jump
...
Like in the case of emitting a block, process pending TMU operations
before a jump is executed.
Fixes dEQP-VK.graphicsfuzz.stable-binarysearch-tree-nested-if-and-conditional.
Fixes: 197090a3fc ("broadcom/compiler: implement pipelining for general
TMU operations")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11971 >
2021-07-20 10:15:21 +00:00
Marek Olšák
54e1ec017d
st/mesa: always use PIPE_USAGE_STAGING for GL_MAP_READ_BIT usage
...
This fixes CPU read performance.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5091
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11974 >
2021-07-20 09:49:16 +00:00
Olivier Fourdan
5bfd1a7e19
radeonsi: Check aux_context on si_destroy_screen()
...
The function radeonsi_screen_create_impl() tries to create the
aux_context but doesn't actually check for the returned value from
si_create_context().
Then, on si_destroy_screen() the aux_context is used without actually
checking whether it's a thing or not.
As a result, if for any reason si_create_context() failed, we shall
crash in si_destroy_screen() with a NULL pointer dereference trying to
access ((struct si_context *)sscreen->aux_context)->log.
Simply check for aux_context not being NULL to avoid that crash.
Cc: mesa-stable
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11948 >
2021-07-20 09:15:47 +00:00
Pierre-Eric Pelloux-Prayer
8be61e8a9e
mesa: fix bindless uniform samplers update
...
According to the comment below some extra magic is needed
for bindless samplers, so don't do an early return in this
case.
Fixes: 736f1f70ab ("mesa: skip redundant uniform updates for glUniform")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4806
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11930 >
2021-07-20 08:06:44 +00:00
Daniel Schürmann
9b1a296172
aco/optimizer: ensure to not erase high bits when propagating packed constants
...
Packed constants with non-zero values in the high half
might have been propagated as 16 bit, dropping the high half.
Cc: mesa-stable
Closes : #5070
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11954 >
2021-07-20 07:48:39 +00:00
Dave Airlie
66213ab2de
clover/il: return IL only for spirv and correct length
...
This is specified as char[] and I don't think requires null termination,
Also we should only return IL based programs.
Fixes CTS spirv_new get_program_il
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11868 >
2021-07-20 00:38:39 +00:00
Mike Blumenkrantz
59e69e8ec5
zink: remove screen info stuff from draw templates
...
we can initialize templates that we never need to evaluate again at
runtime, cutting the overhead for all tempaltes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
9bafcde42f
zink: add a ctx flag for shader reading basevertex
...
less rare than drawid, but still not great across repeated draw calls
with all the derefs
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
37ee123063
zink: use drawid_offset directly during draw
...
this used to be worth making a local variable for, now it's not
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
405d45f009
zink: flatten descriptor_refs_dirty into BATCH_CHANGED template
...
that's all this is now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
96559e7418
zink: add a ctx flag for drawid reading
...
avoid needing so many derefs and a bitset to check this during draw
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
a3321f1b85
zink: don't rebind vertex buffers if pipeline changes
...
two pipelines could use the exact same vertex buffers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c6d268d1a0
zink: stop flagging pipeline dirty for line width changes
...
this is a dynamic state, it's already out of the pipeline hash
also don't store to ctx
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
eb3b758686
zink: split pipeline_changed to use template value separately
...
this enables template-based conditional jumps when possible to avoid
needing to evaluate the other conditions
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
b37a2c6ef2
zink: add template for starting new cmdbuf
...
this avoids reading/updating context changed flags
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c88ce85799
zink: if descriptor updating flushes, re-call draw/compute
...
ensure upcoming template is correct for now, but this will eventually
be refactored out
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
f2f1892e62
zink: make descriptors_update hook return a bool if a flush occurred
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c5ccc41ca5
zink: add draw template for dynamic state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
cfcc2ff03f
zink: start adding C++ draw templates
...
templated draw functions enable moving some checks/calculations/code
into template conditionals, which are resolved in advance of the draw call,
reducing draw overhead
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
15c7e3e922
zink: ifdef out some context prototypes/inlines for c++ compile
...
msvc HATES this one simple trick for successfully compiling code
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c4702204bc
zink: optimize shader recalc
...
now we only have to loop over the changed shaders that exist for the
program, and we can avoid a lot of hashing operations by reusing stored
hash values where possible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11962 >
2021-07-19 23:54:36 +00:00
Bas Nieuwenhuizen
785b4728cf
zink: set dedicated allocation when needed
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Mike Blumenkrantz
a8727ec856
zink: hook up VK_KHR_dedicated_allocation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Mike Blumenkrantz
e9516a4edd
zink: check for dedicated allocation requirements during image alloc
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Emma Anholt
bda26dfcfc
freedreno/ir3: Reduce choose_instr_dec() and _inc() overhead.
...
If you didn't have a freed+ready instruction, you'd redo the live_effect
and check_instr() logic multiple times per instr. Replace the multiple
loops in each function with a ranking that I think is more readable,
reducing the overhead in the process.
debugoptimized dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20
runtime goes from ~3.5s -> ~3.0s on my lazor. No shader-db change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11855 >
2021-07-19 23:16:54 +00:00
Mike Blumenkrantz
56dd1adf3b
features: VK_EXT_color_write_enable for lavapipe
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11961 >
2021-07-19 21:21:59 +00:00
Mike Blumenkrantz
578190c0fe
lavapipe: implement VK_EXT_color_write_enable
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11961 >
2021-07-19 21:21:59 +00:00
Mike Blumenkrantz
0115fab46b
lavapipe: add a padding member to rendering_state
...
I always forget where to steal bits from otherwise
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11961 >
2021-07-19 21:21:59 +00:00
Kenneth Graunke
a296cc2684
gallium: Remove dead pb_malloc_buffer_create function prototype
...
This was deleted by commit ec686a66db .
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11922 >
2021-07-19 13:15:54 -07:00
Dave Airlie
75aa8524ec
wl/shm: don't fetch formats if not requested.
...
This aligns the code with the drm format code
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11945 >
2021-07-20 05:03:04 +10:00
Jose Maria Casanova Crespo
fd5fa73e6c
v3d/driconf: Expose non-MSAA texture limits for mutter and gnome-shell
...
To enable dual 4k displays on mutter or gnome-shell under X11 we need to
expose the non-MSAA texture limit as we did for Xorg at 60a64f028d
("v3d: Use driconf to expose non-MSAA texture limits for Xorg.")
https://gitlab.gnome.org/GNOME/mutter/-/issues/1874
Cc: 21.1 21.2 mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11926 >
2021-07-19 11:56:45 +00:00
Karol Herbst
ff55412f40
nv50/ir/nir: fix smem size for GL
...
Originally I fixed the case where the nir itself has a shared mem size of
0, but the frontend (e.g. clover) set it to some other value.
But st/mesa sets the shared mem size on the state object as well and we
end up actually doubling the value in the driver as we set smemSize to the
value from the state object before calling into the compiler.
So just max the value instead.
Fixes the compute_shader.shared-max CTS test.
Fixes: dc667b1f19 ("nv50/ir/nir: fix smem size")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11047 >
2021-07-19 13:40:30 +02:00
Andreas Bergmeier
d6dd13a62e
v3dv: implement VK_EXT_physical_device_drm
...
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9320 >
2021-07-19 06:03:02 +00:00
M Henning
8413c57a3f
nouveau: Support nir_intrinsic_*_atomic_fadd
...
This fixes failures in piglit's nv_shader_atomic_float tests with
NV50_PROG_USE_NIR=1
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9866 >
2021-07-18 12:56:46 -04:00
Dave Airlie
57dcfb4e55
softpipe/aniso: move DDQ calculation to after scaling.
...
I've read the papers on EWA filters and it seems like the calculate
DDQ = 2 * A after the scaling of A happens. This seems to make
things less blurry and more like real aniso.
Fixes: 2135aba8 ("softpipe: Constify variables")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11917 >
2021-07-18 16:16:26 +10:00
Alyssa Rosenzweig
7de5293b89
pan/bi: Shrink live array to 8-bits
...
We only actually use 4-bits, so we could shrink again. But this by
itself means 1/2 the memory usage for liveness analysis and 1/2 the
copying/alloc/free.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
bbf2ef6b4a
pan/bi: Clean up liveness freeing
...
This is ralloc'd, kind of pointless.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
84e2e5f23c
pan/bi: Clean up useless casts
...
Left over from removing inheritance with sed instead of coccinelle.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
1fcea30295
pan/bi: Copy block bi_block
...
Gets rid of the silly inheritance everywhere, which has caused _far_
more problems in practice than it has fixed. It was an idea I tried
before the pandemic. It didn't work. I'm finally cleaning it up.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
a372368e22
pan/bi: Copy back bi_foreach_successor
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
8bee48a635
pan/bi: Copy back add_successor
...
Trying to get back independent block types.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
a667e1bb6d
pan/bi: Copy liveness routines back
...
We'll diverge shortly.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Timur Kristóf
55d57b828f
aco: Fix how p_elect interacts with optimizations.
...
Since p_elect doesn't have any operands, ACO's value numbering and/or
the pre-RA optimizer could currently recognize two p_elect instructions
in two different blocks as the same.
This patch adds exec as an operand to p_elect in order to achieve
correct behavior.
Fixes: e66f54e5c8
Closes : #5080
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11943 >
2021-07-18 00:48:06 +02:00
Timothy Arceri
749251391d
glsl: replace some C++ code with C
...
This replaces some new/delete uses with malloc/free.
This is more consistent with most of the other glsl IR code but
more importantly it allows the game "Battle Block Theater" to
start working on some mesa drivers. The game overrides new and
ends up throwing an assert and crashing when it sees this
function calling new [0].
Note: The game still crashes with radeonsi due to similar conflicts
with LLVM.
CC: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11907 >
2021-07-17 10:07:37 +00:00
Marek Olšák
ed57666a5c
mesa: fix incorrect comment in draw_gallium_multimode
...
Fixes: 4566383ae4 ("gallium: move pipe_draw_info::index_bias to pipe_draw_start_count_bias")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11939 >
2021-07-17 02:59:54 +00:00
Marek Olšák
73a03d12e9
mesa: remove unused drawid_offset parameter from DrawGalliumMultiMode
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11939 >
2021-07-17 02:59:54 +00:00
Marek Olšák
703279e6da
st/mesa: inline st_setup_arrays on MSVC too by adding a wrapper
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11939 >
2021-07-17 02:59:54 +00:00
Mike Blumenkrantz
2850db0a9e
util/foz: stop crashing on destroy if prepare hasn't been called
...
Fixes: eca6bb9540 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11931 >
2021-07-17 02:35:11 +00:00
Iván Briano
d27f7fa1b3
anv: fix feature/property/sizes reported for fragment shading rate
...
Fixes: 790ff1ceac ("anv: fixup physical device properties of fragment shading rate")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11897 >
2021-07-17 00:46:54 +00:00
Mike Blumenkrantz
8f0385c12c
util/tc: make clear calls async
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11864 >
2021-07-17 00:28:45 +00:00
Marek Olšák
1abc480b5a
radeonsi: document a missing synchronization for bindless textures
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11900 >
2021-07-16 23:08:00 +00:00
Yogesh mohan marimuthu
7f9b3a7098
radeonsi: set scratch_state dirty only if ctx->scratch_buffer allocated
...
if ctx->scratch_buffer is NULL, then no need to update SPI_TMPRING_SIZE
size register.
Signed-off-by: Yogesh mohan marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11900 >
2021-07-16 23:08:00 +00:00
Yogesh mohan marimuthu
be9ca62247
radeonsi: remove redundant setting scratch_state atom dirty
...
Whenever scratch buffer is allocated, current spi_tmpring_size and
previous spi_tmpring_size cannot be same and hence scratch_state will be
set dirty as part of "if (spi_tmpring_size != sctx->spi_tmpring_size)".
Removing redundant dirty bit sat while allocating scratch buffer.
Signed-off-by: Yogesh mohan marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11900 >
2021-07-16 23:08:00 +00:00
Marek Olšák
86ff5b7ddb
radeonsi: don't expose no-attachment MSAA 16x on all 1 RB chips due to issues
...
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11900 >
2021-07-16 23:08:00 +00:00
Mike Blumenkrantz
59e923e5a1
lavapipe: don't read line stipple info in pipeline creation if stipple is disabled
...
otherwise these values may be (harmlessly) garbage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11933 >
2021-07-16 22:13:49 +00:00
Eric Anholt
11f9ad9238
gallium/ttn: Add a debug flag for dumping the shaders.
...
Just like for ntt, it's nice to be able to dump the shader that assertion
failed on you.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11915 >
2021-07-16 21:55:12 +00:00
Emma Anholt
8c36022e0d
nir_to_tgsi: Fix image declarations.
...
We failed to translate the target type, which virgl needs for translation.
Also the read_only flag is for consts, shader inputs, and uniforms. The
access flag gives you the readonly qualifier.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11916 >
2021-07-16 21:35:31 +00:00
Jason Ekstrand
46cc332025
anv: Stop reference counting semaphores
...
The only reason we had to refcount semaphores was for the ancient
sync_file semaphores which we used for pre-syncobj kernels. Now that we
assume syncobj and that code is gone, we don't need reference counting
anymore either.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9777 >
2021-07-16 21:12:21 +00:00
Jason Ekstrand
d44ea09e61
anv: Drop unused sync_file and BO semaphore code
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9777 >
2021-07-16 21:12:21 +00:00
Jason Ekstrand
3b363d5b55
anv: Assume syncobj support
...
Sync object for i915 support has been in upstream Linux since 4.14 which
is 3.5 years old at this point and, as far as we can tell, it also
exists in all the ChromeOS kernels. Assuming it allows us to drop some
of our more gnarly synchronization fall-back paths.
At the time of merge, ChromeOS was on the following kernels:
- kernel 3.18: SKL
- kernel 4.4: BYT, KBL, APL
- Kernel 4.14: BDW, GLK
All of the pre-4.14 kernels have had syncobj support back-ported.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9777 >
2021-07-16 21:12:21 +00:00
Jason Ekstrand
a62973580b
intel/eu: Start validating LSC message descriptors
...
This is certainly not a full validation but it at least gets the
framework in place and validates one hard-to-find restriction.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11657 >
2021-07-16 17:25:48 +00:00
Sagar Ghuge
89b7a40212
intel/compiler: Enable has_iadd3 option on XeHP
...
shader-db result is inconclusive but doesn't harm to include it for
reference.
Shader-db result on XeHPG:
total instructions in shared programs: 1397405 -> 1397315 (<.01%)
instructions in affected programs: 88252 -> 88162 (-0.10%)
helped: 20
HURT: 7
helped stats (abs) min: 1 max: 18 x̄: 7.20 x̃: 7
helped stats (rel) min: 0.03% max: 2.20% x̄: 0.37% x̃: 0.23%
HURT stats (abs) min: 4 max: 23 x̄: 7.71 x̃: 4
HURT stats (rel) min: 0.10% max: 0.68% x̄: 0.22% x̃: 0.11%
95% mean confidence interval for instructions value: -6.81 0.14
95% mean confidence interval for instructions %-change: -0.42% -0.02%
Inconclusive result (value mean confidence interval includes 0).
total cycles in shared programs: 119924219 -> 119931868 (<.01%)
cycles in affected programs: 45029193 -> 45036842 (0.02%)
helped: 11
HURT: 16
helped stats (abs) min: 15 max: 5490 x̄: 1655.73 x̃: 140
helped stats (rel) min: <.01% max: 0.35% x̄: 0.11% x̃: <.01%
HURT stats (abs) min: 1 max: 2944 x̄: 1616.38 x̃: 1743
HURT stats (rel) min: <.01% max: 0.17% x̄: 0.09% x̃: 0.10%
95% mean confidence interval for cycles value: -606.11 1172.70
95% mean confidence interval for cycles %-change: -0.04% 0.07%
Inconclusive result (value mean confidence interval includes 0).
v2:
- Include shader-db result (Jason)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596 >
2021-07-16 15:59:56 +00:00
Sagar Ghuge
06ab737686
nir: Add optimizations for iadd3
...
This patch also adds has_iadd3 bit to give more control if backend
supports ternary add instruction or not.
v2:
- Add patterns in late optimization (Connor Abbott)
Suggested-by: Alyssa/Jason
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596 >
2021-07-16 15:59:56 +00:00
Sagar Ghuge
e6db2299a8
intel/compiler: Allow ternary add to promote source to immediate
...
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596 >
2021-07-16 15:59:56 +00:00
Sagar Ghuge
cde9ca616d
intel/compiler: Make decision based on source type instead of opcode
...
This patch restructure code a little bit to check if source can be
represented as immediate operand. This is a foundation for next patch
which add checks for integer operand as well.
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596 >
2021-07-16 15:59:56 +00:00
Sagar Ghuge
705285b9f4
intel/compiler: Add support for ternary add instruction on XeHP
...
v2:
- Re-arragne opcode in correct order (Matt Turner)
- Move ADD3 case closer to LRP (Jason)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596 >
2021-07-16 15:59:56 +00:00
Sagar Ghuge
e8dff256c0
nir: Add new opcode for ternary addition
...
v2:
- Make it 2src commutative (Connor Abbott)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596 >
2021-07-16 15:59:55 +00:00
Timur Kristóf
6e17931d21
radv: Use pre-computed viewport transform for NGG culling state.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11839 >
2021-07-16 15:22:46 +00:00
Mike Blumenkrantz
c9a478f1cd
radv: remove unused variable from radv_emit_viewport
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11839 >
2021-07-16 15:22:46 +00:00
Mike Blumenkrantz
a2ef92d7a5
radv: pre-calculate viewport transforms
...
this requires more storage in the viewport struct, but it avoids
the need to repeatedly calculate the same transform if e.g., a meta
operation occurs, which can save about 5% cpu in some cases
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11839 >
2021-07-16 15:22:46 +00:00
Mike Blumenkrantz
1e13cb1965
radv: merge si_write_viewport into radv_emit_viewport
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11839 >
2021-07-16 15:22:46 +00:00
Danylo Piliaiev
53d4485a02
freedreno: fix wrong tile aligment for 3 CCU gpu
...
Fixes: 78c8a8af80 "freedreno: Generate device-info tables at build time"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5060
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11928 >
2021-07-16 15:02:27 +00:00
Timur Kristóf
60c5abf685
aco: Remove s_and with exec when all lanes are active.
...
This helps NGG GS and culling shaders.
No Fossil DB changes without NGG culling.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11458 >
2021-07-16 14:31:54 +00:00
Timur Kristóf
e66f54e5c8
aco: Allow elect to take advantage of knowing when all lanes are active.
...
Implement elect using a pseudo-op which is lowered during the
insert_exec_mask pass. This makes it possible to emit a more
optimal sequence when the exec mask is constant.
Fossil DB results on Sienna Cichlid:
Totals from 211 (0.16% of 128647) affected shaders:
CodeSize: 2254356 -> 2240468 (-0.62%); split: -0.62%, +0.00%
Instrs: 438471 -> 434996 (-0.79%); split: -0.80%, +0.01%
Latency: 2717082 -> 2709400 (-0.28%); split: -0.28%, +0.00%
InvThroughput: 566987 -> 566342 (-0.11%); split: -0.11%, +0.00%
Copies: 40058 -> 40162 (+0.26%)
Branches: 31209 -> 31211 (+0.01%)
PreSGPRs: 9927 -> 10125 (+1.99%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11458 >
2021-07-16 14:31:54 +00:00
Timur Kristóf
b12318f26c
aco: Swap s_and operand order for ballot.
...
This allows our optimizer to recognize this and eliminate it when
it can prove that the s_and with exec is unneeded.
Fossil DB changes on Sienna Cichlid:
Totals from 1969 (1.53% of 128647) affected shaders:
CodeSize: 9468228 -> 9469348 (+0.01%); split: -0.00%, +0.01%
Instrs: 1773566 -> 1773581 (+0.00%); split: -0.01%, +0.01%
Latency: 19504042 -> 19503385 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 3617406 -> 3617333 (-0.00%)
Copies: 108998 -> 110592 (+1.46%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11458 >
2021-07-16 14:31:54 +00:00
Jason Ekstrand
f5008a48d3
intel/perf: Use intel_i915_query_flags instead of hand-rolling it
...
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11770 >
2021-07-16 14:19:20 +00:00
Jason Ekstrand
ba99d2a328
intel/dev: Use intel_i915_query_alloc in query_topology
...
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11770 >
2021-07-16 14:19:20 +00:00
Jason Ekstrand
3fa6b8d041
iris: Use intel_i915_query for meminfo
...
Error handling with DRM_IOCTL_I915_QUERY is tricky and we got it wrong
in one of the two calls here. Use the common helper instead. This also
fixes a theoretical bug where calloc() fails. While we're here, inline
iris_bufmgr_update_meminfo because we're not really benefiting from
having it separate anymore.
Fixes: e60114b2ae "iris/bufmgr: Query memory region info."
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11770 >
2021-07-16 14:19:20 +00:00
Jason Ekstrand
35ec1d9730
anv: Use intel_i915_query_alloc for memory regions
...
Error handling with DRM_IOCTL_I915_QUERY is tricky and we got it wrong
in one of the two calls here. Use the common helper instead. This also
fixes a theoretical bug where calloc() fails. While we're here, inline
anv_track_meminfo because we're not really benefiting from having it
separate anymore.
Fixes: 65e8d72bc1 "anv: Query memory region info"
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11770 >
2021-07-16 14:19:20 +00:00
Jason Ekstrand
ffdf4d7683
intel: Pull anv_i915_query into common code
...
We also add a helper which contains the standard query+alloc+query
pattern used by anv_gem_get_engine_info(). The caller is required to
free the pointer.
These are declared static inline not because we care about the
performance of these helpers but because we're going to use them in the
intel_device_info code and we don't want a link dependency.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11770 >
2021-07-16 14:19:20 +00:00
Jason Ekstrand
b664481ba9
anv: Handle errors properly in anv_i915_query
...
DRM_IOCTL_I915_QUERY is a multi-query. The most egregious errors are
returned via the usual ioctl error mechanism but there are also
per-query errors that are indicated by item.length < 0. We need to
handle those as well. While we're at it, scrape errno so we can return
a proper integer error.
Fixes: c0d07c838a "anv: Support i915 query (DRM_IOCTL_I915_QUERY)..."
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11770 >
2021-07-16 14:19:20 +00:00
Timur Kristóf
d07e5bde75
radv: Remove num_viewports from radv_skip_ngg_culling.
...
NGG culling is not compiled into shaders that can use multiple
viewports, so it's not necessary to check it here.
Fixes: 9a95f5487f
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11910 >
2021-07-16 13:00:36 +00:00
Timur Kristóf
aa24740370
radv: Don't compile NGG culling into shaders that write viewport index.
...
We don't support NGG culling with multiple viewports yet.
Fixes: f30e4351de
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11910 >
2021-07-16 13:00:36 +00:00
Jason Ekstrand
e56d5db341
iris: Re-emit MEDIA_VFE_STATE for variable group size shaders
...
It implicitly contains the number of threads via the CURBE allocation
size field.
Fixes: 33c61eb2f1 "iris: Implement ARB_compute_variable_group_size"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10640 >
2021-07-16 11:02:50 +00:00
Iago Toral Quiroga
d7e1c0ec2e
v3dv: don't emit frame setup more than once for multilayered framebuffers
...
We only need to do this once per job, not once per layer.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11923 >
2021-07-16 09:36:37 +00:00
Iago Toral Quiroga
51d0d83667
v3dv: don't overallocate tile state for meta TLB operations
...
Generally, all meta operations that are implemented via the TLB and
only involve tile load/store operations only need one layer worth
of tile state memory and a single frame setup pointing the binner
to that memory.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11923 >
2021-07-16 09:36:37 +00:00
Iago Toral Quiroga
7fcc518473
v3dv: allow limiting amount of tile state allocated
...
With multilayered framebuffer we want to allocate enough tile state for
all layers involved, so te binner can handle layered rendering where
a geometry shader is used to redirect primitives to specific layers by
writing to gl_Layer.
However, we may also have layered framebuffers in cases where layered
rendering won't be used. Typically this will happen for meta copy/clear
operations, where we setup multilayered framebuffers but then we just
load and/or store the tile buffer without ever rendering a primitive,
let alone use a geometry shader to do layered rendering. In these cases
we can reduce the amount of tile state allocated to a sigle layer.
This patch allows us to specify if we should allocate tile state for all
layers when we start a new frame. We will take advantage of this in
later patches targetting the meta copy/clear code paths.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11923 >
2021-07-16 09:36:37 +00:00
Iago Toral Quiroga
93e7534a66
v3dv: improve TLB layered image clears
...
Our meta image clearing code was emitting a job per layer to clear,
but we can emit a single job that packs multiple layer clears for
better performance. For this we just need to make sure we pass
the maximum layer we can emit to v3dv_job_start_frame so we
allocate sufficent tile state memory.
Actually, since this operation is TLB based and doesn't make use of
layered rendering, we could do with allocating less tile state
memory too. We will improve this for this and many others TLB meta
implementations in follow up patches.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11923 >
2021-07-16 09:36:37 +00:00
Iago Toral Quiroga
308041095c
v3dv: remove unused layer field from struct rcl_clear_info
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11923 >
2021-07-16 09:36:37 +00:00
Samuel Pitoiset
0b637919a8
radv: fix specifying the stencil layout for separate depth/stencil layouts
...
The Vulkan spec has been updated few months ago again and pNext is
always honored if present.
Found this with vkd3d-proton which implemented separate depth/stencil
layouts recently.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11903 >
2021-07-16 09:20:58 +02:00
Samuel Pitoiset
cadf2d63b7
radv: report APUs as discrete GPUs for Red Dead Redemption 2
...
On APUs, we fake heaps to simulate a dGPU setup because it seems to
have the maximum compatibility. Though, some applications like RDR2
still only looks at GTT if the driver reports an iGPU which means it
will only use 1/3rd of total memory available.
This is currently behind a drirc option because it might have
implications for other apps but we might want to extend this later
if everything is fine.
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11891 >
2021-07-16 07:01:45 +00:00
Samuel Pitoiset
7a1cc56e40
radv: fix bounds checking for zero vertex stride on GFX6-7
...
GFX6 and GFX10+ have similar logic.
This fixes test_zero_vertex_stride from vkd3d-proton on
Pitcairn (GFX6) and on Bonaire (GFX7).
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11904 >
2021-07-16 08:30:07 +02:00
Jason Ekstrand
0ee322acdb
nir: Better document the Boissinot algorithm in nir_from_ssa()
...
Reviewed-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8815 >
2021-07-16 06:19:25 +00:00
Jason Ekstrand
cb589ee394
intel/dev: Drop a bogus assert
...
In c24ba6cecb , I copied over the CHV thread count code from i965 and
ANV into common code. While at it, I added an assert that I thought
should be true based on the comments. It turns out to be invalid. Drop
it.
Fixes: c24ba6cecb "intel/dev: Handle CHV CS thread weirdness in..."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5072
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11918 >
2021-07-15 21:43:31 -05:00
Iván Briano
fce0027d91
anv: Unbreak wide lines on HSW/BDW
...
I knew there was a reason the limit was at ~8 and not rounded to it.
Fixes: 004fcfe698 ("anv: fix some multisample lines_wide CTS tests")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11914 >
2021-07-15 21:59:37 +00:00
Caio Marcelo de Oliveira Filho
dfcb47bcec
anv: Zero initialize pipeline structs
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11890 >
2021-07-15 21:34:53 +00:00
Caio Marcelo de Oliveira Filho
34aae6a1f2
vulkan/util: Add and use vk_multialloc_zalloc variants
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11890 >
2021-07-15 21:34:53 +00:00
Daniel Stone
49a7c92793
vulkan/wsi/wayland: Initialise wl_shm pointer in VkImage
...
We don't explicitly calloc the wsi_wl_image to zero; anything that's
expected to be valid needs to be explicitly initialised.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5063
Fixes: 6b36f35734 ("vulkan/wsi/wl: add wl_shm support for lavapipe.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Jan Beich <jbeich@freebsd.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11909 >
2021-07-15 21:57:30 +01:00
Daniel Stone
1061ebb6da
vulkan/wsi/wayland: Cosmetic alignment fix
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11909 >
2021-07-15 21:57:29 +01:00
Dave Airlie
b3d2642ca4
draw: handle resetting draw_id between instances.
...
If we have a multi draw then the draw_id needs to get reset
between each instance.
Fixes the rest of the VK CTS multidraw tests
Fixes: ce0b1f23c3 ("aux/draw: track increment_draw_id value from draw info")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11899 >
2021-07-16 05:41:25 +10:00
Dave Airlie
5447330a25
lavapipe: fix indexed multi draw draw_id increment
...
I cut-n-paste this badly from the non-indexed, and used the wrong
struct.
Fixes a bunch of multi-draw CTS
Fixes: cc8f7dbf2a ("lavapipe: fix multi-draw regression in shader parameters test")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11899 >
2021-07-16 05:41:12 +10:00
Emma Anholt
bb35195b73
nir: Validate after deserialization.
...
It's a particularly relevant place for NIR bugs to occur, and if you make
a mistake in this code it gets caught in your debug build in something
like mesa/st's call to nir_split_var_copies() during finalization, which is
rather misleading.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11860 >
2021-07-15 18:43:42 +00:00
Dylan Baker
f855b25fd0
docs: mark mesa 21.0 as done
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11326 >
2021-07-15 17:40:42 +00:00
Iván Briano
004fcfe698
anv: fix some multisample lines_wide CTS tests
...
We can use a better algorithm from ICL and onward by setting a chicken
bit, but prior to that we need to resort to disabling rectangular lines.
Since we don't support strictLines anyway, this shouldn't be a major
issue.
Closes #2833
Fixes dEQP-VK.rasterization.interpolation_multisample_*_bit.*lines_wide
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11672 >
2021-07-15 17:07:35 +00:00
Iván Briano
f40a08d25c
anv: Don't advertise unsupported shader stages
...
We don't currently support mesh or ray tracing, so don't advertise their
shader stages as supported for subgroups.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11893 >
2021-07-15 16:32:54 +00:00
Timur Kristóf
19c8283729
radv: Use 128-sized vertex grouping for NGG shaders.
...
This matches what RadeonSI also does.
It seems to improve performance especially with NGG culling shaders.
Eg. in Doom Eternal this gives me +5ish fps.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11810 >
2021-07-15 16:13:04 +00:00
Adam Jackson
17e62a3c23
mesa: (correctly) flush more in _mesa_make_current
...
The code being removed here requires that the old context have a
window-system drawable bound to the default framebuffer as a condition
of the context-release flush. I can find no justification for
restricting flushes to contexts like this, and GL 3.0 (etc) let you make
a context current without any drawable bound.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11423 >
2021-07-15 15:10:17 +00:00
Adam Jackson
34342cce89
glx/drisw: Nerf PutImage when loaderPrivate == NULL
...
This means the drawable was already destroyed. This can happen during
diplay teardown, destroying the context will make it current first so it
can flush rendering and destroy textures and such, and if the drawable
is already destroyed then flushing to nowhere would crash.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11423 >
2021-07-15 15:10:17 +00:00
Vinson Lee
f5c8761eda
asahi: Move assignment after null check.
...
Fix defect reported by Coverity Scan.
Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking so suggests that it may be null,
but it has already been dereferenced on all paths leading to the
check.
Fixes: dcd2d8ca50 ("asahi: Track more Gallium state")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11898 >
2021-07-15 13:45:33 +00:00
Jose Maria Casanova Crespo
8351ad1719
Revert "ci: disable Broadcom CI"
...
Our POE switch rebooted with factory settings. So devices weren't turning
on/off because of failing SMNP auth.
This reverts commit 87cdcf5645 .
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11906 >
2021-07-15 13:36:25 +02:00
Timothy Arceri
f62ff2e7dc
util: document that workaround also fixes Riptale
...
The games use an idential executable.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11871 >
2021-07-15 10:28:34 +00:00
Iago Toral Quiroga
f481c290b0
v3dv: refactor meta copy/clear code
...
This change does the following:
- Moves image clearing code from v3dv_meta_copy.c to v3dv_meta_clear.c
where it belongs.
- Renames v3dv_meta_copy.h to v3dv_meta_common.h since now it is required
by the copy and clear code.
- Renames 'struct framebuffer_data' type.
- Merges v3dvx_meta_clear.c and v3dvx_meta_copy.c into v3dvx_meta_common.c.
- Prefixes all "public" meta functions with the 'meta' prefix.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11902 >
2021-07-15 12:16:55 +02:00
Iago Toral Quiroga
18642987fd
v3dv: remove more dead clearing code
...
We forgot to remove the v3dvx code for the clearing code fallbacks
we removed after we implemented layered clears.
Fixes: 5ba7f64b45 ('v3dv: remove fallback path for vkCmdClearAttachments')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11902 >
2021-07-15 12:16:34 +02:00
Iago Toral Quiroga
87cdcf5645
ci: disable Broadcom CI
...
The CI is down at the moment, disable it while we figure out
a solution.
Acked-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11901 >
2021-07-15 09:56:22 +02:00
Samuel Pitoiset
1ea156f44c
radv: only init the TC-compat ZRANGE metadata for the depth aspect
...
With separate depth/stencil layouts, if the depth aspect is first
initialized and then cleared, the ZRANGE_PRECISION metadata might
be different than 0. Initializing it again for the stencil aspect
will overwrite the value.
Fixes rendering glitches with Scarlet Nexus on GFX8-9.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5052
Cc: 21.1 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11883 >
2021-07-15 07:21:50 +00:00
Vinson Lee
6e4e6d9527
nv50/ir: Initialize Value member id in constructor.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member id is not initialized in
this constructor nor in any functions that it calls.
Suggested-by: Karol Herbst <kherbst@redhat.com >
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10401 >
2021-07-14 22:44:46 -07:00
Vasily Khoruzhick
4a3269dff6
lima: handle fp16 vertex formats
...
12128fb135 marked fp16 vertex formats supported, but they aren't actually handled
by lima_pipe_format_to_attrib_type(). Fix it by handling it there.
FP16 seems to be the only missing index which is 0x3.
Fixes: 12128fb135 ("lima: add natively supported vertex buffer formats")
Cc: 21.1 mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11872 >
2021-07-15 01:06:52 +00:00
Chia-I Wu
12d18abfe7
venus: refactor vn_EndCommandBuffer
...
Add vn_cmd_submit as a wrapper to vn_instance_ring_submit. It is also
designed such that it can be called from any of the vn_Cmd* functions.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11896 >
2021-07-15 00:52:43 +00:00
Dave Airlie
f144d91496
lavapipe: fix multi-draw regression in shader parameters test
...
dEQP-VK.draw.shader_draw_parameters.base_instance.draw,Fail
dEQP-VK.draw.shader_draw_parameters.base_instance.draw_indexed,Fail
Fixes: 6b6dda56b5 ("lavapipe: increment drawid for multidraws")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11894 >
2021-07-14 23:40:07 +00:00
Icecream95
bedbe35d6b
pan/gen_pack: Use 1U for unpacking log2 to avoid undefined behaviour
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11869 >
2021-07-14 23:20:13 +00:00
Icecream95
04c02418d7
pan/decode: Avoid undefined behaviour on shift in bits()
...
v2: Return 0 instead of `word` (Alyssa)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11869 >
2021-07-14 23:20:13 +00:00
Jason Ekstrand
6642749458
intel/dev: Add a max_cs_workgroup_threads field
...
This is distinct form max_cs_threads because it also encodes
restrictions about the way we use GPGPU/COMPUTE_WALKER. This gets rid
of the MIN2(64, devinfo->max_cs_threads) we have scattered all over the
driver and puts it in a central place.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861 >
2021-07-14 23:02:34 +00:00
Jason Ekstrand
915e5a8cc3
intel/dev: Handle BSW naming issues
...
Braswell, a particular Cherryview variant, is especially strange. We
can't even get the chip name from the PCI ID and instead have to look at
fusing information to decide if it's a 400 or a 405. Pull that into the
common code as well. This fixes BSW naming on ANV and crocus.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861 >
2021-07-14 23:02:34 +00:00
Jason Ekstrand
56d70ba686
intel/dev: Put the device name in intel_device_info
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861 >
2021-07-14 23:02:34 +00:00
Jason Ekstrand
c24ba6cecb
intel/dev: Handle CHV CS thread weirdness in get_device_info_from_fd
...
Cherryview is weird in that the actual limits we can expose through GL
are dependent on fusing information which is only obtainable at runtime.
The same PCI ID may have different configurations with different maximum
CS thread counts. We currently handle this in i965 and ANV by doing the
calculation in the driver.
This dates back to when intel_device_info was computed from the PCI ID.
Now that we have get_device_info_from_fd, we can move the CHV stuff
there and get it out of the driver. This fixes CHV thread counts on
crocus as well.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861 >
2021-07-14 23:02:34 +00:00
Joshua Ashton
1744372714
lavapipe: Use common Vulkan format helpers
...
Drops the vk_format_to_pipe (and it's outdated table) for vk_format_to_pipe_format, aswell as the duplicated vk_format_aspects function.
The old format table was missing USCALED and other values, causing incorrect rendering in many games.
Fixes rendering in Portal 1, Hat in Time, Half-Life 2 and pretty much every other D3D9 title with DXVK.
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11863 >
2021-07-15 08:15:16 +10:00
Eric Engestrom
376fb4f55f
docs: drop duplicate 21.1 branch name from release calendar
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11892 >
2021-07-14 21:55:31 +01:00
Eric Engestrom
e1fe0bb0ca
docs: update calendar and link releases notes for 21.1.5
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11892 >
2021-07-14 21:29:39 +01:00
Eric Engestrom
cd3d8f0f7a
docs: add release notes for 21.1.5
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11892 >
2021-07-14 21:28:56 +01:00
Mike Blumenkrantz
6689c3917e
lavapipe: increment drawid for multidraws
...
Fixes: f99f7c06 ("lavapipe: implement multidraw ext")
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11878 >
2021-07-14 19:20:09 +00:00
Mike Blumenkrantz
d08c84ab0c
zink: improve detection for broken drawids
...
this is also broken for multidraws where drawid shouldn't be incremented
Fixes: 2d32d123e5 ("zink: avoid unnecessarily rewriting gl_DrawID")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11878 >
2021-07-14 19:20:09 +00:00
Dylan Baker
28c5e88931
docs: update calendar for 21.2.0-rc1
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11889 >
2021-07-14 12:00:02 -07:00
Dave Airlie
a3271b3f73
lvp: fixup multi draw memcpys
...
This doesn't fix the tests but it fixes a bunch of valgrind
uninitialised value warnings
Fixes: f99f7c06e7 ("lavapipe: implement multidraw ext")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-By: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11870 >
2021-07-14 18:06:18 +00:00
Alyssa Rosenzweig
a18f434d58
panfrost: Warn on transitions to linear
...
The timing is critical for e.g video players, but this can also happen
unexpectedly in other apps which could be a symptom of deeper trouble.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Suggested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830 >
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig
d5fc0ceafd
panfrost: Warn on get_fresh_batch
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830 >
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig
f2e3ac5c62
panfrost: Warn on get_fresh_batch_for_fbo
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830 >
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig
a266a0fbbb
panfrost: Log reasons for flushes
...
Premature flushes (i.e. before pipe->flush() is called) can be
expensive, particularly if they require extra reloads/resolves.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830 >
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig
bcd915622b
panfrost: Warn on going out of AFBC
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830 >
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig
5bd91a632b
panfrost: Warn on software conditional rendering
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830 >
2021-07-14 17:41:27 +00:00
Alyssa Rosenzweig
256f4a5b02
panfrost: Add perf_debug macros
...
Lifted from freedreno.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830 >
2021-07-14 17:41:27 +00:00
Dylan Baker
fae28b0fce
docs/relnotes/new_features: empty for next release cycle
2021-07-14 10:22:12 -07:00
Dylan Baker
1a05c595a3
VERSION: bump version for 21.3 development cycle
2021-07-14 10:22:12 -07:00