radv: avoid a huge memset in radv_graphics_pipeline_compile()
this has a noticeable impact on pipeline creation Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20947>
This commit is contained in:

committed by
Samuel Pitoiset

parent
1c286db14e
commit
e28b982db8
@@ -3465,7 +3465,7 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline,
|
||||
radv_pipeline_capture_shaders(pipeline->base.device, pCreateInfo->flags);
|
||||
bool keep_statistic_info =
|
||||
radv_pipeline_capture_shader_stats(pipeline->base.device, pCreateInfo->flags);
|
||||
struct radv_pipeline_stage stages[MESA_VULKAN_SHADER_STAGES] = {0};
|
||||
struct radv_pipeline_stage stages[MESA_VULKAN_SHADER_STAGES];
|
||||
const VkPipelineCreationFeedbackCreateInfo *creation_feedback =
|
||||
vk_find_struct_const(pCreateInfo->pNext, PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
|
||||
VkPipelineCreationFeedback pipeline_feedback = {
|
||||
@@ -3491,6 +3491,12 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline,
|
||||
skip_shaders_cache = true;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < MESA_VULKAN_SHADER_STAGES; i++) {
|
||||
stages[i].entrypoint = NULL;
|
||||
stages[i].nir = NULL;
|
||||
stages[i].spirv.size = 0;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {
|
||||
const VkPipelineShaderStageCreateInfo *sinfo = &pCreateInfo->pStages[i];
|
||||
gl_shader_stage stage = vk_to_mesa_shader_stage(sinfo->stage);
|
||||
|
Reference in New Issue
Block a user