Commit graph

223025 commits

Author SHA1 Message Date
Christian Gmeiner
adad1a7318 st/mesa: Zero MaxTextureImageUnits for unsupported stages
Mesa core pre-seeds VS/TCS/TES/GS/FS in _mesa_init_constants(..) with
MAX_TEXTURE_IMAGE_UNITS. When a driver does not expose a stage, this
seed leaks into the GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS sum. Drivers
that only expose VS+FS (like etnaviv) overcounted by 96. Zero the
field so the sum reflects only the stages the driver advertises.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41746>
2026-05-26 08:52:48 +00:00
David Rosca
165a0105d3 ac/vcn_dec: Move register defines to ac_vcn_dec.c
Also remove unused struct jpeg_params.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41743>
2026-05-26 08:31:12 +00:00
David Rosca
fa96c3781c radv: Use ac_emit_video_write_memory
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41743>
2026-05-26 08:31:12 +00:00
David Rosca
8f2ee52c0e ac/cmdbuf: Add ac_emit_video_write_memory
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41743>
2026-05-26 08:31:10 +00:00
David Rosca
e1e65e47d4 ac/vcn: Add ac_vcn_sq_header/tail and use it for decode
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41743>
2026-05-26 08:31:10 +00:00
David Rosca
f775ecb143 ac/vcn_dec: Add ac_vcn_dec_init_regs to get register offsets
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41743>
2026-05-26 08:31:10 +00:00
Jose Maria Casanova Crespo
ae604b4bdd v3dv: share zero-fill TFU staging BO at device level
The TFU stride-0 fill path allocates a 64 KiB staging BO
(V3D_TFU_MAX_DIM * cpp = 16384 * 4), maps it, fills it with the
pattern, and caches it on the command buffer. For non-zero patterns
the per-cmd-buffer cache works well, but WebGPU/Dawn workloads
issue many zero-fills (lazy buffer init) across separate command
buffers, so the cache misses almost every time and each fill pays
for a fresh alloc + mmap + memcpy.

Add a device-wide staging BO held in v3dv_device::meta.tfu_fill_zero,
lazily allocated under meta.mtx and used whenever data == 0. The BO
is read-only after init so it can be shared across queues without
extra synchronization, and it is freed in destroy_device_meta.

Measured on a Dawn/WebGPU zero-fill-heavy workload (RPi5, ~60
meta_fill_buffer calls, ~218 MiB total, all zero-fills):

  before: TFU branch total 7.328 ms, avg 115.55 us/call
  after:  TFU branch total 0.296 ms, avg   4.78 us/call  (~24x)

Non-zero patterns continue to use the per-cmd-buffer cache.

Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:45 +00:00
Jose Maria Casanova Crespo
2a62490fa7 v3dv: relax buffer padding in TFU buffer<->image copy
Adjust eligibility check on imageExtent vs slice dimensions
rather than on the buffer addressing dimensions. The TFU codepath
here always writes/reads the full slice from its origin, so the
required invariant is 'imageExtent == slice'; bufferRowLength and
bufferImageHeight may be larger than imageExtent (the spec permits
this for non-zero values), in which case the TFU reads/writes at the
buffer's row/layer stride but only touches slice->width pixels per
row and slice->height rows per layer, leaving the trailing padding
untouched.

The previous combined check (width == slice->width && height ==
slice->height applied to the buffer dimensions) would reject any
caller that set bufferRowLength or bufferImageHeight larger than the
image (this is common for buffers shared across mip levels or
for alignment requirements like Dawn aligning bufferRowLength to 2
for 1-pixel-wide textures), forcing those copies through the slower
TLB / blit / compute paths.

For compressed formats, keep the strict equality check since
block-level stride semantics are more complex.

Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:44 +00:00
Jose Maria Casanova Crespo
99bce54daa v3dv: implement TFU image-to-buffer copy on V3D 7.1
Generalize copy_buffer_image_tfu with a to_buffer flag selecting which
side is the raster destination, and wire it into v3dv_CmdCopyImageToBuffer2
before the TLB path.

The to_buffer=true direction has the same eligibility constraints as
buffer-to-image, except that V3D 4.2 is unsupported as its TFU cannot
produce raster output, and for image-to-buffer the destination is
always a raster buffer.

Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:44 +00:00
Jose Maria Casanova Crespo
0054ff2cb7 v3dv: rename copy_buffer_to_image_tfu to copy_buffer_image_tfu
Drop the direction from the function name in preparation for sharing
this implementation with image-to-buffer copies in the next commit.

Pure rename, no functional change.

Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:43 +00:00
Jose Maria Casanova Crespo
43ddd0c96f v3dv: extract TFU helpers for format-plane and slice-stride args
Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:43 +00:00
Jose Maria Casanova Crespo
8e294e6aee v3dv: use TFU copy with stride-0 for vkCmdFillBuffer
Replace the TLB-based meta_fill_buffer path on V3D 7.1+ with a TFU
raster-to-raster copy that broadcasts a single staging row across
the output via iis=0 (stride-0 input). This eliminates the per-fill
CL render job and its tile_alloc/TSDA BO overhead, which is
substantial on workloads that issue many small fills (e.g. WebGPU
lazy buffer initialization in Dawn).

The staging BO holding one row of the fill pattern is cached on the
command buffer and reused across fills with the same data value, so
sequences of identical-pattern fills share a single staging BO.

The existing TLB-based fill is kept as a fallback and is also used
when V3D_DEBUG=disable_tfu is set, or on V3D simulator builds where
the stride-0 TFU input mode is not supported and would assert.

Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:43 +00:00
Jose Maria Casanova Crespo
ed9fea6045 v3dv: move destroy_update_buffer_cb to a generic helper
Move from v3dv_meta_copy.c to a generic v3dv_cmd_buffer_destroy_bo_cb
in the cmd buffer module. This makes it reusable for different callers
that want to attach a v3dv_bo to a command buffer's private_objs list.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:42 +00:00
Jose Maria Casanova Crespo
9b131eb86e v3dv: Enable meta_copy_buffer with TFU for V3D 7.1
Buffer-to-buffer copies on V3D 7.1+ can be served by the TFU as a
raster-to-raster copy, avoiding the per-copy CL render job and
tile_alloc/TSDA BO overhead of the TLB-based path.

Treat the buffer as a raster texture and chunk the copy into TFU
jobs of up to 16384x16384 pixels. Pick the largest pixel size
(cpp in {4,2,1}) such that src/dst offsets and size are all
cpp-aligned: cpp=4 (R8G8B8A8_UINT) is the expected common case;
cpp=2 (R8G8_UINT) and cpp=1 (R8_UINT) handle Vulkan-permitted
unaligned vkCmdCopyBuffer regions that would otherwise fall back
to the slow TLB path. Skipped when V3D_DEBUG=disable_tfu is set;
emits perf_debug when the cpp=1/2 fallback is taken.

Drop the `if (copy_job)` guard on src_bo cleanup registration in
v3dv_CmdUpdateBuffer: the TFU path queues jobs without returning a
v3dv_job*, so the staging BO must be tracked unconditionally to
avoid leaking once the cmd buffer is submitted.

Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41725>
2026-05-26 07:50:42 +00:00
Collabora's Gfx CI Team
ff6f82c834 Uprev ANGLE to a793c75398c746f3f8a08fd2e74dfc4dff07a0c9
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
7772c5602d...a793c75398

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41612>
2026-05-26 06:58:28 +00:00
Lishin
c41f88fb35 v3d/v3dv: use common compute limits
Move the compute workgroup count and shared memory limits shared by
v3d and v3dv to v3d_limits.h.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41791>
2026-05-26 07:13:22 +01:00
Timur Kristóf
af8c3eb3d6 ac/nir: Fix SMEM workaround with emulated RT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Use the RT descriptors pointer as dummy VA.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41780>
2026-05-25 23:32:13 +00:00
Timur Kristóf
3ff698e9fc ac/nir: When loading an arg, assert that it's used
To avoid weird crashes caused by trying to load unused attributes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41780>
2026-05-25 23:32:13 +00:00
Marek Olšák
7f2130c86e nir/opt_algebraic: add more ffract/ffloor/ftrunc/f2u/f2i patterns
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Totals from 1390 (0.69% of 202429) affected shaders:
MaxWaves: 33336 -> 33348 (+0.04%)
Instrs: 4101809 -> 4095218 (-0.16%); split: -0.17%, +0.01%
CodeSize: 22973700 -> 22944812 (-0.13%); split: -0.13%, +0.00%
VGPRs: 95592 -> 95460 (-0.14%); split: -0.15%, +0.01%
SpillSGPRs: 2910 -> 2913 (+0.10%)
Latency: 27815305 -> 27807064 (-0.03%); split: -0.06%, +0.03%
InvThroughput: 4563067 -> 4555622 (-0.16%); split: -0.18%, +0.02%
VClause: 98544 -> 98570 (+0.03%); split: -0.04%, +0.06%
SClause: 91148 -> 91149 (+0.00%); split: -0.00%, +0.01%
Copies: 324008 -> 324028 (+0.01%); split: -0.10%, +0.10%
Branches: 99085 -> 99084 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 70920 -> 70734 (-0.26%); split: -0.27%, +0.00%
PreVGPRs: 78288 -> 78190 (-0.13%); split: -0.15%, +0.03%
VALU: 2123606 -> 2117766 (-0.28%); split: -0.28%, +0.00%
SALU: 621757 -> 621671 (-0.01%); split: -0.02%, +0.00%
VMEM: 163395 -> 163387 (-0.00%); split: -0.01%, +0.00%
SMEM: 140374 -> 140376 (+0.00%)
VOPD: 258332 -> 258264 (-0.03%); split: +0.04%, -0.07%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41455>
2026-05-25 20:02:30 +00:00
Vishnu Vardan
e824c30460 mesa/st: remove redundant has_hw_atomics from st_context
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
has_hw_atomics is set when the fragment shader stage reports
non-zero max_hw_atomic_counters. Inline the same condition at
each call site.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13596
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:46 +00:00
Vishnu Vardan
f46aa24800 mesa/st: remove can_null_texture from st_context
can_null_texture is a direct copy of screen->caps.null_textures.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:46 +00:00
Vishnu Vardan
ff571df163 mesa/st: remove validate_all_dirty_states from st_context
validate_all_dirty_states is a direct copy of
screen->caps.validate_all_dirty_states.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:46 +00:00
Vishnu Vardan
8ad3f20abf mesa/st: remove can_bind_const_buffer_as_vertex from st_context
can_bind_const_buffer_as_vertex is a direct copy of
screen->caps.can_bind_const_buffer_as_vertex.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:45 +00:00
Vishnu Vardan
3d1021a753 mesa/st: remove allow_st_finalize_nir_twice from st_context
allow_st_finalize_nir_twice is a direct copy of
screen->caps.call_finalize_nir_in_linker.
Read the cap from the screen directly at each call site.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:45 +00:00
Vishnu Vardan
e4e5e4490b mesa/st: remove lower_rect_tex from st_context
lower_rect_tex is the negation of screen->caps.texrect.
Replace all call sites with !screen->caps.texrect directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:45 +00:00
Vishnu Vardan
f5b5929a1a mesa/st: remove has_conditional_render from st_context
has_conditional_render is a direct copy of
screen->caps.conditional_render.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:44 +00:00
Vishnu Vardan
e03313c06a mesa/st: remove prefer_real_buffer_in_constbuf0 from st_context
prefer_real_buffer_in_constbuf0 is a direct copy of
screen->caps.prefer_real_buffer_in_constbuf0.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:44 +00:00
Vishnu Vardan
45dc94b1bb mesa/st: remove lower_ucp from st_context
lower_ucp is the negation of screen->caps.clip_planes.
Replace all call sites with !screen->caps.clip_planes directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:44 +00:00
Vishnu Vardan
3d2164f890 mesa/st: remove lower_two_sided_color from st_context
lower_two_sided_color is the negation of screen->caps.two_sided_color.
Replace all call sites with !screen->caps.two_sided_color directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:43 +00:00
Vishnu Vardan
7c84af940a mesa/st: remove lower_alpha_test from st_context
lower_alpha_test is the negation of screen->caps.alpha_test.
Replace all call sites with !screen->caps.alpha_test directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:43 +00:00
Vishnu Vardan
797ebce3e1 mesa/st: remove lower_flatshade from st_context
lower_flatshade is the negation of screen->caps.flatshade.
Replace all call sites with !screen->caps.flatshade directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:43 +00:00
Vishnu Vardan
51b059dd11 mesa/st: remove can_dither from st_context
can_dither is a direct copy of screen->caps.dithering.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:43 +00:00
Vishnu Vardan
06c0ffadee mesa/st: remove has_indep_blend_func from st_context
has_indep_blend_func is a direct copy of
screen->caps.indep_blend_func.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:42 +00:00
Vishnu Vardan
9650f8fd34 mesa/st: remove has_indep_blend_enable from st_context
has_indep_blend_enable is a direct copy of
screen->caps.indep_blend_enable.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:42 +00:00
Vishnu Vardan
f046e4d2fe mesa/st: remove has_pipeline_stat from st_context
has_pipeline_stat is a direct copy of
screen->caps.query_pipeline_statistics.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:42 +00:00
Vishnu Vardan
e4535b5c07 mesa/st: remove has_single_pipe_stat from st_context
has_single_pipe_stat is a direct copy of
screen->caps.query_pipeline_statistics_single.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:41 +00:00
Vishnu Vardan
69aa46f63e mesa/st: remove has_occlusion_query from st_context
has_occlusion_query is a direct copy of
screen->caps.occlusion_query.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:41 +00:00
Vishnu Vardan
de3a22ba1d mesa/st: remove has_indirect_partial_stride from st_context
has_indirect_partial_stride is a direct copy of
screen->caps.multi_draw_indirect_partial_stride.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:40 +00:00
Vishnu Vardan
ec13dc4a38 mesa/st: remove has_multi_draw_indirect from st_context
has_multi_draw_indirect is a direct copy of
screen->caps.multi_draw_indirect.
Read the cap from the screen directly at each call site.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:40 +00:00
Vishnu Vardan
3b092a7950 mesa/st: remove has_time_elapsed from st_context
has_time_elapsed is a direct copy of screen->caps.query_time_elapsed.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:40 +00:00
Vishnu Vardan
9455710aaf mesa/st: remove emulate_gl_clamp from st_context
emulate_gl_clamp is the negation of screen->caps.gl_clamp.
Replace all call sites with !screen->caps.gl_clamp directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:39 +00:00
Vishnu Vardan
22c321327c mesa/st: remove redundant needs_texcoord_semantic from st_context
needs_texcoord_semantic is a direct copy of screen->caps.tgsi_texcoord.
Read the cap from the screen directly at each call site.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:39 +00:00
Vishnu Vardan
a080330b94 mesa/st: remove redundant has_shareable_shaders from st_context
has_shareable_shaders is a direct copy of screen->caps.shareable_shaders.
Read the cap from the screen directly at each call site.

Fix st_format_test which was missing st_context.screen initialization,
exposed by this change.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:39 +00:00
Vishnu Vardan
91e4c9e33b mesa/st: remove redundant astc_void_extents_need_denorm_flush from st_context
This cap is a direct alias of screen->caps.astc_void_extents_need_denorm_flush.
Replace all st_context usages with the screen cap directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:38 +00:00
Vishnu Vardan
4fd17e53f3 mesa/st: remove redundant has_stencil_export from st_context
This cap is a direct alias of screen->caps.shader_stencil_export.
Replace all st_context usages with the screen cap directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
2026-05-25 17:22:38 +00:00
Samuel Pitoiset
e2e7fce6e9 radv: rename radv_zero_vram to vk_zero_vram
More common and this implicitly enables this for Path Of Exile and X4
Foundations. Though, zero VRAM allocs is already the default in AMDGPU,
so that doesn't change anything in practice (except for very old
kernels).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41735>
2026-05-25 16:49:28 +00:00
Samuel Pitoiset
e2631eca0f radv: close the local fd immediately after the winsys is created
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
libdrm dups the fd internally, so local_fd and get_fd() are different
fd number but they point to the same file descriptor. Close it right
after the amdgpu device is initialized to avoid keeping two fds open
for the same thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41753>
2026-05-25 16:26:19 +00:00
Thong Thai
25ba73ef6e meson: Make with_gfx_compute depend on video encode support
Update the with_gfx_compute flag so decode-only builds do not
unnecessarily compile gfx/compute code.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41493>
2026-05-25 15:44:12 +00:00
Thong Thai
77ca4da673 gallium/auxiliary: Simplify auxiliary for non-gfx/compute builds
Removes gfx, tgsi and driver_trace code from auxiliary for
non-gfx/compute builds, to reduce the number of files that gets
compiled.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41493>
2026-05-25 15:44:12 +00:00
Thong Thai
931dba218e nir: Only build NIR headers when with_gfx_compute is false
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41493>
2026-05-25 15:44:12 +00:00