From: Erik Faye-Lund Date: Mon, 5 Aug 2019 15:23:51 +0000 (+0200) Subject: spirv: fixup signature X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75097114d9db63f7930de11b2e2f54142e58913f;p=mesa.git spirv: fixup signature This avoids a warning on some compiler, complaining about implicitly casting the function-pointer. Signed-off-by: Erik Faye-Lund Fixes: d482a8f "spirv: Update the OpenCL.std.h header" Acked-by: Eric Engestrom --- 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,