diff options
author | Joshua Ashton <joshua@froggi.es> | 2020-08-08 07:24:56 +0100 |
---|---|---|
committer | Joshua Ashton <joshua@froggi.es> | 2020-08-08 12:46:51 +0100 |
commit | b238d17a02f13a80771e81e3604bc6cc86e26da2 (patch) | |
tree | 8094422b919c2879ea00e83f42bb5b1ce997ce9a | |
parent | 08f3dcf2f6ef1da8aec4c95a531851c62c5798d6 (diff) |
zink: Fix 32-bit compilation
`sizeof(void*) != sizeof(VkShaderModule)` on x86 hence this fails with `-Werror=int-conversion`
Fixes: 0f059d550bd "zink: split up creating zink_shader objects and VkShaderModule objects"
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6239>
-rw-r--r-- | src/gallium/drivers/zink/zink_compiler.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 55451ad2443..b9d1b666b14 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -217,7 +217,7 @@ update_so_info(struct zink_shader *sh, VkShaderModule zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs) { - VkShaderModule mod = NULL; + VkShaderModule mod = VK_NULL_HANDLE; void *streamout = zs->streamout.so_info_slots ? &zs->streamout : NULL; struct spirv_shader *spirv = nir_to_spirv(zs->nir, streamout); assert(spirv); @@ -240,7 +240,7 @@ zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs) smci.pCode = spirv->words; if (vkCreateShaderModule(screen->dev, &smci, NULL, &mod) != VK_SUCCESS) - mod = NULL; + mod = VK_NULL_HANDLE; /* TODO: determine if there's any reason to cache spirv output? */ free(spirv->words); |