https://bugs.winehq.org/show_bug.cgi?id=49398
Bug ID: 49398 Summary: vkd3d fails to compile against Vulkan 1.2.140 headers Product: vkd3d Version: 1.1 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vkd3d Assignee: wine-bugs@winehq.org Reporter: mike@fireburn.co.uk Distribution: ---
Here's the compile error:
In file included from /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c:20: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_private.h:964:54: error: ‘VK_PIPELINE_BIND_POINT_RANGE_SIZE’ undeclared here (not in a function); did you mean ‘VK_PIPELINE_BIND_POINT_MAX_ENUM’? 964 | struct vkd3d_pipeline_bindings pipeline_bindings[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_PIPELINE_BIND_POINT_MAX_ENUM libtool: compile: x86_64-pc-linux-gnu-gcc -m32 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999 -I./include -I/var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/include -I/var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/include/dummy -I/var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/include/private -Wall -pipe -std=c99 -Wdeclaration-after-statement -Wimplicit-fallthrough -Wmissing-prototypes -Wunused-but-set-parameter -Wvla -Wpointer-arith -Wl,--no-undefined -O3 -march=native -pipe -flto -c /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_main.c -fPIC -DPIC -o libs/vkd3d/.libs/vkd3d_main.o /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c: In function ‘d3d12_command_list_invalidate_root_parameters’: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c:1876:29: warning: parameter ‘bind_point’ set but not used [-Wunused-but-set-parameter] 1876 | VkPipelineBindPoint bind_point) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c: In function ‘d3d12_command_list_prepare_descriptors’: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c:2551:29: warning: parameter ‘bind_point’ set but not used [-Wunused-but-set-parameter] 2551 | VkPipelineBindPoint bind_point) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c: In function ‘d3d12_command_list_update_descriptor_table’: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c:2648:29: warning: parameter ‘bind_point’ set but not used [-Wunused-but-set-parameter] 2648 | VkPipelineBindPoint bind_point, unsigned int index, struct d3d12_desc *base_descriptor) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c: In function ‘d3d12_command_list_update_push_descriptors’: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c:2751:29: warning: parameter ‘bind_point’ set but not used [-Wunused-but-set-parameter] 2751 | VkPipelineBindPoint bind_point) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c: In function ‘d3d12_command_list_set_descriptor_table’: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c:4083:29: warning: parameter ‘bind_point’ set but not used [-Wunused-but-set-parameter] 4083 | VkPipelineBindPoint bind_point, unsigned int index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c: In function ‘d3d12_command_list_set_root_constants’: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/command.c:4121:29: warning: parameter ‘bind_point’ set but not used [-Wunused-but-set-parameter] 4121 | VkPipelineBindPoint bind_point, unsigned int index, unsigned int offset, | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ In file included from /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/device.c:19: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_private.h:964:54: error: ‘VK_PIPELINE_BIND_POINT_RANGE_SIZE’ undeclared here (not in a function); did you mean ‘VK_PIPELINE_BIND_POINT_MAX_ENUM’? 964 | struct vkd3d_pipeline_bindings pipeline_bindings[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_PIPELINE_BIND_POINT_MAX_ENUM In file included from /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/resource.c:20: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_private.h:964:54: error: ‘VK_PIPELINE_BIND_POINT_RANGE_SIZE’ undeclared here (not in a function); did you mean ‘VK_PIPELINE_BIND_POINT_MAX_ENUM’? 964 | struct vkd3d_pipeline_bindings pipeline_bindings[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_PIPELINE_BIND_POINT_MAX_ENUM In file included from /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/state.c:20: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_private.h:964:54: error: ‘VK_PIPELINE_BIND_POINT_RANGE_SIZE’ undeclared here (not in a function); did you mean ‘VK_PIPELINE_BIND_POINT_MAX_ENUM’? 964 | struct vkd3d_pipeline_bindings pipeline_bindings[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_PIPELINE_BIND_POINT_MAX_ENUM make[1]: *** [Makefile:1167: libs/vkd3d/command.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... In file included from /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/utils.c:19: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_private.h:964:54: error: ‘VK_PIPELINE_BIND_POINT_RANGE_SIZE’ undeclared here (not in a function); did you mean ‘VK_PIPELINE_BIND_POINT_MAX_ENUM’? 964 | struct vkd3d_pipeline_bindings pipeline_bindings[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_PIPELINE_BIND_POINT_MAX_ENUM make[1]: *** [Makefile:1167: libs/vkd3d/device.lo] Error 1 In file included from /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_main.c:20: /var/tmp/portage/app-emulation/vkd3d-9999/work/vkd3d-9999/libs/vkd3d/vkd3d_private.h:964:54: error: ‘VK_PIPELINE_BIND_POINT_RANGE_SIZE’ undeclared here (not in a function); did you mean ‘VK_PIPELINE_BIND_POINT_MAX_ENUM’? 964 | struct vkd3d_pipeline_bindings pipeline_bindings[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_PIPELINE_BIND_POINT_MAX_ENUM make[1]: *** [Makefile:1167: libs/vkd3d/resource.lo] Error 1 make[1]: *** [Makefile:1167: libs/vkd3d/state.lo] Error 1 make[1]: *** [Makefile:1167: libs/vkd3d/utils.lo] Error 1 make[1]: *** [Makefile:1167: libs/vkd3d/vkd3d_main.lo] Error 1
The patch required to get this compiling is:
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 1cc7864..fa736e4 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -53,6 +53,7 @@ #define VKD3D_MAX_SHADER_EXTENSIONS 1u #define VKD3D_MAX_SHADER_STAGES 5u #define VKD3D_MAX_VK_SYNC_OBJECTS 4u +#define VKD3D_PIPELINE_BIND_POINT_COUNT 2u
struct d3d12_command_list; struct d3d12_device; @@ -961,7 +962,7 @@ struct d3d12_command_list VkPipeline current_pipeline; VkRenderPass pso_render_pass; VkRenderPass current_render_pass; - struct vkd3d_pipeline_bindings pipeline_bindings[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; + struct vkd3d_pipeline_bindings pipeline_bindings[VKD3D_PIPELINE_BIND_POINT_COUNT];
struct d3d12_pipeline_state *state;
Which is slightly different to:
https://github.com/d3d12/vkd3d/commit/8e7bf8a5c3e004763a62822ff2d79cf76907b7...