Commit graph

200653 commits

Author SHA1 Message Date
Rhys Perry
2d94ca93b5 nir/liveness: stop requiring instr indices
nir_live_defs_impl() doesn't actually use them, and every
nir_metadata_require of nir_metadata_live_defs already requires them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
bfc570ff98 nir/gcm: stop preserving nir_metadata_loop_analysis
This pass changes instr_cost if it makes progress.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
36840db6fe nir/loop_analyze: use a sparse array and stop indexing SSA defs
Indexing SSA defs is unexpected behaviour and interferes with using
nir_loop_analyze_impl for validation.

It probably also breaks nir_metadata_live_defs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
77118fcf72 nir: rerun loop analysis if the parameters change
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
aae1aa4888 d3d12: store only once in d3d12_emit_points
d3d12_lower_point_sprite expects a single store for each output, each
dominating the emit_vertex.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
083a557856 d3d12: fix phi handling in d3d12_lower_primitive_id
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
9c159490c3 microsoft/compiler: repair SSA in dxil_nir_split_tess_ctrl
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
3850f8b167 microsoft/compiler: invalidate loop analysis in dxil_nir_lower_double_math
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
30473fd1e7 v3dv: fix SSA dominance error
Offset should be increased regardless of whether a result is written or
not.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:43 +00:00
Konstantin Seurer
eecaf80554 radv/rmv: Use radv_rmv_log_resource_destroy more
Gets rid of some duplicate code with the added benefit of removing a
memory leak warning when destroying the device because
radv_rmv_log_border_color_palette_destroy did not destroy the resource
ID.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33167>
2025-01-23 23:07:49 +00:00
Connor Abbott
6d406eeefa tu: Support VK_EXT_conservative_rasterization on a7xx
This supports everything the blob does.

The registers exist on later a6xx gens, but they would be way more
inconvenient to use since they're mixed up with binning/not-binning and
compression state, and I'm not sure if it works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
2798521bda tu: Stop setting binning fields on a7xx
These fields don't actually enable binning, but rather disables the FS.
This seems to happen automatically on a7xx when binning, because the
blob doesn't set them specially during the binning pass.

Move them to rasterization, because RB_RENDER_CNTL will start depending
on rasterization state in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
ffe8220bbd tu, freedreno: Write PC_DGEN_SU_CONSERVATIVE_RAS_CNTL
Prevent other processes writing this from messing us up.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Konstantin Seurer
6701806cd1 llvmpipe: Avoid a crash when using 5 coords with AF
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:04 +00:00
Konstantin Seurer
3f7564d86b llvmpipe: Fix half-pixel sample offset with AF
Simply adding -0.5 will cause a noticeable offset for low sample counts.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:03 +00:00
Mike Blumenkrantz
f3b8d7da46 egl: never select swrast for vmwgfx
ForceSoftware will be true in this case from the high-level fallback,
but this isn't really swrast

Fixes: 1de7c86bc1 ("dri: pass through a type enum for creating screen instead of driver_extensions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33123>
2025-01-23 21:14:21 +00:00
Caio Oliveira
563631cdd8 intel/brw: Rely on existing helper for dispatch width of geometry stages
Helper already exists and is used in the functions, just save the value
so can be reused.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33175>
2025-01-23 20:29:31 +00:00
Igor Torrente
fcb4412e9a Zink: Add NVK to the non driver_workarounds.implicit_sync list
This workarround is causing `VK_ERROR_DEVICE_LOST` to NVK when running
glmark2. And as NVK is part of mesa, it doesn't need the hand-holding
from Zink.

cc: mesa-stable

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33142>
2025-01-23 19:12:40 +00:00
José Roberto de Souza
e9f4458c37 anv: Allow WSI blit_src Image to be kept compressed when transitioning to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
When WSI is working in prime/dma-buf mode, it has one additional
VkBuffer or VkImage where the main VkImage is copied to without any
compression or tiling different from linear

The batch buffer to do this copy is created in
wsi_finish_create_blit_context(). It performs a barrier transitioning
the VkImage to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, performs the
copy, and then transitions it back to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.

However, in this prime/dma-buf mode, no display modifiers are involved,
which causes compression to be disabled when switching to
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
This change adds an exception to allow the Vkimage to remain compressed
because we can handle the compressed-to-uncompressed copy.

Doing so fixes an issue that was reported with BMG + integrated GPU
and should also improve performance by keeping the VkImage compressed.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12354
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
José Roberto de Souza
5a37467cfd anv: Return scanout PAT entry for scanout and external buffers in discrete GPUs
Without this scanout and external buffers will be allocated as WB
what will fail allocation if DRM_XE_GEM_CREATE_FLAG_SCANOUT is set
or it will use WC but it will not be the special PAT entry for scanout.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
Job Noorman
41ae187003 ir3: disable alias.rt pre-a750
Even though alias.tex is supported on all of a7xx, alias.rt is only
support from a750.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 0aa9678d4d ("ir3: add support for alias.rt")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33184>
2025-01-23 17:55:22 +00:00
Lionel Landwerlin
9ea04a1a53 anv: don't look at pipelines to figure out CPS values
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33170>
2025-01-23 17:13:54 +00:00
Tapani Pälli
e85646eace anv: set dependency between SF_CLIP and CC_PTR states
Fixes flickering seen in Cyberpunk 2077, Supraland and some
other game workloads.

cc: mesa-stable

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12494
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12504
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12453
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33163>
2025-01-23 16:26:24 +00:00
Karmjit Mahil
5846172f15 tu: Free pre_chain patchpoint data
Fixes a leak in:
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed42
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed60_geometry
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed95_geometry_multiview

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33084>
2025-01-23 15:39:50 +00:00
Lars-Ivar Hesselberg Simonsen
2d3c50d484 panvk: Fix barriers in secondary cmdbufs w/o rp's
When encountering pipeline barriers in secondary command buffers that do
not start their renderpasses, our barrier logic would not detect the
need to flush existing draws, leading to race conditions in case of
subpassLoad.

This change ensures we flush existing draws when required in secondary
command buffers.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33182>
2025-01-23 15:13:17 +00:00
Mike Blumenkrantz
d1c2795876 zink: fix replacing incompatible pipelines
if e.g., multiview framebuffer is enabled, shader objects cannot be used,
requiring the bound shaders to be compiled into a pipeline on-demand

this is not knowable in advance and will always result in a stall

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Mike Blumenkrantz
53cb103af2 zink: disable shader objects when viewmask is set
this is not supported by EXT_shader_object

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Mike Blumenkrantz
50c7d05568 zink: add radv ci fail
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Benjamin Lee
6d6a43518a panfrost: remove is_blit flag
This is no longer used anywhere.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
2025-01-23 13:50:27 +00:00
Benjamin Lee
f93a48e4e3 panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload
Setting zs_update_operation = FORCE_EARLY for color preloads triggers
hangs in the dEQP-VK.rasterization.rasterization_order_attachment_access
depth/stencil tests. I didn't determine why this is the case, but the
DDK uses WEAK_EARLY for color preload, and doing the same here fixes the
hang.

WEAK_EARLY requires ATEST, so I removed .is_blit=true from the compiler
inputs.

There aren't any known hangs outside of the one set of vulkan CTS tests,
and in particular no known hangs in the gallium driver. Because the
reason for the hangs is not understood, I also changed the gallium
driver to use WEAK_EARLY, under the assumption that the same conditions
that trigger the hang in vulkan might occur in GL.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: edd98aac3f ("panfrost: Add support for native wallpapering on Bifrost")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
2025-01-23 13:50:27 +00:00
Benjamin Lee
79517d8a65 panfrost: remove incorrect usage of MALI_PIXEL_KILL_STRONG_EARLY
On bifrost, zs_update_operation=STRONG_EARLY, is equivalent to
WEAK_EARLY except that it may test/update without waiting for pixel
dependencies if it can prove that the test will pass.

STRONG_EARLY no longer exists on valhall, and the value 2 is reserved.

Even on bifrost, all of our current uses of STRONG_EARLY are
incorrect. For color preload, the shader skips ATEST, so FORCE_EARLY is
required. In the no-FS case, ATEST is skipped by definition (because
there is no shader), so FORCE_EARLY is required.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 519643bbe0 ("panfrost: Adjust the renderer state definition")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
2025-01-23 13:50:27 +00:00
Samuel Pitoiset
4b741338ac radv: exclude layer when recomputing FS input bases
This is always exported as a sysval.

Closes: mesa/mesa#12501
Fixes: dd00b3f5 ("radv: Implement FS layer ID input as a system value.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33168>
2025-01-23 13:21:03 +00:00
Lionel Landwerlin
2e4dcf72c6 brw: fix CSE with negation
The pass is currently turning this :

mul(16) %17:F, %1:F, 0.5f
mul(16) %19:F, %1:F, -0.5f
(+f0.0) sel(16) %27:UD, %19:UD, %17:UD

into this :

{ 12} mul(16) %17:F, %1:F, 0.5f
{ 14} (+f0.0) sel(16) %27:UD, -%17:F, %17:UD

The type change in the SEL instruction incurs a type conversion that
produces invalid values.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 234c45c929 ("intel/brw: Write a new global CSE pass that works on defs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12477
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33070>
2025-01-23 12:45:34 +00:00
Erik Faye-Lund
40b4c0aa1a panvk/ci: update expected failures
These failures were all caused by CTS bugs affecting Vulkan 1.0. But
since we now expose Vulkan 1.1 on V10, these issues no longer affect us.

Let's update the results to reflect this.

Fixes: 1a81bff6aa ("panvk: expose vk1.1 on v10 hardware")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33180>
2025-01-23 12:09:51 +00:00
Erik Faye-Lund
e34e474f24 panvk: do not expose EXT_subgroup_size_control on bifrost
This exptension requires Vulkan 1.1, which we don't expose there yet.

While we're at it, put panvk into the normal sorted order of the list of
drivers.

Fixes: d46b80249b ("panvk: enable subgroupSizeControl")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33180>
2025-01-23 12:09:51 +00:00
Valentine Burley
2d99b77f2e amd/ci: Run full radeonsi-raven-va job pre-merge
The full job run takes approximately 8 minutes now, as the issues
previously mentioned have been resolved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33155>
2025-01-23 11:33:25 +00:00
Valentine Burley
0624cd9c51 amd/ci: Add lava-hp-x360-14a-cb0001xx-zork and use it for VA-API testing
Move the existing radeonsi-raven-va job to this new device.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33155>
2025-01-23 11:33:25 +00:00
Valentine Burley
708279df20 panfrost/ci: Revert to 6.6 kernel on G57
On mt8192, the 6.13 kernel fails to reliably initialize the GPU, causing
a fallback to llvmpipe. Return to the 6.6 kernel until this is resolved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33181>
2025-01-23 10:56:20 +00:00
Corentin Noël
d441292a70 virgl/ci: Remove screen size arguments
We don't need such argument and this way of specifying them is deprecated anyway.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33173>
2025-01-23 10:14:48 +00:00
Vignesh Raman
ef3091736c ci: use CI_PROJECT_NAME for artifacts name
Since mesa is used in drm-ci, the artifacts in drm-ci jobs have
the 'mesa' prefix. This change replaces the hardcoded 'mesa'
prefix in the artifacts name with the CI_PROJECT_NAME variable.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33154>
2025-01-23 07:18:09 +00:00
Job Noorman
0aa9678d4d ir3: add support for alias.rt
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

This is implemented by replacing const and immediate components of the
RT sources of end with alias.rt instructions in the preamble. If no
preamble exists, an empty one is created.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
90b512c4ef freedreno: add support for aliased render target components
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

In addition to using alias.rt, the hardware needs to be informed about
which render target components are being aliased using the
SP_PS_ALIASED_COMPONENTS{_CONTROL} registers. This commit implements
those registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
38f5fd66de freedreno: add chip param to emit_fs_output
We will need this to emit the a7xx-specific aliased components regs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
2716385afa tu: add support for aliased render target components
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

In addition to using alias.rt, the hardware needs to be informed about
which render target components are being aliased using the
SP_PS_ALIASED_COMPONENTS{_CONTROL} registers. This commit implements
those registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
3290a3dcf3 tu: add chip param to tu6_emit_fs_outputs
We will need this to emit the a7xx-specific aliased components regs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
040b803e4b ir3: reuse ir3_find_output in ir3_find_output_regid
The search logic was duplicated here. Also added a new helper
ir3_get_output_regid to make the regid calculation reusable.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
39206c1150 ir3: make shader output struct non-anonymous
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
b8b3fe20b2 tu,ir3: inform ir3 of dynamically remapped FS slots
The clear FS shaders will statically use slot numbers from 0 up to the
number of supported render targets. However, the driver will remap those
slots to the actual render targets being cleared.

This means that ir3 should not make any assumptions about the static
slot number in those cases. This is especially important when
implementing alias.rt, which statically encodes the render target.

Add an new ir3_shader_option (fragdata_dynamic_remap) which allows the
driver to indicate to ir3 that it will perform such dynamic remapping.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
2a0a317244 ir3: make find_end a global helper
Rename to ir3_find_end and move to ir3.{h,c}.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
f3026b3d3e ir3: add some preamble helpers
Helpers to check for preamble existence, find shpe, and create an empty
preamble.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00