GPUOpen-Archive / Anvil

Anvil is a cross-platform framework for Vulkan
MIT License
594 stars 62 forks source link

Assertion failure when using specialization constants #134

Closed Silverlan closed 5 years ago

Silverlan commented 5 years ago

Every time I try to use specialization constants, I get an assertion failure in Anvil::StructChainer<VkPipelineShaderStageCreateInfo>::store_helper_structure<VkSpecializationInfo>:

File Name: "...\anvil\include\misc\struct_chainer.h" Line: 148 Message: "m_structs.size() >= in_referring_struct + in_referring_struct_pnext_ptr_offset + sizeof(void*)"

I added a simple test case to the PushConstants demo to replicate the issue: specialization_constant_test.zip I've marked all the lines I've changed from the original demo with the comment "// Specialization constant test". I'm on the latest version (git) of Anvil.

DominikWitczakAMD commented 5 years ago

Confirmed, this is a legitimate bug. I've fixed this internally. The patch will be included in next week's release.