Commit graph

223486 commits

Author SHA1 Message Date
Tomeu Vizoso
b33f0cc7fc teflon/tests: avoid loading build-tree tensorflow-lite stub at runtime
It can be quite confusing to see the tests failing to load models
without knowing why. To avoid making people waste time with strace, link
with the stubs at build time but look for the actual implementation at
run time.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40269>
2026-06-02 17:07:08 +00:00
Silvio Vilerino
31fe3637a2 mediafoundation: check for AUTO slice/tile only capable hardware
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41947>
2026-06-02 16:50:00 +00:00
Silvio Vilerino
ce05976385 d3d12: Support video encode AUTO slice/tile only capable hardware
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41947>
2026-06-02 16:50:00 +00:00
Samuel Pitoiset
2e55357b33 radv: fix DGC with conditional rendering and task+mesh shaders
While I was investigating some task+mesh random GPU hangs in CI, I
finally found a sequence that caused a test failure:

dEQP-VK.dgc.ext.graphics.mesh.conditional_rendering.general.classic_bind_with_count_buffer_condition_false_with_task_shader
dEQP-VK.dgc.ext.graphics.mesh.token_draw_count.monolithic_with_task_shader

Executing these two tests in a row caused the second one to always fail
(tested on NAVI33).

After investigating I figured out that only the DGC GFX IB was
predicated (with IB2) and the DGC ACE IB was always running, although
without any mesh draws to consume the task output. It seems the
hardware is confused if another task+mesh draw is dispatched after that,
and this could cause failures or GPU hangs.

Fix this by resetting the number of DGC sequences to 0 when conditional
rendering is used. This is the only option to emulate conditional
rendering with DGC and ACE.

This also likely fixes DGC+RT on compute queue.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41939>
2026-06-02 16:23:18 +00:00
Rhys Perry
1301eef21d radv: fix usage of radv_nir_cmat_length
This should be after we finalize desc.use.

Fixes FSR4 on RDNA3.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: ca0496bc26 ("radv: use load_deref_transpose_amd for transposed cooperative matrix loads")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41922>
2026-06-02 15:57:14 +00:00
Mary Guillemard
eb90c4b718 nvk: Do not report task and mesh stages as supported on pre-Turing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We should not report support for subgroup ops or DGC for mesh stages on
pre-Turing.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reported-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 145b8540e5 ("nvk: Advertises VK_EXT_mesh_shader")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41962>
2026-06-02 15:09:43 +00:00
Daniel Schürmann
c0e83629d8 anti-lag: rework wait time calculation
The extension allows for a simplified API where
pPresentationInfo is NULL and the second call to
vkAntiLagUpdateAMD() is omitted which makes it necessary
to separate frames on vkQueuePresentKHR().

The second main difference is that the wait time is now
based on the previous input stage plus the average frame
time.  This greatly smooths frame pacing.

v2:
- measure the GPU frame time directly
- Only try to evaluate frames which are likely to complete
  within the waiting time
- Calculate the average absolute deviation of the total
  frame time and use that to determine the slack time

v3:
- move frame separation to vkQueuePresentKHR()
- tightened frame pacing aiming for at most 1ms overlap

Acked-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41727>
2026-06-02 14:21:20 +00:00
Jakob Sinclair
3a3099369f gallium: fix type size in z24_unorm_packed_pack_z_32unorm
util_format_z24_unorm_packed_pack_z_32unorm was accidentally writing
48-bits instead of 24 since it used a 16-bit integer pointer instead of
an 8-bit pointer. This could cause a segfault if the function was used,
but it is currently unused.

Fixes: 18f352090d ("util/format: Add a Z24_UNORM_PACKED format")

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41288>
2026-06-02 13:49:08 +00:00
Jakob Sinclair
0925c68adf pan: Support lowering D24X8 to D24
On Mali, HW does not advertise support for writing D24X8 with AFBC
enabled but when AFBC is enabled for a D24X8 image, we can lower it to
just D24.

In Panfrost we keep the external format as Z24X8 but the internal format
as Z24 packed. The driver already handles setting up a new resource in
the external format when mapping to CPU since AFBC resources can't be
mapped directly anyways.

For PanVK we return the Z24 packed format D24X8 with AFBC and otherwise
Z24X8 format without AFBC.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41288>
2026-06-02 13:49:08 +00:00
Jakob Sinclair
44362461b5 vulkan/meta: Don't issue a full drawcall for clears
The Vulkan meta path used to issue a full drawcall with a rectangle
primitive for cmdClear*Image which is not optimal if the device has
support for HW clears. This commit enables the meta path to skip the
full drawcall if the driver supports it by setting
VK_ATTACHMENT_LOAD_OP_CLEAR on the attachment and letting the driver
handle setting up a clear pipeline.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41288>
2026-06-02 13:49:08 +00:00
Jakob Sinclair
cdf5703eb1 panvk: Remove unnecessary functions
panvk_get_image_layout_transition_handler returns the same zero struct
in both paths so it can simply be removed. This also means that
transition_image_layout_sync_scope and cmd_transition_image_layout can
be removed as they are always NOPs.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41288>
2026-06-02 13:49:07 +00:00
Samuel Pitoiset
b0ee9510d7 radv: advertise VK_KHR_device_fault
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41648>
2026-06-02 15:18:34 +02:00
Samuel Pitoiset
7dcd2a4c87 radv: implement VK_KHR_device_fault
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41648>
2026-06-02 15:18:22 +02:00
Pavel Ondračka
f6b06ea3de nir/algebraic: prevent ffract optimization on lowered ffloor
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ffloor(a) is lowered as a - ffract(a). dEQP expects that for example
ffloor(a) == 1.0 for every a in between 1.0 a 2.0. This worked fine,
but the new ffract(a + b(is_integral)) -> ffract(a) rule broke this.
Specifically, dEQP-GLES2.functional.shaders.struct.uniform.equal_fragment
checks that ffloor(a + 1.0) == 1.0 for every a between 0.0 and 1.0.
However this is not exactly true once the ffract(a + 1.0) is lowered
to ffract(a).

Prevent this by marking ffract from ffloor lowering as exact so that
the recently introduced ffract(a + b(is_integral)) -> ffract(a) rule
does not trigger.

Fixes: c6aaafa3 ("nir: add lowering for ffloor")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15562
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41882>
2026-06-02 12:03:09 +00:00
Mary Guillemard
8ec56cc0cc docs/nvk: Add some notes about mesh shading and ISBE layout
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:32 +00:00
Mary Guillemard
145b8540e5 nvk: Advertises VK_EXT_mesh_shader
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:32 +00:00
Mary Guillemard
cdb0dea462 nvk: Lower mesh and task shaders
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:32 +00:00
Mary Guillemard
cf29933de1 nvk: Only lower shared memory for compute shaders
It's a no-op on other stages so let's not run this.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:32 +00:00
Mary Guillemard
424c466cdb nvk: Do not set lower_cs_local_index_to_id
With task/mesh shaders, we need that lowering to not happen.

Move to conditionally lower local invocation index with
nir_lower_compute_system_values_options in case of compute shader.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:32 +00:00
Mary Guillemard
50b3ae08e7 nak: Implement mesh and task shader stages
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:31 +00:00
Mary Guillemard
368a6693bc nvk: Implement mesh draw commands
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:31 +00:00
Mary Guillemard
96ade67e2b nvk: Add support for mesh and task shader binding
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:31 +00:00
Mary Guillemard
3286990481 nvk: Prepare cbuf for mesh shader support
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:31 +00:00
Mary Guillemard
3348003735 nvk: Prepare nvk_shader for GS header upload for mesh shaders
This define structure and a way to upload the GS header when present.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:31 +00:00
Mary Guillemard
1f31ec46be nak: Add a lowering pass for shared memory atomics in mesh stages
This add a new lowering pass for shared memory atomics that will be used
for mesh/task stages.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:31 +00:00
Mary Guillemard
b95dbc64bf nir,nak: Add match_any_nv
NVIDIA hardware have an instruction allowering you to retrive the mask
of active threads matching the same source value as the current
invocation.

This is going to be used by shared memory lowering for mesh / task
stages on NVK.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27196>
2026-06-02 10:34:31 +00:00
Danylo Piliaiev
d88c183785 tu: Disable FS in some cases even when FS explicitly writes D/S
For example, the FS may write gl_SampleMask while color writes are
masked out and there is no depth attachment.
Note that the proprietary driver still considers more state when
disabling the FS, such as the depth test being disabled, and thus
disables the FS in cases where we do not. However, I think that is
too much of a stretch unless we find some real workload needing it.

This change also allows disabling an FS that has discard.

This requires being careful around occlusion queries, since when one
is enabled, we cannot disable an FS that can discard.

Found via gpu-ratemeter bench: vk.pix.noaa.output.color+z+samplemask.colormask=0

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41857>
2026-06-02 11:56:26 +02:00
Maíra Canal
c4a1d9583c etnaviv/ml: derive stride-2 destriding offsets from padding
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The destriding lowering hard-coded a special case for weight_width == 5
with a fallback "+1" branch that was only correct for 3x3 kernels.
Replace it with formulas derived from TFLite's SAME-padding rule for
stride 2:

The half-resolution expansion applied to the reshuffle output and to
the strided_to_normal() input is:

  weight_width / 2

which gives 1 for 3x3, 2 for 5x5, and 3 for 7x7 kernels.

The reshuffle window start offset is:

  (weight_width + input_width % 2 - 2) / 2

This folds the previous odd-input fixup into the same expression
preserves the existing 3x3 and 5x5 behavior while extending the
lowering to wider odd kernels such as 7x7.

Fixes Models.Op/inception_000, which uses Inception V1's Conv2d_1a_7x7,
in the Teflon test suite.

Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41774>
2026-06-02 08:13:11 +00:00
David Rosca
c24e4085a1 radeonsi/mm: Set PIPE_RESOURCE_FLAG_UNMAPPABLE for buffers
This creates the BO with AMDGPU_GEM_CREATE_NO_CPU_ACCESS for buffers
that we don't map.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41850>
2026-06-02 07:06:50 +00:00
David Rosca
633d931a95 radeonsi/mm: Add si_vid_create_buffer and use it
Add a buffer create function that takes PIPE_RESOURCE_FLAG_* flags.
Disable suballocation for all buffers on UVD/VCE without VM support.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41850>
2026-06-02 07:06:50 +00:00
Collabora's Gfx CI Team
65d10020f4 Uprev ANGLE to 196d1b79eadbd8fdbf0590092266bb2d87264988
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
a793c75398...196d1b79ea

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41816>
2026-06-02 00:06:49 +00:00
Serdar Kocdemir
ff67b27f48 gfxstream: disallow maintenance6 extension due to serialization bugs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
VkBindMemoryStatus is using a pointer to VkResult but the value cannot
be correctly encoded and decoded with the current code generator. Until
the issues are fixed, the extension should not be used as it'll cause
cts failures and invalid behavior.

Test: dEQP-VK.memory.binding.maintenance6.*

Reviewed-by: Gurchetan Singh <gurchetan.singh.foss@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41893>
2026-06-01 22:41:37 +00:00
Bo Hu
3294675513 gfxstream: vk-snapshot: update handling of bufferview in vkUpdateDescriptorSets
Reviewed-by: Serdar Kocdemir <kocdemir@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41893>
2026-06-01 22:41:37 +00:00
Serdar Kocdemir
b786e19608 gfxstream: Fix codegen causing missing vulkan structures
Ordering of the extensions was affecting the codegen and some structures
were missing due to errors during codegen. One example is the custom
border color structure for the samplers, due to the reference from new
vkRegisterCustomBorderColorEXT function that's introduced with a
different extension VK_EXT_descriptor_heap. This CL adds a sorting
mechanism to generate code for supported extensions first to ensure
deepcopy and transform functions are created correctly.

Test: dEQP-VK.pipeline.*

Reviewed-by: Gurchetan Singh <gurchetan.singh.foss@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41893>
2026-06-01 22:41:37 +00:00
Serdar Kocdemir
ad2565bcc6 gfxstream: update codegen for host side vulkan header update to v1.4.350
Also enables VK_KHR_swapchain_maintenance1, as the EXT now aliases the
KHR version.

Test: codegen && CI

Reviewed-by: Gurchetan Singh <gurchetan.singh.foss@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41893>
2026-06-01 22:41:37 +00:00
Alyssa Rosenzweig
b4cd4428b3 intel/gen: drop noisy build spam
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise this shows up in the ninja build.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41944>
2026-06-01 21:02:09 +00:00
Alyssa Rosenzweig
7eb248ba9f intel/gen: remove dead #include
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41944>
2026-06-01 21:02:09 +00:00
Mary Guillemard
90d963d353 nir/nir_format_convert: Add missing u2f32 in nir_format_unpack_r9g9b9e5
Fix
"dEQP-VK.api.copy_and_blit.*.image_to_image.all_formats.color.2d_to_1d.*.e5b9g9r9_ufloat_pack32.*"
on HK.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 5f5f4474f6 ("nir: Add a format unpack helper and tests")
Reviewed-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41929>
2026-06-01 20:28:44 +00:00
Faith Ekstrand
00a407bbae nak: Use EnumAsU8 for RegFile
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:17 +00:00
Faith Ekstrand
3f18c81d4f compiler/rust: Add an EnumAsU8 trait
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:17 +00:00
Faith Ekstrand
fdc5d446ee compiler/rust/bitset: Add a new ConstBitSet type
Unlike BitSet, which is backed by a Vec<u32>, this is backed by a
fixed-length array is therefore Copy.  It's also mostly const so it can
be constructed and used from const contexts.  Because of the const
rules, it's a bit more rigid and can only really accept keys which are
unsigned integer types.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:17 +00:00
Faith Ekstrand
76e3ecd97a compiler/rust/bitset: Implement Into/FromBitIndex for more types
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:17 +00:00
Faith Ekstrand
63d2ccd64b compiler/rust/bitset: Generalize BitSetIterator
It now iterates over a slice instead of a BitSet

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:17 +00:00
Faith Ekstrand
f43e57b3c0 compiler/rust/bitset: Add find_next_[un]set() helpers
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:17 +00:00
Faith Ekstrand
ffe6cdd52d compiler/rust/bitset: Don't reserve space in remove()
If the requested bit is past the end of the set, we can just return
false.  We don't have to grow the bitset.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:16 +00:00
Faith Ekstrand
81c9eddb69 compiler/rust/bitset: Add a BitIndex helper struct
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41915>
2026-06-01 19:51:16 +00:00
Mike Blumenkrantz
fa867cf189 zink/bo: check for usage before completion when reclaiming bos
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
checking completion alone disregards submit_count, which is used to
determine the validity of any existing usage pointer. this could lead to
large numbers of bos with stale usage and infinite memory ballooning

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41936>
2026-06-01 19:20:59 +00:00
Mike Blumenkrantz
cf1ca02bd0 zink/bo: use pb_buffer_lean to save a little mem
vtbl is not used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41936>
2026-06-01 19:20:59 +00:00
Mike Blumenkrantz
47142da666 zink/bo: use only a single layer of slabs
this is simpler and apparently faster

ref cf2dc2d512

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41936>
2026-06-01 19:20:58 +00:00
Mike Blumenkrantz
d898eee030 zink/bo: stop using pb_buffer vtable for destroy
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41936>
2026-06-01 19:20:58 +00:00