Vulkan: Push constants #104880
|
@ -76,10 +76,8 @@ void VKCommandBuffer::push_constants(const VKPushConstants &push_constants,
|
|||
const VkPipelineLayout vk_pipeline_layout,
|
||||
const VkShaderStageFlags vk_shader_stages)
|
||||
{
|
||||
if (push_constants.layout_get().storage_type_get() !=
|
||||
VKPushConstantsLayout::StorageType::PUSH_CONSTANTS) {
|
||||
return;
|
||||
}
|
||||
BLI_assert(push_constants.layout_get().storage_type_get() ==
|
||||
VKPushConstantsLayout::StorageType::PUSH_CONSTANTS);
|
||||
vkCmdPushConstants(vk_command_buffer_,
|
||||
vk_pipeline_layout,
|
||||
vk_shader_stages,
|
||||
|
|
|
@ -37,6 +37,11 @@ class VKCommandBuffer : NonCopyable, NonMovable {
|
|||
void bind(const VKDescriptorSet &descriptor_set,
|
||||
const VkPipelineLayout vk_pipeline_layout,
|
||||
VkPipelineBindPoint bind_point);
|
||||
/**
|
||||
* Add a push constant command to the command buffer.
|
||||
*
|
||||
* Only valid when the storage type of push_constants is StorageType::PUSH_CONSTANTS.
|
||||
*/
|
||||
void push_constants(const VKPushConstants &push_constants,
|
||||
const VkPipelineLayout vk_pipeline_layout,
|
||||
const VkShaderStageFlags vk_shader_stages);
|
||||
|
|
Loading…
Reference in New Issue