David Rosca
0c024bbe64
radeonsi/vcn: Add decode DPB buffers as CS dependency
...
This is needed to ensure correct synchronization in kernel eg. when it
moves the buffers between VRAM and GTT.
Backport-to: 24.2
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3437
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11624
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30510 >
2024-08-06 14:09:50 +00:00
Surafel Assefa
979dc41558
vulkan: MESA_VK_ENABLE_SUBMIT_THREAD=0 disables threaded submit
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30492 >
2024-08-06 13:19:40 +00:00
Iago Toral Quiroga
d58f7a24d1
v3d: do not expose EXT_float_blend
...
This extension is all about exposing blending with 32-bit floating
point formats, which V3D doesn't support at all so we should not
be exposing it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30512 >
2024-08-06 10:33:10 +00:00
Alvin Wong
0413e1f7dc
hasvk: Conditionally expose VK_KHR_present_wait
...
Gate it behind driconf query for now.
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Acked-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30480 >
2024-08-06 11:39:38 +08:00
Kenneth Graunke
c19e5a0a75
intel/brw: Replace predicated break optimization with a simple peephole
...
We can achieve most of what brw_fs_opt_predicated_break() does with
simple peepholes at NIR -> BRW conversion time.
For predicated break and continue, we can simply look at an IF ... ENDIF
sequence after emitting it. If there's a single instruction between the
two, and it's a BREAK or CONTINUE, then we can move the predicate from
the IF onto the jump, and delete the IF/ENDIF. Because we haven't built
the CFG at this stage, we only need to remove them from the linked list
of instructions, which is trivial to do.
For the predicated while optimization, we can rely on the fact that we
already did the predicated break optimization, and simply look for a
predicated BREAK just before the WHILE. If so, we move the predicate
onto the WHILE, invert it, and remove the BREAK.
There are a few cases where this approach does a worse job than the old
one: nir_convert_from_ssa may introduce load_reg and store_reg in blocks
containing break, and nir_trivialize_registers may decide it needs to
insert movs into those blocks. So, at NIR -> BRW time, we'll actually
emit some MOVs there, which might have been possible to copy propagate
out after later optimizations.
However, the fossil-db results show that it's still pretty competitive.
For instructions, 1017 shaders were helped (average -1.87 instructions),
while only 62 were hurt (average +2.19 instructions). In affected
shaders, it was -0.08% for instructions.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498 >
2024-08-05 19:17:55 -07:00
Kenneth Graunke
fad63d6483
intel/brw: Delete the brw_fs_opt_dead_control_flow_eliminate() pass
...
With the select peephole gone, this no longer does much of anything.
No instruction changes in fossil-db on Alchemist.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498 >
2024-08-05 19:17:55 -07:00
Kenneth Graunke
06e8335e11
intel/brw: Delete the brw_fs_opt_peephole_select() pass
...
Now that we can handle load_ubo in NIR's peephole select pass, the
backend pass isn't really useful anymore.
fossil-db results on Alchemist show almost no impact:
Totals:
Instrs: 150646561 -> 150647106 (+0.00%); split: -0.00%, +0.00%
Cycles: 12633748945 -> 12633760459 (+0.00%)
Totals from 261 (0.04% of 630008) affected shaders:
Instrs: 404946 -> 405491 (+0.13%); split: -0.00%, +0.14%
Cycles: 23947172 -> 23958686 (+0.05%)
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498 >
2024-08-05 19:17:55 -07:00
Kenneth Graunke
7c579f448f
intel/brw: Mark all UBO access with a direct buffer index as speculative
...
UBO loads with a non-indirect buffer index should be safe to perform
speculatively. With a direct offset, we may sometimes turn them into
push constants, at which point it's just reading a register with no
cost at all. Otherwise, we access them via messages that use surface
state, and automatically perform bounds checking. So we shouldn't have
any issues with reading out of bounds and page faulting, for example.
This allows nir_opt_peephole_sel() to operate on load_ubo intrinsics,
so we can turn simple if's with loads on both sides to bcsels. In some
cases this can collapse a surprising amount of control flow, allowing
other optimizations to work better.
The i965 OpenGL driver used load_uniform intrinsics, which are allowed
in NIR's peephole select pass. But iris uses the Gallium NIR pass that
translates uniforms to loads from UBO 0, so we haven't been able to take
advantage of NIR's peephole select pass there. The backend pass was
still able to handle this to some extent, however.
fossil-db results on Alchemist:
Totals:
Instrs: 150656329 -> 150645307 (-0.01%); split: -0.01%, +0.00%
Cycles: 12635230179 -> 12633696811 (-0.01%); split: -0.02%, +0.00%
Send messages: 7416330 -> 7416261 (-0.00%)
Spill count: 52471 -> 52473 (+0.00%)
Fill count: 100818 -> 100803 (-0.01%); split: -0.02%, +0.00%
Scratch Memory Size: 3197952 -> 3198976 (+0.03%)
Totals from 1848 (0.29% of 630003) affected shaders:
Instrs: 1412300 -> 1401278 (-0.78%); split: -0.80%, +0.02%
Cycles: 1809789567 -> 1808256199 (-0.08%); split: -0.11%, +0.03%
Send messages: 59829 -> 59760 (-0.12%)
Spill count: 3870 -> 3872 (+0.05%)
Fill count: 9693 -> 9678 (-0.15%); split: -0.18%, +0.02%
Scratch Memory Size: 174080 -> 175104 (+0.59%)
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498 >
2024-08-05 19:17:55 -07:00
Felix DeGrood
0eed818588
anv/measure: ignore events from reused command buffers
...
INTEL_MEASURE currently does not support measuring events in
parallel from reused command buffers. When this case is detected,
warn user and disallow. Fixes observed segfaults in such apps.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30523 >
2024-08-05 23:45:41 +00:00
Timothy Arceri
140ca7e5d7
glsl: fix glsl to nir support for lower precision builtins
...
When we switch to the full nir based glsl linker in an upcomming merge
request this is required for existing tests from 8fcf8e7fd4 to
continue to pass, this is because they never exercised glsl to nir so
the missing support went unnoticed.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11456
Fixes: 8fcf8e7fd4 ("glsl: lower builtins to mediump that ignore precision of certain parameters ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30395 >
2024-08-05 22:59:59 +00:00
Karol Herbst
50ce777edd
rusticl/device: Make supported 1Dbuffer formats a strict subset of 1D
...
This works around a bug in the OpenCL CTS, which a few drivers here run
into.
Fixes a couple of tests with agx.
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30514 >
2024-08-05 22:17:43 +00:00
Iván Briano
f8553f56ac
intel/rt: fix terminateOnFirstHit handling
...
If TraceRay() is called with the TerminateOnFirstHit flag, we need to
terminate the ray on the first confirmed intersection. This is handled
by the lowering of accept_ray_intersection and it's working fine for the
case of multiple instances of the intersection shader being called.
But if the shader calls reportIntersection() more than once, we were
handling them all and accepting the closest one regardless of the flag.
Check for the flag on every confirmed intersection and, if set, accept
it right there. The subsequent lowering will take care of terminating
handling the ray termination if necessary.
Fixes new test dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30418 >
2024-08-05 21:43:36 +00:00
Lionel Landwerlin
c6bf1f02c4
anv: reuse object string for RMV token
...
The current code is not handling the potential NULL pointer in
VkDebugUtilsObjectNameInfoEXT::pObjectName
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: e1b9a6e4f3 ("anv: initial RMV support")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30516 >
2024-08-05 21:12:59 +00:00
Lionel Landwerlin
ae9a249dfe
vulkan/runtime: allow null/empty debug names
...
VkDebugUtilsObjectNameInfoEXT::pObjectName can be NULL [1] :
"Applications may change the name associated with an object simply
by calling vkSetDebugUtilsObjectNameEXT again with a new string. If
pObjectName is either NULL or an empty string, then any previously
set name is removed."
The current code will segfault.
[1] : https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap50.html#VkDebugUtilsObjectNameInfoEXT
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 3b361b234a ("vulkan: Implement VK_EXT_debug_utils")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30516 >
2024-08-05 21:12:59 +00:00
Mike Blumenkrantz
33a336309e
egl: simplify multibuffers check
...
this is all x11 now, so all the extra checks are unnecessary
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f5a340058d
egl: move multibuffers check into platform_x11
...
there are no longer any extensions to bind, so this function has no
other purpose
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
8407e674cc
egl: delete DRI_MUTABLE_RENDER_BUFFER_DRIVER remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
79b8ea9b76
egl/android: replace DRI_MUTABLE_RENDER_BUFFER_DRIVER check with non-kms_swrast check
...
this should be roughly equivalent
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
7452a1d853
egl: delete DRI2_BLOB remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
591bf3c153
egl: inline DRI2_BLOB
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
101e78152e
dri: make DRI2_BLOB public
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
24a1651910
egl: delete DRI2_INTEROP remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
ccd0a4c1fe
egl: always advertise MESA_gl_interop, inline calls
...
this matches GLX since the inner functions return support correctly
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
1d31a15b24
egl: delete DRI2_FENCE remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
3c692131ff
egl: inline DRI2_FENCE
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
a19839e25d
egl: don't check for create_fence_fd method when importing a fence
...
this is always supported
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
50b4be8d48
egl: simplify native fence check
...
this is the same conditional during init
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
b23acb801e
egl: delete checks for DRI2_FENCE
...
this is supported everywhere
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
a19ba7d9f4
dri: make DRI2_FENCE public
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
c684a9b918
egl: delete DRI_TEX_BUFFER remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f6c649a0ef
egl: inline DRI_TEX_BUFFER
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
cb018b6883
egl: delete DRI_CONFIG_QUERY remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
d723991ded
egl: inline DRI2_CONFIG_QUERY
...
this is always supported
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
197e4f2ae2
egl: delete DRI_FLUSH_CONTROL remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
6b7e6e3bdc
egl: always advertise KHR_context_flush_control
...
this is supported by all dri interfaces
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
0ae2958452
egl: delete DRI_BUFFER_DAMAGE remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
591bc52e3e
egl: inline DRI_BUFFER_DAMAGE
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
77e85377ae
egl: use pipe_screen check for damage region, simplify buffer_damage checks
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
e7b303c680
egl: add a util to get the pipe_screen
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
9d41f1f552
dri: make set_damage_region public
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
85d459fcec
egl: simplify DRI_BUFFER_DAMAGE checks
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f6afe277d3
dri: only add DRI_BUFFER_DAMAGE if the driver supports set_damage_region
...
100% of callers check both
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
f8fbec8e63
egl: delete DRI2_FLUSH remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
fd17c018e9
egl/wayland: replace a couple DRI2_FLUSH checks with non-kms_swrast checks
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
a98434d257
egl/drm: replace a DRI2_FLUSH check with a non-kms_swarst check
...
only (non-kms) swrast doesn't support this
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
b1f1046857
egl: replace a DRI2_FLUSH check with swrast check in x11_copy_buffers
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
1d41299109
egl: replace another DRI2_FLUSH check with a non-kms_swrast check in surface query
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
3b050af311
egl: inline DRI2_FLUSH usage
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
09b52c61bf
egl: replace another DRI2_FLUSH check with non-kms_swrast check in dri2_wait_client
...
only (non-kms) swrast doesn't support this
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
e5f9d004bb
egl: delete a DRI2_FLUSH check in dri2 swapbuffers
...
this is always true here
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:14 +00:00