vk: fix push constant implementation and test (#9588)
All stages share a push constant "block". We need to order the fragment stage bytes to after the vertex stage if they both exists. FIXES=453776664
This commit is contained in:
@@ -963,6 +963,10 @@ utils::io::sstream& CodeGenerator::generateSpecializationConstant(utils::io::sst
|
||||
return out;
|
||||
}
|
||||
|
||||
// Note that we've only introduced push constants to the vertex stage. If we want to add push
|
||||
// constants to the fragment stage, in vulkan, we would have to offset the definition of the field
|
||||
// by the size of the constant struct in the vertex stage. This is due to vulkan having essentially
|
||||
// one block of memory for push constants that is shared across all stages).
|
||||
utils::io::sstream& CodeGenerator::generatePushConstants(utils::io::sstream& out,
|
||||
MaterialBuilder::PushConstantList const& pushConstants, size_t const layoutLocation) const {
|
||||
if (UTILS_UNLIKELY(pushConstants.empty())) {
|
||||
|
||||
Reference in New Issue
Block a user