Module: Mesa
Branch: main
Commit: 8dd0b98786e0b52b95ebf208be197d33a06d7008
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8dd0b98786e0b52b95ebf208be197d33a06d7008

Author: Samuel Pitoiset <[email protected]>
Date:   Fri Feb 10 11:21:28 2023 +0100

radv: only initialize shader arguments for the active stages

Other stages don't need to be initialized.

Signed-off-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21237>

---

 src/amd/vulkan/radv_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 52cc0506d4d..20edd0a8fd8 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2540,7 +2540,7 @@ radv_declare_pipeline_args(struct radv_device *device, 
struct radv_pipeline_stag
          active_stages |= (1 << i);
    }
 
-   for (int i = 0; i < MESA_VULKAN_SHADER_STAGES; ++i) {
+   radv_foreach_stage(i, active_stages) {
       stages[i].args.is_gs_copy_shader = false;
       stages[i].args.explicit_scratch_args = !radv_use_llvm_for_stage(device, 
i);
       stages[i].args.remap_spi_ps_input = !radv_use_llvm_for_stage(device, i);

Reply via email to