尽管签名匹配示例和源代码,但 vulkan 图形管道的参数错误
Wrong arguments to vulkan graphics pipeline despite signature matching examples and source code
所以我有这两行拒绝编译的代码:
vk::GraphicsPipelineCreateInfo pipeline_info();
device.createGraphicsPipeline({}, pipeline_info);
根据 this example 这应该可行。但是编译器抱怨:
error: no matching function for call to ‘vk::Device::createGraphicsPipeline(<brace-enclosed initializer list>, vk::GraphicsPipelineCreateInfo (&)())’
device.createGraphicsPipeline({}, pipeline_info);
我不明白为什么这不起作用,修改调用以使用唯一初始化没有区别。
这是最令人头疼的解析:
vk::GraphicsPipelineCreateInfo pipeline_info();
您声明的是一个函数,而不是一个对象!
参见例如My attempt at value initialization is interpreted as a function declaration, and why doesn't A a(()); solve it?
所以我有这两行拒绝编译的代码:
vk::GraphicsPipelineCreateInfo pipeline_info();
device.createGraphicsPipeline({}, pipeline_info);
根据 this example 这应该可行。但是编译器抱怨:
error: no matching function for call to ‘vk::Device::createGraphicsPipeline(<brace-enclosed initializer list>, vk::GraphicsPipelineCreateInfo (&)())’
device.createGraphicsPipeline({}, pipeline_info);
我不明白为什么这不起作用,修改调用以使用唯一初始化没有区别。
这是最令人头疼的解析:
vk::GraphicsPipelineCreateInfo pipeline_info();
您声明的是一个函数,而不是一个对象!
参见例如My attempt at value initialization is interpreted as a function declaration, and why doesn't A a(()); solve it?