From 3b144d5fb855f0dd4d6813a961ab07ecd56fb7f6 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Wed, 9 Sep 2020 09:49:22 -0400 Subject: [PATCH] turnip: fix the type of tu_shader_module code field, delete unused sha1 Signed-off-by: Jonathan Marek Part-of: --- src/freedreno/vulkan/tu_private.h | 4 +--- src/freedreno/vulkan/tu_shader.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 2db5164..3f80faa 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -1058,10 +1058,8 @@ struct tu_shader_module { struct vk_object_base base; - unsigned char sha1[20]; - uint32_t code_size; - const uint32_t *code[0]; + uint32_t code[]; }; struct tu_push_constant_range diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 6533dc9..188bd72 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -684,7 +684,7 @@ tu_shader_create(struct tu_device *dev, tu_shader_module_from_handle(stage_info->module); assert(module->code_size % 4 == 0); nir = tu_spirv_to_nir( - dev->compiler, (const uint32_t *) module->code, module->code_size / 4, + dev->compiler, module->code, module->code_size / 4, stage, stage_info->pName, stage_info->pSpecializationInfo); } else { assert(stage == MESA_SHADER_FRAGMENT); @@ -845,8 +845,6 @@ tu_CreateShaderModule(VkDevice _device, module->code_size = pCreateInfo->codeSize; memcpy(module->code, pCreateInfo->pCode, pCreateInfo->codeSize); - _mesa_sha1_compute(module->code, module->code_size, module->sha1); - *pShaderModule = tu_shader_module_to_handle(module); return VK_SUCCESS; -- 2.7.4