diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2024-05-14 09:52:10 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-05-14 23:42:25 +0000 |
commit | be391fdb33657ed060a4d0b18770473889c09daa (patch) | |
tree | 5db87fdb722441a572ce6f8d2ef91caee437dea3 | |
parent | a9f24fb5f1cd34ee64b7d1f3bdbb03bf9b90e2c6 (diff) |
radv: check gs_copy_shader directly for executable props
The pipeline could be a graphics pipeline library and
radv_pipeline_to_graphics would assert on debug builds.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29200>
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index e5c0aee56aa..a74b0adcd19 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -762,12 +762,12 @@ radv_get_executable_count(struct radv_pipeline *pipeline) if (!pipeline->shaders[i]) continue; - if (i == MESA_SHADER_GEOMETRY && !radv_pipeline_has_ngg(radv_pipeline_to_graphics(pipeline))) { - ret += 2u; - } else { + ret += 1u; + if (i == MESA_SHADER_GEOMETRY && pipeline->gs_copy_shader) { ret += 1u; } } + return ret; } @@ -800,7 +800,7 @@ radv_get_shader_from_executable_index(struct radv_pipeline *pipeline, int index, --index; - if (i == MESA_SHADER_GEOMETRY && !radv_pipeline_has_ngg(radv_pipeline_to_graphics(pipeline))) { + if (i == MESA_SHADER_GEOMETRY && pipeline->gs_copy_shader) { if (!index) { *stage = i; return pipeline->gs_copy_shader; |