Module: Mesa Branch: main Commit: 9aaf51639a2d764ab364442e2bb1661751fa37d1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9aaf51639a2d764ab364442e2bb1661751fa37d1
Author: Samuel Pitoiset <[email protected]> Date: Mon Sep 27 13:18:32 2021 +0200 radv: use the pipeline key more when possible Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085> --- src/amd/vulkan/radv_pipeline.c | 2 +- src/amd/vulkan/radv_shader.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index e689f9b432c..569a4b1807f 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3604,7 +3604,7 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_device *device, pipeline->gs_copy_shader = radv_create_gs_copy_shader( device, nir[MESA_SHADER_GEOMETRY], &info, &gs_copy_binary, keep_executable_info, - keep_statistic_info, keys[MESA_SHADER_GEOMETRY].has_multiview_view_index, + keep_statistic_info, pipeline_key->has_multiview_view_index, pipeline_key->optimisations_disabled); } diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index f1f1ba12b7b..d9cf295778e 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -951,7 +951,7 @@ void radv_lower_ngg(struct radv_device *device, struct nir_shader *nir, num_vertices_per_prim = si_conv_prim_to_gs_out(pl_key->vs.topology) + 1; /* Manually mark the instance ID used, so the shader can repack it. */ - if (key->vs.instance_rate_inputs) + if (pl_key->vs.instance_rate_inputs) BITSET_SET(nir->info.system_values_read, SYSTEM_VALUE_INSTANCE_ID); } else if (nir->info.stage == MESA_SHADER_GEOMETRY) { @@ -988,9 +988,9 @@ void radv_lower_ngg(struct radv_device *device, struct nir_shader *nir, consider_culling, key->vs_common_out.as_ngg_passthrough, export_prim_id, - key->vs.provoking_vtx_last, + pl_key->vs.provoking_vtx_last, false, - key->vs.instance_rate_inputs); + pl_key->vs.instance_rate_inputs); info->has_ngg_culling = out_conf.can_cull; info->has_ngg_early_prim_export = out_conf.early_prim_export; @@ -1003,7 +1003,7 @@ void radv_lower_ngg(struct radv_device *device, struct nir_shader *nir, info->ngg_info.esgs_ring_size, info->gs.gsvs_vertex_size, info->ngg_info.ngg_emit_size * 4u, - key->vs.provoking_vtx_last); + pl_key->vs.provoking_vtx_last); } else { unreachable("invalid SW stage passed to radv_lower_ngg"); }
