diff options
author | Erik Faye-Lund <[email protected]> | 2019-08-05 17:23:51 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-08-08 18:20:29 +0200 |
commit | 75097114d9db63f7930de11b2e2f54142e58913f (patch) | |
tree | ebb43164aa4cd218727f3b0d6d9f3ef89bc2df8a /src/compiler | |
parent | 68c24b09c22b600d1e54fe116ee74fbddf4f0fc5 (diff) |
spirv: fixup signature
This avoids a warning on some compiler, complaining about implicitly
casting the function-pointer.
Signed-off-by: Erik Faye-Lund <[email protected]>
Fixes: d482a8f "spirv: Update the OpenCL.std.h header"
Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/spirv/vtn_opencl.c | 4 | ||||
-rw-r--r-- | 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, |