Commit Graph

208591 Commits

Author SHA1 Message Date
Rob Clark
52f79561e3 freedreno: Misc whitespace cleanups
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36075>
2025-07-13 17:16:50 +00:00
M Henning
ee3d6aa87d nv50_ir: Remove dead variable
Nothing ever read from fixedReg, so drop it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24541>
2025-07-13 15:27:33 +00:00
M Henning
e573440a5d nv50_ir_ra: Don't coalesce mixed constraints
It's difficult to handle nodes that have both fixed reg constraints and
compMasks. We may be able to handle some of these in the future, but
skip them for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24541>
2025-07-13 15:27:33 +00:00
M Henning
b920ff26ee nv50_ir_ra: Use propagated compMask for reg offset
Previously, we would only offset register ids for LValues that are
directly used in a merge/split instruction, but this is incorrect.
We instead need to apply the offset to all LValues that compMask
has been propagated to. By calcuating this from compMask instead
of figuring it out a second time, we fix that issue and also manage
to simplify the code a bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24541>
2025-07-13 15:27:32 +00:00
M Henning
a46942ce04 nv50_ir_ra: Add constraint movs for split-of-split
This handles this case similarly to the merge-of-merge fix from c86563c2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24541>
2025-07-13 15:27:32 +00:00
M Henning
7e653b2eb1 nv50_ir_ra: Remove an assign to lval->compMask
This code previously stored two rather different masks in compMask:
 1. from merge/splits (calculated in makeCompound), and
 2. in the join root for whatever register was assigned

Since we were already calculating the second type as intfMask where it
is used in checkInterference(), change that function to unconditionally
use intfMask and only use compMask for the first type.

This is functionally equavalent and keeps the types of masks separate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24541>
2025-07-13 15:27:31 +00:00
Karol Herbst
facb048cdb nouveau: move util_framebuffer_init into the driver
It will get cleaned up later. Maybe.

Also stop setting the context or the reference. It's all dead code now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35806>
2025-07-13 15:12:48 +00:00
Karol Herbst
5a91e04fa4 nvc0: remove dead surface tracking code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35806>
2025-07-13 15:12:48 +00:00
Karol Herbst
2a8779f06f nv50,nvc0: Set the texture for 3D blitter surfaces
This fixes accesses to unitialized data inside pipe_surface_width.

Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35806>
2025-07-13 15:12:48 +00:00
Karol Herbst
c96003305e nak: keep phis vectorized if they fit into a register
Totals:
CodeSize: 936990448 -> 936472720 (-0.06%); split: -0.07%, +0.01%
Number of GPRs: 3539184 -> 3539100 (-0.00%); split: -0.00%, +0.00%
SLM Size: 870756 -> 864200 (-0.75%); split: -0.82%, +0.07%
Static cycle count: 224606486 -> 224173176 (-0.19%); split: -0.21%, +0.02%
Spills to memory: 66542 -> 60425 (-9.19%); split: -9.90%, +0.71%
Fills from memory: 66542 -> 60425 (-9.19%); split: -9.90%, +0.71%
Spills to reg: 68126 -> 68173 (+0.07%)
Fills from reg: 80583 -> 80659 (+0.09%)
Max warps/SM: 3666280 -> 3666276 (-0.00%); split: +0.00%, -0.00%

Totals from 200 (0.23% of 87622) affected shaders:
CodeSize: 5705936 -> 5188208 (-9.07%); split: -10.75%, +1.67%
Number of GPRs: 8160 -> 8076 (-1.03%); split: -1.78%, +0.75%
SLM Size: 40432 -> 33876 (-16.21%); split: -17.76%, +1.54%
Static cycle count: 2163142 -> 1729832 (-20.03%); split: -21.97%, +1.94%
Spills to memory: 30113 -> 23996 (-20.31%); split: -21.88%, +1.57%
Fills from memory: 30113 -> 23996 (-20.31%); split: -21.88%, +1.57%
Spills to reg: 3438 -> 3485 (+1.37%)
Fills from reg: 3836 -> 3912 (+1.98%)
Max warps/SM: 9064 -> 9060 (-0.04%); split: +0.26%, -0.31%

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35604>
2025-07-13 10:39:53 +00:00
Karol Herbst
cd79b8f798 nak: stop lowering all phis to 32 bits.
We don't support anything than 32 bit registers, so consuming 8 or 16 bit
phis caused NAK to insert a bunch of prmt instructions to/from 32 bit
registers per phi component. This effectively increased GPR usage in
shaders making heavy use of 16 bit vectors across phis.

Totals:
CodeSize: 938024464 -> 936990448 (-0.11%)
Number of GPRs: 3539320 -> 3539184 (-0.00%); split: -0.00%, +0.00%
SLM Size: 876376 -> 870756 (-0.64%)
Static cycle count: 224999103 -> 224606486 (-0.17%); split: -0.17%, +0.00%
Spills to memory: 77413 -> 66542 (-14.04%)
Fills from memory: 77413 -> 66542 (-14.04%)
Spills to reg: 68211 -> 68126 (-0.12%)
Fills from reg: 80596 -> 80583 (-0.02%)
Max warps/SM: 3666268 -> 3666280 (+0.00%); split: +0.00%, -0.00%

Totals from 550 (0.63% of 87622) affected shaders:
CodeSize: 17505040 -> 16471024 (-5.91%)
Number of GPRs: 32938 -> 32802 (-0.41%); split: -0.45%, +0.04%
SLM Size: 55456 -> 49836 (-10.13%)
Static cycle count: 5032394 -> 4639777 (-7.80%); split: -7.81%, +0.01%
Spills to memory: 42584 -> 31713 (-25.53%)
Fills from memory: 42584 -> 31713 (-25.53%)
Spills to reg: 4285 -> 4200 (-1.98%)
Fills from reg: 4279 -> 4266 (-0.30%)
Max warps/SM: 19492 -> 19504 (+0.06%); split: +0.08%, -0.02%

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35604>
2025-07-13 10:39:53 +00:00
Karol Herbst
7e1d1e2caa nak: Provide our own callback to nir_lower_phis_to_scalar
The default callback of nir_lower_phis_to_scalar internally uses
is_phi_src_scalarizable to determine wether to scalarize a phi vector,
however not doing that helps NAK.

shader-db stats on ga102:

Totals:
CodeSize: 938039520 -> 938024464 (-0.00%); split: -0.00%, +0.00%
SLM Size: 878396 -> 876376 (-0.23%)
Static cycle count: 225000863 -> 224999103 (-0.00%); split: -0.00%, +0.00%

Totals from 140 (0.16% of 87622) affected shaders:
CodeSize: 1353760 -> 1338704 (-1.11%); split: -1.42%, +0.31%
SLM Size: 8160 -> 6140 (-24.75%)
Static cycle count: 316178 -> 314418 (-0.56%); split: -0.71%, +0.16%

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35604>
2025-07-13 10:39:52 +00:00
Yiwei Zhang
c16e786c75 vulkan/wsi: drop unused common wsi helpers
Below are dropped:
- wsi_common_get_image
- wsi_common_bind_swapchain_image

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36095>
2025-07-13 07:49:10 +00:00
Yiwei Zhang
b2a880b85e hasvk: adopt wsi_common_get_memory
Similar to anv.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36095>
2025-07-13 07:49:10 +00:00
Yiwei Zhang
c647c422db hasvk: avoid leaking private binding for aliased wsi image
This time for hasvk and is the same with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35893

Aliased wsi image has to share the same private binding with the
original wsi image for memory consistency. If the private binding
exists, it needs to be released before being overridden.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36095>
2025-07-13 07:49:10 +00:00
Yiwei Zhang
002235f64c anv: adopt wsi_common_get_memory
It's non-trivial to drop the private binding or transfer ownership to
the bound memory. So we track the image in the device memory for
dedicated allocation so that wsi image alias can find the original wsi
image from the wsi memory.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36095>
2025-07-13 07:49:09 +00:00
Gert Wollny
5d4f59a3ed r600/sfn: catch remaining indirect inputs when lowering GS input arrays
Lowering IO to temps leads to problems with RA with piglit
   spec@glsl-1.50@execution@geometry@max-input-component

Not doing so results in an assertion failure with piglit
   spec@glsl-1.50@execution@geometry@dynamic_input_array_index

because not all indirect IO access is lowered. Using
nir_lower_indirect_derefs works around this limitations.

v2: Fix formatting (Patrick Lerda)

Fixes: 1186c73c6 (r600: implement gs indirect load_per_vertex_input)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36051>
2025-07-12 20:58:29 +00:00
Gert Wollny
00b752565c r600/sfn: Add support for indirect VS input read
I've overlooked that unconditionallowering of indirect VS
inputs had been dropped. Since VS inputs are stored in
consecutive registers one can implement the indirect access
without additional lowering, it just needs a proper declararion
of the registers forming the array.

v2: - Fix formatting (Patrick Lerda)
    - Use allocator for std::map to avvoid menory leak
      (Patrick Lerda)

Fixes: a43bfffe1e
    r600: Correct nir_indirect_supported_mask

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36051>
2025-07-12 20:58:29 +00:00
Caio Oliveira
ea9deafff4 spirv: Add more restrictions around Blocks
And take advantage of the new restriction to skip the ptr_as_array case
for Blocks.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36049>
2025-07-12 14:46:23 +00:00
Loïc Molinari
ee555e9f75 panfrost: Test pan_afbc_payload_layout_packed()
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:14 +00:00
Loïc Molinari
49efe0e6c0 panfrost: Optimize pan_afbc_payload_layout_packed() for AArch32
This commit proposes an optimized version using Arm A32 NEON
intrinsics.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:14 +00:00
Loïc Molinari
5f5b8b1db3 panfrost: Optimize pan_afbc_payload_layout_packed() for AArch64
Payload size retrieval can greatly benefit from using SIMD to sum up
the 16 6-bit packed sizes. This commit proposes an optimized version
using Arm A64 NEON intrinsics. This was measured on a Rock 5B to be ~2
times faster than the original.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:14 +00:00
Loïc Molinari
a9a3ee3719 panfrost: Get AFBC-P payload layout on the CPU
The AFBC-P payload layout is currently retrieved in 2 steps starting
with the payload sizes retrieval using a CS job on the GPU followed by
a CPU pass to set the payload offsets. This commit proposes to do both
steps on the CPU at once using a new utility function
pan_afbc_payload_layout_packed().

A new utility function pan_afbc_payload_uncompressed_size() is added
to help retrieve the uncompressed size from a pipe_format and
modifier. Both the CPU and GPU versions use it now.

A new AFBC-P driconf option "pan_afbcp_gpu_payload_sizes" is added to
fallback to the original payload sizes retrieval on the GPU.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:14 +00:00
Loïc Molinari
f750620982 panfrost: Improve AFBC header block accesses
Add an AFBC header block structure pan_afbc_headerblock to improve
readability when accessing header blocks. get_superblock_size(), which
will be used for AFBC packing in the next commits, has been moved to
pan_afbc.h and renamed to pan_afbc_payload_size() so that it can be
tested. Other utility functions pan_afbc_header_subblock_size() and
pan_afbc_header_subblock_uncompressed_size() hasve been added to help
retrieve the compressed or uncompressed size of a subblock from a
header. This commit also fixes a few issues like arch handling.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:14 +00:00
Loïc Molinari
a0bdbcbae6 panfrost: Async AFBC packing debug info
Print the AFBC-P state of a resource along its asynchronous packing
process when PAN_MESA_DEBUG=forcepack. There's no need to prevent
tiling in that case now that packing maintains the tiling state.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:14 +00:00
Loïc Molinari
91aa7c4f8d panfrost: Async AFBC packing
Pack AFBC resources asynchronously in order to prevent stalls at
texture upload waiting for 1) the AFBC staging blit (sparse encoding)
to complete and 2) the AFBC payload sizes retrieval.

After a texture upload, an AFBC resource is now progressively packed
at each read access once consecutively accessed a certain number of
times without a write access. This allows to prevent most stalls by
making AFBC packing a progressive async background process.

A useful side effect is that consecutive glTexSubImage*() calls on the
same texture (for texture atlases for instance) don't uselessly
respawn packing.

A new AFBC-P driconf option "pan_afbcp_reads_threshold" is added to
tweak the consecutive reads threshold.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:13 +00:00
Loïc Molinari
df0e7e964d panfrost: Make panfrost_pack_afbc() static
It isn't used outside of pan_resource.c.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:13 +00:00
Loïc Molinari
42c305def3 panfrost: Test mipmap chain validity in panfrost_should_pack_afbc()
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:13 +00:00
Loïc Molinari
9da169dc7b panfrost: Improve AFBC packing terms
The pan_afbc_block_info structure describes the extent (offset and
size) of the payload data (compressed data) for a superblock, so use
the pan_afbc_payload_extent structure name instead in order to be more
precise and improve readability. This also allows to differentiate
superblocks and payload data which will be useful later in this series
when new helpers will be added to pan_afbc.h.

A set of payload extents describes the layout of various payloads, so
use the term "layout" instead of the generic term "metadata" to
describe it.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:13 +00:00
Loïc Molinari
56db55c83d panfrost: Disable AFBC tiled layout with driconf option
Preventing the use of the AFBC tiled layout could be useful to further
optimise memory usage when using AFBC packing. This commit introduces
a new option to disable it through a driconf option.

This is exposed as a new AFBC pan_afbc_tiled option (not tied to
pan_force_afbc_packing) because it would otherwise imply a useless
performance hit for the tiled to untiled conversion at packing time:
there's no need to detile if the resource is created untiled in the
first place. This could also be useful to compare the performance of
the AFBC tiled and untiled layouts.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:13 +00:00
Loïc Molinari
98c8c95755 panfrost: Fix AFBC packing
Layout refactoring commits broke AFBC packing while removing several
fields to simplify the logic. The stride and height are now derived
when necessary at packing time based on the resource modifier. The
problem is that the code assumes that the source and destination
headers are the same although the source and destination modifiers
might differ and create size mismatches when passed to the AFBC
utilities in pan_afbc.h. The destination modifier is set as the source
modifier without the AFBC_FORMAT_MOD_SPARSE and AFBC_FORMAT_MOD_TILED
flags. While the AFBC_FORMAT_MOD_SPARSE flag doesn't have any impact
on these utilities, the AFBC_FORMAT_MOD_TILED flag does.

This commit fixes the issue by keeping the same header block layout
(linear or tiled header layout) when packing a resource. This allows
to simply parse header blocks linearly without having to bother with
the internal layout (Morton order). The tiled packed resource might
also benefit from better cache accesses.

Fixes: a2e9ce39e9 pan/layout: Drop pan_image_slice_layout::afbc::{stride_sb,nr_sblocks}
Fixes: 01d325ba63 pan/layout: Interleave header/body in AFBC(3D)
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:13 +00:00
Christian Gmeiner
34b693914a etnaviv: nir: Add nir_texop_txd offset lowering
Implement offset lowering by computing the appropriate LOD from
gradients and adjusting coordinates accordingly.

Passes dEQP-GLES3.functional.shaders.texture_functions.texturegradoffset.* on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35753>
2025-07-12 10:48:04 +00:00
Christian Gmeiner
ab975b494c etnaviv: nir: Add nir_texop_txl offset lowering
Implement offset lowering by using the explicit LOD value with nearest-integer
rounding (floor(lod + 0.5)) and reusing the coordinate calculation helper.

Passes dEQP-GLES3.functional.shaders.texture_functions.texturelodoffset.* on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35753>
2025-07-12 10:48:04 +00:00
Christian Gmeiner
974115f924 etnaviv: nir: Add nir_texop_tex offset lowering
Implement offset lowering by calculating implicit LOD using coordinate derivatives (ddx/ddy)
and doing some deep floating point wizardry matching the binary blob behaviour.

Adds helper functions for coordinate calculation and LOD clamping that will be
reused by subsequent offset lowering passes.

Passes dEQP-GLES3.functional.shaders.texture_functions.textureoffset.* without explicit bias on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35753>
2025-07-12 10:48:04 +00:00
Christian Gmeiner
7b28b1ff64 etnaviv: nir: Support nir_intrinsic_load_sampler_lod_parameters
This will be used by our texture lowering passes.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35753>
2025-07-12 10:48:03 +00:00
Christian Gmeiner
ec9a2aa2e4 nir: Unvendor sampler_lod_parameters(_pan)
Will be used by etnaviv too.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35753>
2025-07-12 10:48:03 +00:00
Christian Gmeiner
c25f612b56 etnaviv: nir: Use nir offset lowering for txb
Passes dEQP-GLES3.functional.shaders.texture_functions.textureoffset.* with explicit bias on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35753>
2025-07-12 10:48:02 +00:00
Marek Olšák
34580a32ff ac/nir: remove redundant option dont_export_cull_distances
It has the same value as can_cull.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
54c969882b ac/nir: rename ac_nir_get_lds_gs_out_slot_offset -> ac_nir_get_gs_out_lds_offset
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
fde3384cfd ac/nir: remove pack_clip_cull_distances option
it's always true

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
7bbc4ef719 ac/llvm: rename misnamed get_memory_ptr -> get_shared_mem_ptr
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
0fbdefd770 ac/llvm: remove LDS linking code
LDS sizes and offsets from LLVM are no longer used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
f6aecfb886 ac/llvm: don't declare LDS as an array for HS & GS & CS, use IntToPtr(0)
We don't need all this stuff anymore.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
5ded4f3c7d aco: remove unused aco_symbol_lds_ngg_gs_out_vertex_base
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
404d242809 radeonsi: use shader_info::next_stage correctly
Separate shaders have next_stage == MESA_SHADER_NONE.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
30676319c7 radeonsi: remove all uses of NIR_PASS_V
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
ab8b5499bc radeonsi: add a comment about early prim exports
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
ece9b47196 radeonsi: determine compute shader LDS size from NIR instead of LLVM
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
24260644e8 radeonsi: remove now unused LLVM LDS logic for NGG
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:21 +00:00
Marek Olšák
65c5ee1628 radeonsi: stop using LLVM LDS linking logic for the GS out LDS offset
This will enable large code removal.

shader->config.lds_size is now always computed the same as ACO except for
compute shaders.

We have to add a new 8-bit user SGPR bitfield called
GS_STATE_GS_OUT_LDS_OFFSET_256B, which contains the offset
that was previously set by the relocation.

Since the offset must be a multiple of 256, we have to add padding
to the LDS size computation to make sure the alignment to 256 for the ESGS
LDS size doesn't cause us to exceed the maximum LDS size.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35529>
2025-07-12 10:28:20 +00:00