Commit graph

215663 commits

Author SHA1 Message Date
Romaric Jodin
6b67ca2e8f pan/bi: Keep vectorized phis
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
When the source contains vectorized phis, keep them to avoid
generating unnecessary moves.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38772>
2025-12-06 07:22:47 +00:00
Faith Ekstrand
d3a890a58e pan/bi: Handle small vectors in bi_src_index()
bit_size <= 32 does not actually guarantee a single component, which
nir_src_as_uint() requires.  We could just check num_components == 1 but
it's easy enough to support any vector that fits in 32 bits.

Cc: mesa-stable
Reviewed-by: Romaric Jodin <rjodin@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38772>
2025-12-06 07:22:47 +00:00
Marek Olšák
a051d4ee6b nir/lower_io_vars: don't insert output stores for unrelated streams before emits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Before every emit_vertex(stream_id = n), we would insert stores for all
outputs, including outputs that are not meant for that stream.
Those stores would end up having no effect while potentially reducing
performance.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38100>
2025-12-06 02:27:46 +00:00
Jesse Natalie
0ac9ccb4b4 d3d12: Only try to compute scaled point size for stream 0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38100>
2025-12-06 02:27:46 +00:00
Arcady Goldmints-Orlov
0df8aa940c nir: Use nir_shader_intrinsics_pass in nir_lower_io_to_scalar
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38816>
2025-12-05 22:30:22 +00:00
Val Packett
e9ad86db08 tu: support driconf option force_vk_vendor
Some games refuse to start with an unknown (to them) GPU vendor. Enable
the usual way to override the vendor ID in this driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38795>
2025-12-05 22:05:35 +00:00
Marek Olšák
c0e6b0aca0 zink/ci: update fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:41 +00:00
Marek Olšák
ae36b9e345 radeonsi: enable 64K x 64K textures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:41 +00:00
Marek Olšák
6feb3e49f8 st/mesa: remove bogus framebuffer state assertions
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
f46b6042ab radeonsi: allow 64K viewports
max_hw_screen_offset was incorrect

Acked-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
f6bf120d02 radeonsi: reject textures that don't fit in the CPU address space
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
566c666d57 radeonsi: fix a few non-critical 64-bit integer overflows
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
07d2ab29b6 st/mesa: disallow the PBO upload fragment shader
It passes image_size to the shader as int32_t.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
bd839d4bfc st/mesa: don't use the PBO GetTexImage compute shader for 64K textures
I uses uint16_t for width/height.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
72a14518ae mesa: raise MAX_TEXTURE_LEVELS to 17 to allow 64K mipmap textures
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
610bdf5e9e mesa: bump MAX_TEXTURE_RECT_SIZE, MAX_RENDERBUFFER_SIZE
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
24ba57259f mesa: remove MaxTextureMbytes, use the cap instead
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:39 +00:00
Marek Olšák
00f5f0980a mesa: use size_t for image address computations
For 64K x 64K textures.

The regular expressions used to find potentially overflowing multiplications:
    (width.*\*.*height|height.*\*.*width|stride.*\*.*height|height.*\*.*stride|row.*\*.*height|height.*\*.*row)
    (height.*\*.*depth|depth.*\*.*height|size.*\*.*depth|depth.*\*.*size)

A few things were authored by Pierre-Eric using static analysis to
detect potential overflows.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:39 +00:00
Marek Olšák
3dc2582172 mesa: merge mostly duplicated mesa_format_image_size & mesa_format_image_size64
One of them returned 32 bits, the other one returned 64 bits.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:38 +00:00
Marek Olšák
6507e8ec65 mesa: remove unused make_null_texture
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:37 +00:00
Marek Olšák
4fba07f74e mesa: remove unused mesa_store_cleartexsubimage, _mesa_store_compressed_teximage
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:37 +00:00
Marek Olšák
30b5d5f9b3 mesa: remove unused _mesa_total_texture_memory
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Pierre-Eric Pelloux-Prayer
88b6e46ee3 mesa: remove unused image debug code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
4529693e72 gallium/u_blitter: change width/height parameters to 32-bit integer
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
7621b2d56d gallium: declare pipe_resource::height0 as 32-bit integer for 64K textures
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
3c6477812e gallium: change pipe_framebuffer_state width/height to 32-bit integer
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
bc1a6b0a41 gallium: change pipe_scissor_state to 32 bit integer
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:35 +00:00
Marek Olšák
832594bbe2 panfrost: don't expose 32K textures because st/mesa doesn't support them
st/mesa only supports 16k for renderbuffers and rectangle textures,
and increasing that to 32k breaks panfrost.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:34 +00:00
Marek Olšák
193e494e6a iris: add struct iris_scissor_state because pipe_scissor_state will be changed
to use 32-bit integer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:34 +00:00
Utku Iseri
5c63446b94 panfrost: add earlyzs FPK condition for v6-
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
While v7+ checks this on HW, older architectures depend on SW to do it.

Fixes: c43882ad54 ("panfrost: Allow pixels using discard to be killed")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38522>
2025-12-05 19:08:30 +00:00
Utku Iseri
43c06b5a7a panvk: set allow_forward_pixel_to_be_killed for draws
Setting this flag is valid as long as the fragment shader doesn't have
any side effects on v7+. v6 requires an extra check for earlyzs.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38522>
2025-12-05 19:08:30 +00:00
Job Noorman
a071e91725 ir3/legalize: run dbg nop/sync sched later
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Running nop sched before opt_jump runs into issues because at that
point, we might have branches like this:

getone x
jump y

which becomes this after nop sched:

(rpt5)nop
getone x
(rpt5)nop
jump y

and then opt_jump may remove the jump leaving the block without a
terminator. This in turn causes ir3_calc_reconvergence to calculate (jp)
incorrectly.

Sync sched is fine but let's keep the two together.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38833>
2025-12-05 18:46:16 +00:00
Nick Hamilton
a4b6158260 pvr: Fix missing frees in error exit paths
Fix for deqp:
  dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38827>
2025-12-05 17:35:35 +00:00
Nick Hamilton
ca1916804e pvr: Fix staging buffer realloc usage
Fix for deqp:
  dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38827>
2025-12-05 17:35:35 +00:00
Eric R. Smith
8d39ce7bce panfrost: add benchmarking documentation
Add some notes on getting reproducible benchmark numbers on
panfrost/panthor based SoCs.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38584>
2025-12-05 17:27:47 +00:00
Yiwei Zhang
d5bf0b0df7 pan: fix pan_blend_reads_dest to consider special min/max funcs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The min/max funcs are designed to operate solely on the source and
destination colors directly, without any scaling or multiplication by a
factor.

Test: dEQP-GLES3.functional.fragment_ops.blend.* pass with enabled FPK

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38824>
2025-12-05 16:26:12 +00:00
Aleksi Sapon
ea77f60c0e llvmpipe, virgl: update CI traces
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
cc1c0b7cf4 llvmpipe: lerp rounding test
Validate the results from the three previous commits.

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
9745aab4cd llvmpipe: fix 64bit unpack on x86
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
c200b18e87 llvmpipe: use half-even rounding in lerp
This fixes a biases in texture linear sampling,
which can be very noticeable when strong lighting
is applied on mipmapped textures generated at
runtime using successive linear blitting.

More bits aren't actually needed for lerp and the
intrinsic rounding is wrong, so it is removed in
favour of a correct uniform codegen.

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
34b34c2462 llvmpipe: use half-even rounding in norm and fixed mul
The accumulation of biased results leads to images
that are slighly too bright or dark. This is particularly
noticeable in specular highlights, which magnify errors
a lot.

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
4f3de8b956 llvmpipe: doc fixes
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aitor Camacho
0104b3df41 kk: Expose shader storage image read/write without format
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Features:
- shaderStorageImageReadWithoutFormat
- shaderStorageImageWriteWithoutFormat

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38791>
2025-12-05 09:06:18 +00:00
Eric R. Smith
3ce6bcb9e8 panfrost: do not allow skipping of fragment shader when alpha-to-coverage
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When alpha to coverage is enabled we cannot allow the fragment shader to
be skipped, because the calculated alpha result is essentially a side
effect (it can cause some samples to be discarded).

This brings the OpenGL driver in line with panvk, which already has this
check in its version of fs_required().

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38794>
2025-12-05 07:55:21 +00:00
Marek Olšák
53014c0c1a winsys/amdgpu: protect driver stats changes by a mutex
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
64-bit reads are atomic (except 32-bit arch), but + and - require locking
or atomics, but 32-bit arch doesn't support 64-bit atomics.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38798>
2025-12-05 03:35:37 +00:00
Marek Olšák
0724428d55 winsys/amdgpu: retry the CS ioctl on -ENOMEM only if GDS OA is used
It's not needed otherwise.

The loop was also duplicated. This removes the second one.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38798>
2025-12-05 03:35:36 +00:00
Tomoki Imai
f56e70f230 lavapipe: Support VkDrmFormatModifierPropertiesList2EXT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This change add support VkDrmFormatModifierPropertiesList2EXT to
lavapipe driver. Previously VkDrmFormatModifierPropertiesListExt is
already supported and returns a list with one element but
VkDrmFormatModifierPropertiesList2EXT returns a empty list.

A lack of VkDrmFormatModifierPropertiesList2EXT becomes an issue
especially when the Vulkan Validation layers is enabled, it internally
uses VkDrmFormatModifierPropertiesList2EXT to confirm the
drmFormatModifierTilingFeatures is compatible to VkImageUsageFlagBits.
Without this patch it detects that the image is not compatible and
outputs warnings.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14414
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38822>
2025-12-05 01:45:56 +00:00
Job Noorman
0574bfd5f4 tu: add UBO lowering workaround for Yooka-Laylee
A vertex shader performs OOB UBO reads causing vertex corruption.
Disable UBO to const lowering to force bounds checking which fixes the
corruption.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38781>
2025-12-05 00:19:46 +00:00
Emma Anholt
66b157095c nir/shader_bisect: Allow passing in a --lo / --hi to continue a run.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Sometimes you fumble an answer, and would like to not restart from the
beginning (or just want to see the behavior of the script late in the run
if you're debugging it).  Pass in the last bad range, and you can keep
going.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38760>
2025-12-04 22:47:25 +00:00
Emma Anholt
4287bb761e nir/shader_bisect: Fix C code printing after review feedback changes.
When I added in the printed-shader and env var value both being tracked in
shaders[], it broke the C printing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38760>
2025-12-04 22:47:25 +00:00