|
Blender V4.3
|
#include <vk_push_constants.hh>
Classes | |
| struct | PushConstant |
Public Member Functions | |
| void | init (const shader::ShaderCreateInfo &info, const VKShaderInterface &interface, StorageType storage_type, VKDescriptorSet::Location location) |
| StorageType | storage_type_get () const |
| VKDescriptorSet::Location | descriptor_set_location_get () const |
| uint32_t | size_in_bytes () const |
| const PushConstant * | find (int32_t location) const |
| void | debug_print () const |
Static Public Member Functions | |
| static StorageType | determine_storage_type (const shader::ShaderCreateInfo &info, const VKDevice &device) |
Static Public Attributes | |
| static constexpr StorageType | STORAGE_TYPE_DEFAULT = StorageType::PUSH_CONSTANTS |
| static constexpr StorageType | STORAGE_TYPE_FALLBACK = StorageType::UNIFORM_BUFFER |
Describe the layout of the push constants and the storage type that should be used.
Definition at line 69 of file vk_push_constants.hh.
| void blender::gpu::VKPushConstants::Layout::debug_print | ( | ) | const |
Definition at line 106 of file vk_push_constants.cc.
References blender::gpu::VKPushConstants::Layout::PushConstant::location, and push_constant().
|
inline |
Get the binding location for the uniform buffer.
Only valid when storage_type=StorageType::UNIFORM_BUFFER.
Definition at line 135 of file vk_push_constants.hh.
Referenced by blender::gpu::VKShader::resources_declare().
|
static |
Return the desired storage type that can fit the push constants of the given shader create info, matching the limits of the given device.
Returns:
Definition at line 52 of file vk_push_constants.cc.
References blender::gpu::VKPushConstants::NONE, blender::gpu::VKDevice::physical_device_properties_get(), blender::gpu::shader::ShaderCreateInfo::push_constants_, STORAGE_TYPE_DEFAULT, STORAGE_TYPE_FALLBACK, and blender::gpu::struct_size().
Referenced by blender::gpu::VKShaderInterface::init().
| const VKPushConstants::Layout::PushConstant * blender::gpu::VKPushConstants::Layout::find | ( | int32_t | location | ) | const |
Find the push constant layout for the given location. Location = ShaderInput.location.
Definition at line 96 of file vk_push_constants.cc.
References push_constant().
| void blender::gpu::VKPushConstants::Layout::init | ( | const shader::ShaderCreateInfo & | info, |
| const VKShaderInterface & | interface, | ||
| StorageType | storage_type, | ||
| VKDescriptorSet::Location | location ) |
Initialize the push constants of the given shader create info with the binding location.
interface: Uniform locations of the interface are used as lookup key. storage_type: The type of storage for push constants to use. location: When storage_type=StorageType::UNIFORM_BUFFER this contains the location in the descriptor set where the uniform buffer can be bound.
Definition at line 78 of file vk_push_constants.cc.
References BLI_assert, blender::gpu::init_struct(), and blender::gpu::VKPushConstants::UNIFORM_BUFFER.
Referenced by blender::gpu::VKShaderInterface::init().
|
inline |
Get the size needed to store the push constants.
Definition at line 143 of file vk_push_constants.hh.
Referenced by blender::gpu::VKPushConstants::create_resource(), and blender::gpu::VKPushConstants::VKPushConstants().
|
inline |
Return the storage type that is used.
Definition at line 125 of file vk_push_constants.hh.
Referenced by blender::gpu::VKShader::resources_declare(), blender::gpu::VKPushConstants::uniform_buffer_get(), and blender::gpu::VKPushConstants::update_uniform_buffer().
|
staticconstexpr |
Definition at line 70 of file vk_push_constants.hh.
Referenced by determine_storage_type().
|
staticconstexpr |
Definition at line 71 of file vk_push_constants.hh.
Referenced by determine_storage_type().