|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Core::VKComputePipeline::push_constants | ( | vk::CommandBuffer | cmd, |
| vk::ShaderStageFlags | stage_flags, | ||
| uint32_t | offset, | ||
| uint32_t | size, | ||
| const void * | data | ||
| ) | const |
Update push constants.
| cmd | Command buffer |
| stage_flags | Shader stages that will access this data |
| offset | Offset in push constant block (bytes) |
| size | Size of data (bytes) |
| data | Pointer to data to copy |
Updates push constant data that will be visible to the shader. More efficient than descriptor sets for small, frequently-changing data.
Example: struct Params { float scale; uint32_t iterations; }; Params params = {2.0f, 100}; pipeline.push_constants(cmd, vk::ShaderStageFlagBits::eCompute, 0, sizeof(params), ¶ms);
Definition at line 229 of file VKComputePipeline.cpp.
References MayaFlux::Journal::Core, MayaFlux::Journal::GraphicsBackend, m_layout, MF_ERROR, and MF_WARN.