Mesa (master): turnip: fix the type of tu_shader_module code field, delete unused sha1
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 9 17:15:15 UTC 2020
Module: Mesa
Branch: master
Commit: 3b144d5fb855f0dd4d6813a961ab07ecd56fb7f6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b144d5fb855f0dd4d6813a961ab07ecd56fb7f6
Author: Jonathan Marek <jonathan at marek.ca>
Date: Wed Sep 9 09:49:22 2020 -0400
turnip: fix the type of tu_shader_module code field, delete unused sha1
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>
---
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 2db5164ea56..3f80faa2ada 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 6533dc9580d..188bd723cd0 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;
More information about the mesa-commit
mailing list