mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Fix the signature of vkd3d_spirv_build_op_type_image.
Don't assume that enums and uint32_t parameters are identical. Clang 16 changes the diagonstic for incompatible function pointer types from a warning into an error by default. This fixes the following error, when built (for aarch64, but probably also for other architectures) in MSVC mode: ../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:1083:13: error: incompatible function pointer types passing 'uint32_t (struct vkd3d_spirv_builder *, uint32_t, SpvDim, uint32_t, uint32_t, uint32_t, uint32_t, SpvImageFormat)' (aka 'unsigned int (struct vkd3d_spirv_builder *, unsigned int, enum SpvDim_, unsigned int, unsigned int, unsigned int, unsigned int, enum SpvImageFormat_)') to parameter of type 'vkd3d_spirv_build7_pfn' (aka 'unsigned int (*)(struct vkd3d_spirv_builder *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)') [-Wincompatible-function-pointer-types] vkd3d_spirv_build_op_type_image); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:612:68: note: passing argument to parameter 'build_pfn' here SpvOp op, const uint32_t *operands, vkd3d_spirv_build7_pfn build_pfn) ^ Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
577014c017
commit
1c61b20616
Notes:
Alexandre Julliard
2022-10-18 00:13:00 +02:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/8
@ -1066,8 +1066,8 @@ static uint32_t vkd3d_spirv_get_op_type_sampler(struct vkd3d_spirv_builder *buil
|
||||
|
||||
/* Access qualifiers are not supported. */
|
||||
static uint32_t vkd3d_spirv_build_op_type_image(struct vkd3d_spirv_builder *builder,
|
||||
uint32_t sampled_type_id, SpvDim dim, uint32_t depth, uint32_t arrayed,
|
||||
uint32_t ms, uint32_t sampled, SpvImageFormat format)
|
||||
uint32_t sampled_type_id, uint32_t dim, uint32_t depth, uint32_t arrayed,
|
||||
uint32_t ms, uint32_t sampled, uint32_t format)
|
||||
{
|
||||
uint32_t operands[] = {sampled_type_id, dim, depth, arrayed, ms, sampled, format};
|
||||
return vkd3d_spirv_build_op_rv(builder, &builder->global_stream,
|
||||
|
Loading…
x
Reference in New Issue
Block a user