|
Blender V4.3
|
#include "BLI_utility_mixins.hh"#include "BLI_vector.hh"#include "gpu_shader_create_info.hh"#include "vk_common.hh"#include "vk_descriptor_set.hh"Go to the source code of this file.
Classes | |
| class | blender::gpu::VKPushConstants |
| struct | blender::gpu::VKPushConstants::Layout |
| struct | blender::gpu::VKPushConstants::Layout::PushConstant |
Namespaces | |
| namespace | blender |
| namespace | blender::gpu |
Push constants is a way to quickly provide a small amount of uniform data to shaders. It should be much quicker than UBOs but a huge limitation is the size of data - spec requires 128 bytes to be available for a push constant range. Hardware vendors may support more, but compared to other means it is still very little (for example 256 bytes).
Due to this size requirements we try to use push constants when it fits on the device. If it doesn't fit we fallback to use an uniform buffer.
Shader developers are responsible to fine-tune the performance of the shader. One way to do this is to tailor what will be sent as a push constant to keep the push constants within the limits.
Definition in file vk_push_constants.hh.