spirv: fixup signature
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 5 Aug 2019 15:23:51 +0000 (17:23 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 8 Aug 2019 16:20:29 +0000 (18:20 +0200)
This avoids a warning on some compiler, complaining about implicitly
casting the function-pointer.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: d482a8f "spirv: Update the OpenCL.std.h header"
Acked-by: Eric Engestrom <eric@engestrom.ch>
src/compiler/spirv/vtn_opencl.c
src/compiler/spirv/vtn_private.h

index 4ba7c648e9e0af65fcae17ca0518a9f514d0ba70..e26b5bc0457e6bf364fcf7c891638560af461406 100644 (file)
@@ -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:
index 4c1e4f6bb04f392dc58db571da0ee05ecc3cdc0e..c3ef3c535efafeb757ec7b75ab2f44112dd83fa8 100644 (file)
@@ -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,