Erik Faye-Lund
8d97f5d77e
mesa/main: add _mesa_has_texture_multisample-helper
...
This reduces the number of places we need to keep track of what
extensions enables this functionality.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:16 +00:00
Erik Faye-Lund
214fd4e40d
mesa/main: fix texture view enum checks
...
These were a bit of a mixed bag; we had some open-coded cases, and a few
overly permissive code-paths. Anyway, let's stricten this up a bit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:16 +00:00
Erik Faye-Lund
f87f6d9cd4
mesa/main: do not allow desktop enums on gles
...
These enums aren't allowed on GLES, but we would happily allow them.
Let's fix that.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:14 +00:00
Erik Faye-Lund
fcf26c951b
mesa/main: clean up invalid pname-check
...
The logic is a bit easier to follow if we list the cases where this is
supported, rather than the cases where it isn't.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
937e1d55b3
mesa/main: fix ARB_texture_float quirk
...
While ARB_texture_float is indeed supposed to disable clamping, it
should only do so on the APIs where the extension is supported.
Otherwise, we end up disabling clamping also when using GLES 1.x,
which isn't quite what we want.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
25830434c2
mesa/main: do not allow non-gles1 enums in gles1
...
These enums are not allowed in GLES1, but would be incorrectly accepted
if running on hardware capable of the functionality even in GLES1. So
let's use the helper that also considers the API, which should fix the
problem.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
879ef152db
mesa/main: use _mesa_has_Foo-helpers
...
These helpers already keep track of what API each extension is available
in. This makes the code easier to read and maintain. Let's use them.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:12 +00:00
Erik Faye-Lund
1e4f12d7ac
mesa/main: use _mesa_is_desktop_gl_compat-helper
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:11 +00:00
Erik Faye-Lund
87dda2988b
mesa/main: fixup bad indent
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097 >
2025-06-04 12:44:11 +00:00
Iago Toral Quiroga
c059c721fb
broadcom/compiler: handle moving last ubo load in the block correctly
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Before we move a UBO load to a previous location in the block we take a
reference to the instruction after it so we can continue the loop from
there, however, if the load we just moved was already the last instruction
in the block we just want to break the loop right there.
Fixes crashes with shaders from http://flightradar24.com
Fixes: 8998666de7 ("broadcom/compiler: sort constant UBO loads by index and offset")
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35333 >
2025-06-04 11:50:30 +00:00
David Rosca
e579b982b0
radv/video: Set all pic params for H264 encode refs
...
Fixes encoding B-frames with I-frame as L1 reference.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35283 >
2025-06-04 11:33:02 +00:00
David Rosca
92e99e6169
radv/video: Add radv_enc_h264/5_pic_type
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35283 >
2025-06-04 11:33:02 +00:00
Jose Maria Casanova Crespo
e7de2bd086
v3d: Remove struct v3d_surface and create/destroy surface functions
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
5e4b66e226
v3d: Stop calling deprecated util_framebuffer_init
...
We remove all v3d usages of create_surface hooks.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/13262
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
680b6d0e9b
v3d: Remove separate_stencil from v3d_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
46ef49ab55
v3d: Remove internal_type and internal_bpp from v3d_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
735cf1cb78
v3d: Remove padded_height_of_output_image_in_uif_blocks from v3d_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:31 +00:00
Jose Maria Casanova Crespo
1fe0327255
v3d: Remove tiling from v3d_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:31 +00:00
Jose Maria Casanova Crespo
b3228e0648
v3d: Remove never used offset from v3d_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:30 +00:00
Jose Maria Casanova Crespo
c13135f7c3
v3d: Remove rt_format from v3d_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:30 +00:00
Jose Maria Casanova Crespo
46b96e0079
v3d: Remove swap_rb logic from v3d_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288 >
2025-06-04 11:18:29 +00:00
Georg Lehmann
1c4070f3e9
nir/opt_if: limit rewrite_uniform_uses iand recursion
...
https://github.com/doitsujin/dxvk/issues/4970 has a shader
where unrolled loops caused large iand chains and if we don't
limit this we won't finish compiling in reasonable time.
Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35312 >
2025-06-04 10:49:05 +00:00
Georg Lehmann
eaeaf9554d
nir/opt_if: don't replace constant uses with other uniform values
...
If constant folding wasn't run, this could replace constant uses with different
constants.
Additional, it could also create worse code for "if (subgroupXor(1) == 1)".
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13281
Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35312 >
2025-06-04 10:49:05 +00:00
Jose Maria Casanova Crespo
27279b2cbe
vc4: Remove struct vc4_surface and create/destroy surface functions
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278 >
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
ba950f9556
vc4: Stop calling deprecated util_framebuffer_init
...
We remove all vc4 usages of create_surface hooks.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/13262
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278 >
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
40f3dac716
vc4: Remove tiling from vc4_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278 >
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
51bc2e607f
vc4: Remove offset from vc4_surface
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278 >
2025-06-04 10:31:49 +00:00
Lionel Landwerlin
79498a0849
brw: fix brw_nir_fs_needs_null_rt helper
...
In 9b42215e0d ("iris: ensure null render target for specific cases") I
wrongly assumed that writing gl_SampleMask would only happen in
multisampled cases.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9b42215e0d ("iris: ensure null render target for specific cases")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13292
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35313 >
2025-06-04 10:10:38 +00:00
Samuel Pitoiset
226b0e28db
nir: generalize bitfield insert/extract sizes
...
Original patch from Alyssa Rosenzweig
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35209 >
2025-06-04 09:37:53 +00:00
Samuel Pitoiset
2474118a06
spirv: disable mediump for bitfield insert/extract
...
This prevents a regression with the next change that generalizes
bitfield insert/extract sizes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35209 >
2025-06-04 09:37:53 +00:00
Samuel Pitoiset
098c15bfc9
radv: use paired shader registers for graphics on GFX12
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Loosely based on RadeonSI.
This is supposed to be faster because parsing the packet header seems
to be the main bottleneck on GFX12.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35282 >
2025-06-04 09:17:51 +00:00
Samuel Pitoiset
c8b3c92a3e
radv: add macros for paired shader registers on GFX12
...
Imported from RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35282 >
2025-06-04 09:17:51 +00:00
Samuel Pitoiset
c8f9e0fb05
radv: add a new dirty state for emitting tess user SGPRs
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35282 >
2025-06-04 09:17:51 +00:00
Georg Lehmann
c27cdaac70
radv: expose scalarBlockLayout on GFX6
...
Scalar block layout doesn't allow anything that our memory load/store vectorizer
couldn't create on its own. So I assume whatever reason there was to only
expose this feature on GFX7+ was incorrect or ended up being fixed.
Passes vkcts in CI on tahiti.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35279 >
2025-06-04 08:49:57 +00:00
Samuel Pitoiset
c26c9c6296
radv: set radv_zero_vram=true for GPUScore: Breaking limit
...
To workaroung application bugs that can cause GPU hangs.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11495
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35308 >
2025-06-04 09:25:18 +02:00
Karol Herbst
fa94b1b29c
rusticl: check the returned pointer of mmap
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Prior Linux 4.17 MAP_FIXED_NOREPLACE might not be respected and might
return a pointer different than the requested one.
Fixes: da4de8d7e3 ("rusticl: add support for coarse-grain buffer SVM")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35286 >
2025-06-04 06:28:39 +00:00
Karol Herbst
9b28067b59
rusticl: move unmap out of debug_assert_eq statement
...
Fixes: da4de8d7e3 ("rusticl: add support for coarse-grain buffer SVM")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35286 >
2025-06-04 06:28:39 +00:00
Karol Herbst
931ec3e954
rusticl: fix compilation on non Linux systems
...
Thanks to @jbeich to validate this on FreeBSD!
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13278
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35286 >
2025-06-04 06:28:39 +00:00
Lionel Landwerlin
a51d061c00
brw: don't generate invalid instructions
...
0e3e5146cf ("intel/brw: Use correct instruction for value change check
when coalescing") enabled some new cases that exposed a pre-existing
bug that would turn something like this :
mul.sat(16) %789:F, %787:F, %788:F
mov.g.f0.0(16) %790:F, %789:F
(+f0.0) sel(16) %800:UD, %790:UD, 0u
into this :
mul.sat(16) %790:F, %787:F, %788:F
mov.g.f0.0(16) null:F, null<8,8,1>:F
(+f0.0) sel(16) %800:UD, %790:UD, 0u
The mov[] array can contain the same instruction because it's repeated
for each REG_SIZE writes and a SIMD16 instruction will write 2
REG_SIZE.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0e3e5146cf ("intel/brw: Use correct instruction for value change check when coalescing")
Cc: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35276 >
2025-06-04 06:08:26 +00:00
Caio Oliveira
2bb9b94c4c
brw/disasm: Don't print src1 information for SEND gather
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There's always only the ARF scalar register source, so don't
bother printing other information that won't be used. Matches
the assembler code.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35297 >
2025-06-03 22:52:39 +00:00
Mauro Rossi
7e523b4400
Revert "android: Link with libc++fs up to SDK 35"
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 84cae30f0a .
Conflicts:
android/Android.mk
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35208 >
2025-06-03 22:01:01 +00:00
Mauro Rossi
9fd6bae3c4
llvmpipe: Use mkdir instead of std::filesystem::create_directory on Android
...
libc++fs symbols are not available to vendor modules up to Android 15
this patch allows to build llvmpipe as module for Android 14 and older
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35208 >
2025-06-03 22:01:01 +00:00
Mauro Rossi
4aafb5fcc3
llvmpipe: Define LP_NIR_SHADER_DUMP_DIR differently on Android
...
Reference Android temporary path /data/local/tmp is used for Android builds
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35208 >
2025-06-03 22:01:01 +00:00
Caio Oliveira
542836afe5
intel: Don't require dpas_intel src2 to match destination
...
With upcoming configurations, the number of elements in the src2
slice might not match the destination.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35301 >
2025-06-03 21:31:23 +00:00
Eric Engestrom
b83f406c91
ci: inline the only anchor reference that was on its own line
...
The way yaml works, this makes no difference in practice, it's just to be more consistent.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285 >
2025-06-03 20:58:51 +00:00
Eric Engestrom
50dbb6c31a
ci: improve explanation of the pre-merge/merge-request pipelines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285 >
2025-06-03 20:58:51 +00:00
Eric Engestrom
f2f8a1cb3e
ci: improve name of merge-request pipelines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285 >
2025-06-03 20:58:50 +00:00
Eric Engestrom
730c938a46
ci: improve name of fork pipelines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285 >
2025-06-03 20:58:50 +00:00
Eric Engestrom
f29524c1de
ci: improve names of push-to-upstream-{default,staging}-branch pipelines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285 >
2025-06-03 20:58:50 +00:00
Marek Olšák
942b565f34
mesa: strengthen the condition that triggers generating VS with edge flags
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Check the cull face state to see if polygon mode has any effect.
It could happen that polygon mode is GL_LINE, but that face is always
culled, in which case polygon mode has no effect, thus edge flags
have no effect either.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35314 >
2025-06-03 19:49:21 +00:00