Commit graph

212744 commits

Author SHA1 Message Date
Seán de Búrca
53040a1600 rusticl/kernel: remove mutexes from kernel structure
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37354>
2025-09-22 10:57:46 +00:00
Seán de Búrca
c440beb171 rusticl/kernel: add Kernel::mut_ref_from_raw()
The OpenCL spec indicates that functions which modify `cl_kernel` are
not thread-safe, allowing us to handle those functions with standard
mutability.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37354>
2025-09-22 10:57:46 +00:00
Ali, Nawwar
c75cb1233c amd/vpelib: add FL capabilitie and lut container size
[WHY]
get a clear definition of fastload support and actual 3d lut
container size

[HOW]
Added related code

Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Nawwar Ali <Nawwar.Ali@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37504>
2025-09-22 10:37:22 +00:00
Nagulendran, Iswara
1cd047c958 amd/vpelib: Handle Destination Rect with zero dimensions
[Why]
Route case where dest rect has
zero dimensions to perform background
color fill.

Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Iswara Nagulendran <Iswara.Nagulendran@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37504>
2025-09-22 10:37:22 +00:00
Assadian, Navid
4c96e8c352 amd/vpelib: Add new colors to visual confirm
[WHY]
Newly added formats require distinct colors for proper differentiation.

[HOW]
Add new colors, pairwise distinguishable for newly added formats.

Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Navid Assadian <Navid.Assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37504>
2025-09-22 10:37:21 +00:00
swscm, z1
d79665066d amd/vpelib: Ensures type-safe comparison for callback assignment
[WHY & How]
Ensures type-safe comparison for the sys_event callback assignment by
casting the NULL constant to the appropriate function pointer type.

Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Muhammad Ansari <Muhammad.Ansari@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37504>
2025-09-22 10:37:21 +00:00
Zhao, Jiali
237ab0778e amd/vpelib: Create Function to Check for Blending Feature
[HOW]
Created check_blending_support function and condition to check for
readable purpose

Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Zhao, Jiali <Jiali.Zhao@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37504>
2025-09-22 10:37:21 +00:00
Karol Herbst
6f41c62720 rusticl/mesa: make PipeScreen refcounted
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37377>
2025-09-22 10:16:13 +00:00
Karol Herbst
501f59e159 rusticl/mesa: make PipeScreen transparent
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37377>
2025-09-22 10:16:13 +00:00
Karol Herbst
f7fcd7ed5d rusticl/mesa: rework Context creation
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37377>
2025-09-22 10:16:12 +00:00
Karol Herbst
6a71ecaad7 rusticl/mesa: add PipeScreen::pipe
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37377>
2025-09-22 10:16:11 +00:00
Karol Herbst
b67be5d829 rusticl/util: make ThreadSafeCPtr Copy, Clone and transparent
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37377>
2025-09-22 10:16:11 +00:00
Qiang Yu
d52452a486 glsl: allow barrier builtin functions for mesh shader
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:50 +00:00
Qiang Yu
9ffbf9f96b glsl: translate mesa stage for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:50 +00:00
Qiang Yu
ecb1322737 glsl: flat qualifier is not needed for per primitive IO
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:50 +00:00
Qiang Yu
521aa2e010 glsl: no xfb buffer qualifier for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:50 +00:00
Qiang Yu
8c58bd5acf glsl: lower shared and task playload for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:49 +00:00
Qiang Yu
2b76809dfc glsl: handle explicit location for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:49 +00:00
Qiang Yu
bd365d1d2a glsl: handle mesh shader when optimize varying
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:49 +00:00
Qiang Yu
6176b85d2c glsl: add mesh pipeline varying linkage
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:48 +00:00
Qiang Yu
6e41854f1d glsl: pack varying limit check code into functions
To be shared with mesh shader linkage.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:48 +00:00
Qiang Yu
59f1186af2 glsl: pack vertex pipeline varying linkage into a function
No functional change, prepare for add mesh pipeline varying
linking.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:48 +00:00
Qiang Yu
c6b24b4cc2 glsl: disable mesh shader output remove when separate shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:47 +00:00
Qiang Yu
38d385673f glsl: validate MS/FS interstage in/out variable type
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:46 +00:00
Qiang Yu
6da726c59c glsl: handle per primitive varying when link
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:46 +00:00
Qiang Yu
faa9fea7d2 glsl: validate MS/FS interstage in/out block
Mesh shader output block is always in array type, need
to validate if the mesh shader output array element type
match the fragment shader input type.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:45 +00:00
Qiang Yu
ae3c0ac9e9 glsl: gl_nir_link_glsl handle mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:45 +00:00
Qiang Yu
5b87ef9560 glsl: nir_build_program_resource_list support mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:44 +00:00
Qiang Yu
30fde159eb glsl: add mesh shader builtin functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:44 +00:00
Qiang Yu
69127db647 glsl: handle mesh shader output block
Mainly redeclare of gl_MeshPerVertexEXT and gl_MeshPerPrimitiveEXT.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:43 +00:00
Qiang Yu
0e26c48d79 glsl: assign mesh shader output variable array size
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:42 +00:00
Qiang Yu
6a2bf2024d glsl: add mesh shader builtin outputs
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:42 +00:00
Qiang Yu
c260aa3928 glsl: add input builtin variables for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:42 +00:00
Qiang Yu
691601e89e glsl: handle work group in layout for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:41 +00:00
Qiang Yu
611370965f glsl: handle max_vertices/primitives for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:40 +00:00
Qiang Yu
de22e59231 glsl: handle mesh shader primitive type layout qualifier
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:39 +00:00
Qiang Yu
c2a35ae70d glsl: allow shared variables in task and mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:38 +00:00
Qiang Yu
6415cec230 glsl: handle PerPrimitiveEXT qualifier
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:37 +00:00
Qiang Yu
b2e9a6d935 glsl: handle taskPayloadSharedEXT variables
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:36 +00:00
Qiang Yu
2b8c273322 glsl: prepare parse state for mesh shader
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
2025-09-22 02:19:35 +00:00
Qiang Yu
93024ea247 radeonsi: hide real modifier export behind AMD_DEBUG
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some applications are not ready to handle multi plane
modifiers.

User who want this feature can use AMD_DEBUG=export_modifier
to enable it again.

Fixes: 0a266f0256 ("radeonsi: really support eglExportDMABUFImageQueryMESA")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13917
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37433>
2025-09-22 01:51:21 +00:00
Qiang Yu
996c0af482 radeonsi: fix use aco/llvm debug options
They should be moved to shader options.

Fixes: 5c92fe45a1 ("radeonsi: support more than 64 options for AMD_DEBUG")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37433>
2025-09-22 01:51:21 +00:00
Rob Clark
3a4b3322d4 freedreno/decode: checkreg handling for bitsize/stride
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The initial version was not accounting for reg64 vs reg32, or array
stride.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37502>
2025-09-21 08:27:00 -07:00
Rob Clark
159d0596c4 freedreno/registers: Fix x_CONTEXT_SWITCH_GFX_PREEMPTION_SAFE_MODE
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The HLSQ version only existed in a6xx.  And the SP one had the wrong
offset.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37484>
2025-09-20 16:52:22 +00:00
Rob Clark
897a47602a freedreno/registers: Remove conflicting RBBM regs
These are the same as a6xx, so just keep the declarations without
variants attribute.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37484>
2025-09-20 16:52:21 +00:00
Rob Clark
68e5f150e3 freedreno/decode: Add test to check for conflicting regs
Add a tool to check for conflicting/overlapping register definitions.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37484>
2025-09-20 16:52:21 +00:00
stefan11111
8e000cecac glx: Fix segfault when Nvidia PRIME render offload is enabled, but not used
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11719

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37342>
2025-09-20 08:43:00 +00:00
Eric Engestrom
19dc279d43 zink/ci: drop gbm override now that debian has a usable xorg
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35853 gave us
a debian package which has `--disable-thread-safety-constructor` removed,
fixing this bug.

The `blender-demo-ellie_pose.trace` and `counterstrike-v2.trace` updates
are because there's a rectangle at the top (for blender, window title
bar I expect) or on the sides (counterstrike, padding for image ratio)
which renders grey in gbm and black in xorg.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37437>
2025-09-20 06:59:01 +00:00
Roland Scheidegger
b0be900f93 llvmpipe: implement GL_ARB_sample_locations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Needing the positions both in the scene for rasterization (in fixed point)
and in the fs (as floats) is a bit awkward, for now just put it in fs key.
Otherwise pretty straight forward.

Reviewed-by: Michal Krol <michal.krol@broadcom.com>
Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37181>
2025-09-20 01:57:05 +00:00
Roland Scheidegger
60924b4819 gallium,mesa/st: reverse logic for y flip for programmable sample locations
mesa/st flips y coordinates if fbo orientation is Y_0_BOTTOM (essentially
user fbos), and all 3 gallium drivers supporting the feature then
unconditionally reverse this flip. llvmpipe wants to support this as well,
and it would have to do the flip too, and it's actually problematic for
lavapipe, since then lavapipe would have to flip as well, which means that
we'd lose the ability to set y positions to 0 (as the flip with the 4 bit
values does 16-val), and vulkan requires the minimum to be 0.
Hence, reverse this and flip when fbo orientation is Y_0_TOP. I don't actually
pretend to know if this is correct or if just no flipping should occur, but at
least this is consistent with how default sample locations are reported by mesa
via glGetMultisamplefv (which does y flip with the values it gets via
pipe->get_sample_position() if it's a winsys fb).

Reviewed-by: Michal Krol <michal.krol@broadcom.com>
Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37181>
2025-09-20 01:57:04 +00:00