radv: stop passing redundant stage to radv_shader_stage_init()

It's sinfo->stage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24562>
This commit is contained in:
Samuel Pitoiset
2023-08-09 08:30:25 +02:00
committed by Marge Bot
parent 66eaca3a0a
commit afcafa1b61
6 changed files with 9 additions and 11 deletions
+2 -3
View File
@@ -252,8 +252,7 @@ radv_get_hash_flags(const struct radv_device *device, bool stats)
}
void
radv_shader_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, struct radv_shader_stage *out_stage,
gl_shader_stage stage)
radv_shader_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, struct radv_shader_stage *out_stage)
{
const VkShaderModuleCreateInfo *minfo = vk_find_struct_const(sinfo->pNext, SHADER_MODULE_CREATE_INFO);
const VkPipelineShaderStageModuleIdentifierCreateInfoEXT *iinfo =
@@ -264,7 +263,7 @@ radv_shader_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, struct radv
memset(out_stage, 0, sizeof(*out_stage));
out_stage->stage = stage;
out_stage->stage = vk_to_mesa_shader_stage(sinfo->stage);
out_stage->entrypoint = sinfo->pName;
out_stage->spec_info = sinfo->pSpecializationInfo;
out_stage->feedback.flags = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT;
+1 -1
View File
@@ -196,7 +196,7 @@ radv_compute_pipeline_compile(struct radv_compute_pipeline *pipeline, struct rad
int64_t pipeline_start = os_time_get_nano();
radv_shader_stage_init(pStage, &cs_stage, MESA_SHADER_COMPUTE);
radv_shader_stage_init(pStage, &cs_stage);
radv_shader_layout_init(pipeline_layout, MESA_SHADER_COMPUTE, &cs_stage.layout);
radv_hash_shaders(hash, &cs_stage, 1, pipeline_layout, pipeline_key,
+2 -2
View File
@@ -2337,7 +2337,7 @@ radv_pipeline_import_retained_shaders(const struct radv_device *device, struct r
if (!(shader_stage_to_pipeline_library_flags(sinfo->stage) & lib->lib_flags))
continue;
radv_shader_stage_init(sinfo, &stages[s], s);
radv_shader_stage_init(sinfo, &stages[s]);
radv_shader_layout_init(&lib->layout, s, &stages[s].layout);
}
@@ -2663,7 +2663,7 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline, const Vk
if (!(shader_stage_to_pipeline_library_flags(sinfo->stage) & lib_flags))
continue;
radv_shader_stage_init(sinfo, &stages[stage], stage);
radv_shader_stage_init(sinfo, &stages[stage]);
radv_shader_layout_init(pipeline_layout, stage, &stages[stage].layout);
}
+2 -2
View File
@@ -260,7 +260,7 @@ radv_rt_fill_stage_info(struct radv_device *device, const VkRayTracingPipelineCr
stages[idx].stage = vk_to_mesa_shader_stage(pCreateInfo->pStages[idx].stage);
struct radv_shader_stage stage;
radv_shader_stage_init(&pCreateInfo->pStages[idx], &stage, stages[idx].stage);
radv_shader_stage_init(&pCreateInfo->pStages[idx], &stage);
radv_shader_layout_init(pipeline_layout, stages[idx].stage, &stage.layout);
radv_hash_shaders(stages[idx].sha1, &stage, 1, NULL, key, radv_get_hash_flags(device, false));
@@ -453,7 +453,7 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca
for (uint32_t idx = 0; idx < pCreateInfo->stageCount; idx++) {
int64_t stage_start = os_time_get_nano();
struct radv_shader_stage stage;
radv_shader_stage_init(&pCreateInfo->pStages[idx], &stage, stages[idx].stage);
radv_shader_stage_init(&pCreateInfo->pStages[idx], &stage);
radv_shader_layout_init(pipeline_layout, stages[idx].stage, &stage.layout);
if (stages[idx].shader)
+1 -2
View File
@@ -2171,8 +2171,7 @@ struct radv_event {
struct radv_pipeline_key;
struct radv_ray_tracing_group;
void radv_shader_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, struct radv_shader_stage *out_stage,
gl_shader_stage stage);
void radv_shader_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, struct radv_shader_stage *out_stage);
void radv_hash_shaders(unsigned char *hash, const struct radv_shader_stage *stages, uint32_t stage_count,
const struct radv_pipeline_layout *layout, const struct radv_pipeline_key *key, uint32_t flags);
+1 -1
View File
@@ -815,7 +815,7 @@ radv_parse_rt_stage(struct radv_device *device, const VkPipelineShaderStageCreat
{
struct radv_shader_stage rt_stage;
radv_shader_stage_init(sinfo, &rt_stage, vk_to_mesa_shader_stage(sinfo->stage));
radv_shader_stage_init(sinfo, &rt_stage);
radv_shader_layout_init(pipeline_layout, vk_to_mesa_shader_stage(sinfo->stage), &rt_stage.layout);
nir_shader *shader = radv_shader_spirv_to_nir(device, &rt_stage, key, false);