Mike Blumenkrantz
393958a02e
zink: use a better array loop sizing for gfx descriptor program init
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this will be more consistent if the array is ever resized
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
a7c320e652
zink: some minor tweaks to descriptor template code
...
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
b17235968e
zink: break out setting draw-time dynamic state into separate function
...
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
2712dc2179
zink: add enum zink_pipeline_idx to distinguish between types of pipelines
...
used for array indexing in many cases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
ea4d64531d
zink: unify ntv code for loading shared/scratch memory
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
d74eff651b
zink: unify ntv code for storing shared/scratch memory
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
b6f0826ce5
zink: make zink_descriptor_util_push_layouts_get() static
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
4e50969e83
zink: delete weird prog->pipelines sizing
...
this was a tiny micro-optimization for not allocating hash tables, but
really it just makes the code more confusing for no reason
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:15 -04:00
Mike Blumenkrantz
308744e789
zink: mark dirty_gfx_stages using util function
...
more extensible for mesh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358 >
2025-09-14 07:56:05 -04:00
Mike Blumenkrantz
dce29ae35f
Revert "util/vbuf: stop nooping set_vertex_buffers calls"
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit cccca8d140 .
did not mean for this to merge
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37353 >
2025-09-13 11:18:09 -04:00
Mike Blumenkrantz
cccca8d140
util/vbuf: stop nooping set_vertex_buffers calls
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this sucks, but if the gallium expectation is that changing vertex state
always requires a vb update, vbuf can no longer deduplicate repeated
calls
Fixes: 1638d486ff ("gallium/u_threaded,st/mesa: add a merged set_vertex_elements_and_buffers call")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:31 +00:00
Mike Blumenkrantz
d63374498d
zink: eliminate even more calls to sync functions
...
many times (especially in viewperf), vertex buffers and draw buffers
have no prior access, which means incurring a heavy call to the barrier
function which will just return a no-op anyway
instead, have an inline helper to no-op these cases and just add the
expected access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:30 +00:00
Mike Blumenkrantz
58ed06ad68
zink: only remove buffer deferred sync on release
...
this is otherwise just a huge amount of overhead whenever
descriptors are unbound
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:29 +00:00
Mike Blumenkrantz
1abc337e94
zink: delete some function decls that no longer exist
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:28 +00:00
Mike Blumenkrantz
5ef8453228
zink: use memcpy for vbo bind
...
there's no more refcounting here so this is fine
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:28 +00:00
Mike Blumenkrantz
aee0379414
zink: rescope some zink_set_vertex_buffers_internal variables
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:27 +00:00
Mike Blumenkrantz
f8c96df9d2
zink: move vbo unbind to bind_vertex_state
...
set_vertex_buffers is required to be called after the bind_state call,
which means some code can be moved out of the higher frequency call site
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:27 +00:00
Mike Blumenkrantz
06a8e7b87e
zink: move zink_bind_vertex_elements_state() to zink_context.c
...
needed in order to handle unbinding
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:26 +00:00
Mike Blumenkrantz
f99503faa2
zink: use velems buffer count in blitter instead of gfx mask
...
small simplification
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:26 +00:00
Mike Blumenkrantz
a730c83dd0
zink: split update_res_bind_count
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:26 +00:00
Mike Blumenkrantz
c96bb8d1c4
zink: ALWAYS_INLINE zink_set_vertex_buffers_internal
...
otherwise the specialization is useless
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:25 +00:00
Mike Blumenkrantz
26f4cc39b5
zink: add a fastpath for nooping vertex and draw buffer barriers
...
even doing this mechanism inside the barrier function doesn't yield
anywhere near the same gains (~15-20% in viewperf catia), mostly for
the draw buffers, so I'd assume it's just added register pressure
from the huge draw function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37277 >
2025-09-13 12:20:25 +00:00
Mike Blumenkrantz
efd8e46891
zink: support NV_representative_fragment_test
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37081 >
2025-09-13 11:28:44 +00:00
Mike Blumenkrantz
34641b44c6
mesa: support GL_NV_representative_fragment test
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37081 >
2025-09-13 11:28:44 +00:00
Robert Mader
5cc0d1b681
kms-dri-sw: Implement create_mapped()
...
Following the example of dri_sw_winsys, in order to support
importing client-allocated (u)dmabufs into GL renderers as well
as KMS.
This crucially allows Wayland compositors running on vkms + llvmpipe
to behave much more like on HW GPUs/display engines, making CI testing
more robust and intuitive.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37305 >
2025-09-13 06:47:58 +00:00
Robert Mader
306feaf3a4
sw_winsys: Add winsys_handle to displaytarget_create_mapped
...
The main intention is to allow to pass dmabuf handles, however as its
type differs depending on platform, just pass the whole whandle.
Also make use of it in llvmpipe_resource_from_handle(), in preparation
for the next commit.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37305 >
2025-09-13 06:47:58 +00:00
Corentin Noël
63cd410c29
virgl: Skip resource destruction only when there are actually needed references
...
Suggested by Jan Alexander Steffens in https://gitlab.freedesktop.org/mesa/mesa/-/issues/13844#note_3087461
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13844
Fixes: 6c1c116a0f
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37346 >
2025-09-13 00:44:49 +00:00
Mike Blumenkrantz
c02d5d79b7
zink: add another tu flake
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37318 >
2025-09-12 22:09:50 +00:00
Mike Blumenkrantz
69f90bfe29
zink: add some pre-checks before calling query update/suspend/resume
...
these trigger lots of context switches which impact perf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37318 >
2025-09-12 22:09:50 +00:00
Mike Blumenkrantz
9d19d7f6de
zink: move draw state flag resets into their blocks
...
incredibly, this shows up in perf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37318 >
2025-09-12 22:09:50 +00:00
Mike Blumenkrantz
74b7b5b661
zink: simplify index type access to normal array
...
the sizes are 1/2/4, so just use that array index
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37318 >
2025-09-12 22:09:50 +00:00
Mike Blumenkrantz
c852c25cdc
zink: always use vkCmdBindVertexBuffers2
...
this cuts out a small amount of overhead in drivers that wrap
vkCmdBindVertexBuffers onto vkCmdBindVertexBuffers2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37318 >
2025-09-12 22:09:50 +00:00
Mike Blumenkrantz
07a7d3627f
zink: store last index buffer
...
this allows skipping some draw-time ops when the same index buffer
is used repeatedly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37318 >
2025-09-12 22:09:50 +00:00
Martin Roukala (né Peres)
03239662c3
zink/ci: raise the job timeout from 5 to 8 minutes
...
Suggested-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37328 >
2025-09-12 21:46:55 +00:00
Georg Lehmann
2ac5641473
shader_info: remove gl_subgroup_size enum
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Georg Lehmann
8d7b1498cc
rusticl: switch to new subgroup size info
...
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Georg Lehmann
1b5c78d1f7
radeonsi: switch to new subgroup size info
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Georg Lehmann
04d3b3bde5
mesa,glsl,spirv: set new subgroup size info
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Georg Lehmann
95c2a65662
nir: remove unused shader_info param in nir_create_shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Ian Romanick
1eb4a2f5cd
iris: Limit max_shader_buffer_size to INT32_MAX
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GLSL arrays are sized by signed integers. Other places in the Mesa treat
this value is int32_t. Having the value larger than (uint32_t)INT32_MAX
causes assertion failures in many piglit tests.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Closes : #13873
Fixes: 2f8b8649f0 ("iris: Increase max_shader_buffer_size to max_buffer_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37282 >
2025-09-12 20:45:39 +00:00
Mike Blumenkrantz
2d7dd41506
tc: eliminate refcounting for set_shader_buffers
...
this is no longer necessary
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37310 >
2025-09-12 15:47:34 +00:00
Mike Blumenkrantz
9f764486cb
cso: unbind vertex buffers when unbinding context
...
cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37276 >
2025-09-12 15:06:15 +00:00
Christian Meissl
31a627bdc2
panfrost: take reference from pool used for allocation
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes bo leaks caused by wrong ref counting when
using temporary sampler views.
The leak was observed when playing videos using the
DRM_FORMAT_MOD_VENDOR_MTK tiling format
through gstreamer.
Fixes: 0795f3d7e4 ("panfrost: Add a pool to sampler_view")
Signed-off-by: Christian Meissl <meissl.christian@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37325 >
2025-09-12 11:44:46 +00:00
Rob Clark
52e02c2b0b
freedreno/a6xx: Fix snorm rounding
...
See util_format_r8g8b8a8_snorm_pack_rgba_float()
Fixes the remaining failures in images/clFillImage/test_cl_fill_images.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37319 >
2025-09-12 10:10:29 +00:00
Mike Blumenkrantz
e11be7549d
zink: more vvl exceptions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37324 >
2025-09-12 04:05:28 +00:00
Trigger Huang
430b85adbb
radeonsi: Fix u_log_ctx for aux_context recreation
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When recreating aux_context (typically following a GPU reset event),
the u_log_context must be properly initialized based on the aux_debug
enablement state, just like the logic in the function
radeonsi_screen_create_impl() during aux_context creation. Otherwise,
wrong u_log_context setting will lead to Mesa crashes. For example, in
si_blit_decompress_color(), it will check sctx->log to decide whether
to call u_log_printf(), which ultimately causes a crash.
Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37296 >
2025-09-12 03:45:35 +00:00
Karol Herbst
be7afedba9
rusticl/mesa: fix NULL pointer access in set_constant_buffer_stream
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37311 >
2025-09-12 02:01:59 +00:00
Mike Blumenkrantz
f419a96d76
zink: use implicit offsets for function temp variables in ntv
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this is also apparently illegal
Fixes: 0b7611824a ("zink: use implicit stride in ntv for temp vars"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37312 >
2025-09-12 00:52:46 +00:00
Gert Wollny
b26c68e40a
r600/sfn: Filter lowering of b2f32(comp(x,y)) for 64 bit sources
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Instead of skipping later, we can filter these instructions right away.
Fixes: 51d8ca2dff ("r600/sfn: optimize comparison results")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37298 >
2025-09-11 23:00:21 +00:00
Mike Blumenkrantz
32b4412d54
zink: update gfx pipeline less frequently
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37308 >
2025-09-11 18:21:40 +00:00