turnip: fix the type of tu_shader_module code field, delete unused sha1
authorJonathan Marek <jonathan@marek.ca>
Wed, 9 Sep 2020 13:49:22 +0000 (09:49 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 9 Sep 2020 17:01:51 +0000 (17:01 +0000)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>

src/freedreno/vulkan/tu_private.h
src/freedreno/vulkan/tu_shader.c

index 2db5164..3f80faa 100644 (file)
@@ -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
index 6533dc9..188bd72 100644 (file)
@@ -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;