From: Konstantin Seurer Date: Sat, 4 Mar 2023 15:51:40 +0000 (+0100) Subject: radv/rt: Use vk_pipeline_hash_shader_stage for RT stages X-Git-Tag: upstream/23.3.3~11782 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fc8335ccb12b0b1ce8627a35ace800c5a1dfae4;p=platform%2Fupstream%2Fmesa.git radv/rt: Use vk_pipeline_hash_shader_stage for RT stages Fixes dEQP-VK.pipeline.pipeline_library.graphics_library.misc.non_graphics.shader_module_info_rt. Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c index 68863ca..4ae8dcd 100644 --- a/src/amd/vulkan/radv_pipeline_cache.c +++ b/src/amd/vulkan/radv_pipeline_cache.c @@ -31,6 +31,7 @@ #include "radv_private.h" #include "radv_shader.h" #include "aco_interface.h" +#include "vk_pipeline.h" struct cache_entry { union { @@ -152,26 +153,9 @@ radv_hash_rt_stages(struct mesa_sha1 *ctx, const VkPipelineShaderStageCreateInfo unsigned stage_count) { for (unsigned i = 0; i < stage_count; ++i) { - RADV_FROM_HANDLE(vk_shader_module, module, stages[i].module); - const VkSpecializationInfo *spec_info = stages[i].pSpecializationInfo; - - const VkPipelineShaderStageModuleIdentifierCreateInfoEXT *iinfo = vk_find_struct_const( - stages[i].pNext, PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT); - - if (module) { - _mesa_sha1_update(ctx, module->sha1, sizeof(module->sha1)); - } else { - assert(iinfo); - assert(iinfo->identifierSize <= VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT); - _mesa_sha1_update(ctx, iinfo->pIdentifier, iinfo->identifierSize); - } - - _mesa_sha1_update(ctx, stages[i].pName, strlen(stages[i].pName)); - if (spec_info && spec_info->mapEntryCount) { - _mesa_sha1_update(ctx, spec_info->pMapEntries, - spec_info->mapEntryCount * sizeof spec_info->pMapEntries[0]); - _mesa_sha1_update(ctx, spec_info->pData, spec_info->dataSize); - } + unsigned char hash[20]; + vk_pipeline_hash_shader_stage(&stages[i], NULL, hash); + _mesa_sha1_update(ctx, hash, sizeof(hash)); } }