Mesa (master): spirv: fixup signature
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 8 16:21:43 UTC 2019
Module: Mesa
Branch: master
Commit: 75097114d9db63f7930de11b2e2f54142e58913f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=75097114d9db63f7930de11b2e2f54142e58913f
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Aug 5 17:23:51 2019 +0200
spirv: fixup signature
This avoids a warning on some compiler, complaining about implicitly
casting the function-pointer.
Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Fixes: d482a8f "spirv: Update the OpenCL.std.h header"
Acked-by: Eric Engestrom <eric at engestrom.ch>
---
src/compiler/spirv/vtn_opencl.c | 4 ++--
src/compiler/spirv/vtn_private.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c
index 4ba7c648e9e..e26b5bc0457 100644
--- a/src/compiler/spirv/vtn_opencl.c
+++ b/src/compiler/spirv/vtn_opencl.c
@@ -245,10 +245,10 @@ handle_printf(struct vtn_builder *b, enum OpenCLstd_Entrypoints opcode,
}
bool
-vtn_handle_opencl_instruction(struct vtn_builder *b, uint32_t ext_opcode,
+vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode,
const uint32_t *w, unsigned count)
{
- switch (ext_opcode) {
+ switch ((enum OpenCLstd_Entrypoints)ext_opcode) {
case OpenCLstd_Fabs:
case OpenCLstd_SAbs:
case OpenCLstd_UAbs:
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
index 4c1e4f6bb04..c3ef3c535ef 100644
--- a/src/compiler/spirv/vtn_private.h
+++ b/src/compiler/spirv/vtn_private.h
@@ -845,7 +845,7 @@ void vtn_handle_subgroup(struct vtn_builder *b, SpvOp opcode,
bool vtn_handle_glsl450_instruction(struct vtn_builder *b, SpvOp ext_opcode,
const uint32_t *words, unsigned count);
-bool vtn_handle_opencl_instruction(struct vtn_builder *b, uint32_t ext_opcode,
+bool vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode,
const uint32_t *words, unsigned count);
struct vtn_builder* vtn_create_builder(const uint32_t *words, size_t word_count,
More information about the mesa-commit
mailing list