Marek Olšák
ce0d213ac8
radeonsi: don't cull front/back faces in the hw if the shader culls them
...
This reduces the number of context rolls by not setting
the CULL_FRONT/CULL_BACK register fields.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:54 +00:00
Marek Olšák
bafab3324e
radeonsi: reflect blitter VS in si_context::num_vertex_elements
...
Set it to 0 if the VS doesn't use VBOs. This fixes an assertion failure.
Fixes: 7bf5d2ce75
- radeonsi: add assertion requiring binding vertex elements before vertex_buffers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12698
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:53 +00:00
Marek Olšák
c662fcfa94
radeonsi: lower IO only if io_lowered == false
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:53 +00:00
Marek Olšák
53ae218dcd
radeonsi: use the restrict keyword for draw parameters
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:53 +00:00
Marek Olšák
95a9df811a
radeonsi: enable Z/S caching in GL2 by default except FurMark
...
This improves performance for several workloads.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:52 +00:00
Marek Olšák
36ccc300d8
radeonsi: enable NGG culling when the shader writes the viewport index
...
Only W and face culling is enabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:52 +00:00
Marek Olšák
356f5b2d2e
radeonsi: move buffer reallocation to a separate function
...
to be used later
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:51 +00:00
Marek Olšák
0f9c972453
radeonsi: use si_is_buffer_idle everywhere
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:50 +00:00
Marek Olšák
c96f7a079f
winsys/amdgpu: don't use 32-bit address space for IBs
...
We run out of the 32-bit address space and then we crash.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:50 +00:00
Marek Olšák
e468321bee
ac/cmdbuf: rework CB/DB cache controls for better perf
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:49 +00:00
Marek Olšák
73175ec0b6
ac/cmdbuf: split meta_*_policy to dcc and htile variables
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:49 +00:00
Marek Olšák
d2141e6751
ac/nir/ngg: add an option to skip viewport-based culling
...
We can do W and face culling when we have multiple viewports, but not
frustum and small prim culling because those are dependent on the viewport.
When a shader writes the viewport index, the new option allows skipping
viewport-based culling while keeping W and face culling.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:48 +00:00
Marek Olšák
d429e35169
ac/nir/cull: extract a helper calling accept_func
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:48 +00:00
Marek Olšák
177c9b173e
Revert "ac/nir: clamp vertex color outputs in the right place"
...
This reverts commit b3fc49686e
.
It was a rebase failure.
Fixes: b3fc49686e
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:47 +00:00
Marek Olšák
e99efe7164
ac,radeonsi: don't set num_slots/src/dest_type/write_mask when they're set automatically
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:47 +00:00
Marek Olšák
96722aeda3
ac/gpu_info: use max_good_cu_per_sa for computation of max_scratch_waves
...
every CU should be able to use scratch
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:46 +00:00
Rhys Perry
66130a51d3
radv: don't assume WGP mode in radv_get_max_waves
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33873 >
2025-03-06 20:47:20 +00:00
Rhys Perry
17abc5f326
radv: improve radv_get_max_waves for multi-wave workgroups with LDS
...
LDS isn't divided among SIMDs, and it doesn't make sense to launch a
fraction of a compute workgroup.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33873 >
2025-03-06 20:47:20 +00:00
Connor Abbott
076f52285c
tu: Remove useless prim_order state merging
...
We already merged it below, when the library has both fragment output
interface and fragment shader state (which is when we'd compute it
anyway). Setting it twice is probably harmless but also confusing and
useless.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33902 >
2025-03-06 20:24:22 +00:00
Connor Abbott
413947e2de
tu: Fix static blend bandwidth calculation
...
We were never setting the valid bit, so would never happen. If it did
happen, we forgot to merge in the bandwidth calculation from child
libraries.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33902 >
2025-03-06 20:24:22 +00:00
Loïc Minier
c36cd32345
freedreno: check if GPU supported in fd_pipe_new2
...
fd_pipe_new2 can segfault when trying to set the is_64bit flag on new
pipes. This can happen when the current GPU is not be listed in the
fd_dev_recs table because it's not supported by mesa, but is supported by
the kernel.
Add a helper function to test if the current GPU is in the supported table,
and use it in fd_pipe_new2.
Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33830 >
2025-03-06 20:00:02 +00:00
Mark Collins
0342d34bdb
tu/kgsl: Remove zero CB queue submission fast path
...
The fast path for kgsl_queue_submit when there are no command buffers
and only sync objects led to breakage for two reasons:
* The fast path was not properly handling duplication of the merged sync
object assigned to signalled `kgsl_syncobj`(s), which could lead to
multiple `kgsl_syncobj`s owning the same FD and consequently issues
such as double close of that FD leading to UB. This is fixed by moving
to the slow path as it always produces a timestamp sync object which
can be trivially duplicated.
* The Vulkan specification requires that drivers strictly follow the
order of submission of command buffers and consequently the order of
semaphore signal/wait operations. Since no submission was being made
to the kernel, subsequent submissions could be executed without waiting
for wait/signal operations from previous submissions to complete.
As both of these issues are fixed by moving to the slow path, this patch
removes the fast path in favor of the more correct slow path.
Signed-off-by: Mark Collins <mark@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33894 >
2025-03-06 19:40:41 +00:00
Pavel Ondračka
87a90a3b38
r300: fix temps counting for shader-db stats
...
RC_FILE_INPUT is pretty much just a RC_FILE_TEMPORARY with an initial
value in it. So we regalloc it the same way we do normal temps, however
for unknown reasons (probably to have a bit more readable shader dumps)
we still keep the RC_FILE_INPUT type even though its the same as
temporary. This is handled correctly when emitting the machine code,
however, it was not taken into account in shader stats.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33817 >
2025-03-06 19:12:24 +00:00
Martin Krastev
15e0e53b4d
svga/ci: enable vmware farm
...
Farm was down due to infra outage.
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33919 >
2025-03-06 18:47:49 +00:00
Yiwei Zhang
6868212774
venus: fix a memory corruption in query records recycle
...
The free list must be re-initialized. Found the bug while running:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.device_compability_khr.gpu_built.top
where it invokes VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT to purge
the cmd pool resources, and the next alloc still gets cache hit with the
"empty" list.
Fixes: e2c4bafccc
("venus: free query batches for VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33908 >
2025-03-06 18:25:20 +00:00
Ruijing Dong
a3c859d9f3
radeonsi/vcn: vcn5 roi fix
...
Compared to vcn4, vcn5's implementation has changed.
It needs to apply the qp_delta directly instead of
dividing by 5.
Reviewed-by: David Rosca <david.rosca@amd.com >
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33886 >
2025-03-06 17:59:22 +00:00
Marek Olšák
171ee1797b
glapi: remove extension definitions that will likely never be implemented
...
If somebody needs these in the future, they can add them back, but a lot
of these extensions are very old (SUN, SGI, ...).
No code is added, though git diff is having trouble detecting that.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:23 +00:00
Marek Olšák
0a330b1660
egl: use the current dispatch to execute glFlush instead of get_proc_address
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:23 +00:00
Marek Olšák
8bb7033095
glx: fix build with -Dlegacy-x11=dri2
...
Fixes: 71bb62e3c9
- glx: stop exporting GL functions from libGLX_mesa.so
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:23 +00:00
Marek Olšák
0cebfb15b5
glapi: remove duplicated generated header glapitable.h
...
mesa/main/dispatch.h is exactly the same. We generated the same header
twice.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:23 +00:00
Marek Olšák
db7e49d5ff
glapi: remove static glapi (it's dead code now)
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:22 +00:00
Marek Olšák
fefb1a6fb3
meson: remove with_shared_glapi variable (it's always true)
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:22 +00:00
Marek Olšák
fde53ac020
glx/xlib: switch glapi from static to shared (which is also static)
...
Shared glapi doesn't make GL functions globally available, so we have
to use the dispatch API.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:22 +00:00
Marek Olšák
e5c76088e9
meson: never use static glapi because shared glapi is also static and better
...
Shared glapi is already statically linked with libmesa (src/mesa),
and some parts are statically linked with loaders.
Static glapi will be removed after this is merged.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:22 +00:00
José Roberto de Souza
f0f896ef21
iris: Replace BO_ALLOC_* macros by a enum
...
This changes makes it strongly typed and gives more context.
No changes in behavior expected here.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:04 +00:00
José Roberto de Souza
a13a6656dd
intel: Add function to check if PXP is supported in Xe KMD
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:04 +00:00
José Roberto de Souza
63861472ff
iris: Add support to create protected bo and protected exec_queue in Xe KMD
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:04 +00:00
José Roberto de Souza
e146e573f7
anv: Add support to create protected bo and protected exec_queue in Xe KMD
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:03 +00:00
José Roberto de Souza
a99d90d015
anv: Move code adding protected memory type to common code
...
Xe KMD now has support for protected memory, so lets move it
to common code.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:03 +00:00
José Roberto de Souza
187e65002f
intel: Sync xe_drm.h
...
Sync with:
commit 33e26f3544a558e7476eb221ff33173759b3a116
Merge: 16893dd23f6d1 b7b68c6e36776
Author: Dave Airlie <airlied@redhat.com >
Merge tag 'drm-xe-next-2025-02-24' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:03 +00:00
José Roberto de Souza
4860532f49
anv: Remove protected memory support from compute queue
...
CCS don't support MI_SET_APPID instruction, that might be the reason
some tests protected memory tests fail on CCS.
Re-enable it if a workaround/solution is found.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:03 +00:00
José Roberto de Souza
008ac818ba
intel/common: Retry GEM_CONTEXT_CREATE when PXP have not finished initialization
...
If PXP initialization is not completed and application requested a
protected context the GEM_CONTEXT_CREATE will wait up to 250ms for
PXP to finish initialization but if that do not happens it will
return a error and set errno to EIO.
This patch add the missing retry handling.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723 >
2025-03-06 16:25:03 +00:00
Karol Herbst
ce60f47e96
rusticl/program: fix building kernels
...
We ended up with duplicates, but also rebuilt the same kernel over and
over again for multi dev builds.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892 >
2025-03-06 16:02:43 +00:00
Karol Herbst
57a7e86aa9
rusticl/program: rework build_nirs so it only touches devices we care about
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892 >
2025-03-06 16:02:43 +00:00
Karol Herbst
241279ac2c
rusticl/program: loop over all devices inside Program::build
...
We want to build the kernels once and atm we are doing it several times
for each device.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892 >
2025-03-06 16:02:43 +00:00
Karol Herbst
e434ce1559
rusticl/program: pass options by reference
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892 >
2025-03-06 16:02:43 +00:00
Karol Herbst
b2f3933c8d
rusticl/program: implement CL_INVALID_PROGRAM_EXECUTABLE check in clGetProgramInfo
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892 >
2025-03-06 16:02:43 +00:00
Rob Clark
ee787b64ed
freedreno: Wait for imported syncobj fences to be available
...
Waiting on a fence created from an imported syncobj needs wait for the
fence_fd to become available
Fixes piglit tests added in https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/992
Fixes the following issue for freedreno: #12650
Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724 >
2025-03-06 15:12:31 +00:00
Rob Clark
fac2c4af1b
tc: Add missing tc_set_driver_thread()
...
Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724 >
2025-03-06 15:12:31 +00:00
Rebecca Mckeever
6df35783cc
panvk: Enable shaderStorageImageExtendedFormats
...
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33459 >
2025-03-06 14:45:17 +00:00