|
Blender V5.0
|
#include <vk_state_manager.hh>
Inherits blender::gpu::StateManager.
Public Attributes | |
| bool | is_dirty = false |
| Public Attributes inherited from blender::gpu::StateManager | |
| GPUState | state |
| GPUStateMutable | mutable_state |
| std::array< TextureWriteFormat, GPU_MAX_IMAGE > | image_formats |
Friends | |
| class | VKDescriptorSetUpdator |
Definition at line 217 of file vk_state_manager.hh.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 21 of file vk_state_manager.cc.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 27 of file vk_state_manager.cc.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 74 of file vk_state_manager.cc.
References blender::gpu::Texture::format_get(), is_dirty, texture(), and blender::gpu::unwrap().
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 81 of file vk_state_manager.cc.
References is_dirty, texture(), and blender::gpu::unwrap().
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 88 of file vk_state_manager.cc.
References blender::gpu::StateManager::image_formats, blender::gpu::Invalid, and is_dirty.
|
overridevirtual |
Workaround for EEVEE ThicknessFromShadow shader.
EEVEE light evaluation uses layered sub-pass tracking. Currently, the tracking supports transitioning a layer to a different layout once per rendering scope. When using the thickness from shadow, the layers need to be transitioned twice: once to image load/store for the thickness from shadow shader and then to a sampler for the light evaluation shader. We work around this limitation by suspending the rendering.
The reason we need to suspend the rendering is that Vulkan, by default, doesn't support layout transitions between the begin and end of rendering. By suspending the render, the graph will create a new node group that allows the necessary image layout transition.
This limitation could also be addressed in the render graph scheduler, but that would be quite a hassle to track and might not be worth the effort.
Implements blender::gpu::StateManager.
Definition at line 32 of file vk_state_manager.cc.
References blender::gpu::VKContext::get(), and GPU_BARRIER_SHADER_IMAGE_ACCESS.
|
inline |
Definition at line 250 of file vk_state_manager.hh.
References resource, and storage_buffer_bind().
Referenced by blender::gpu::VKIndexBuffer::bind_as_ssbo(), blender::gpu::VKVertexBuffer::bind_as_ssbo(), blender::gpu::VKImmediate::end(), and storage_buffer_bind().
| void blender::gpu::VKStateManager::storage_buffer_bind | ( | BindSpaceStorageBuffers::Type | resource_type, |
| void * | resource, | ||
| int | binding, | ||
| VkDeviceSize | offset ) |
Definition at line 128 of file vk_state_manager.cc.
| void blender::gpu::VKStateManager::storage_buffer_unbind | ( | void * | resource | ) |
Definition at line 137 of file vk_state_manager.cc.
References is_dirty, and resource.
Referenced by blender::gpu::VKUniformBuffer::unbind().
| void blender::gpu::VKStateManager::storage_buffer_unbind_all | ( | ) |
Definition at line 143 of file vk_state_manager.cc.
References is_dirty.
Referenced by blender::gpu::VKContext::debug_unbind_all_ssbo().
| void blender::gpu::VKStateManager::texel_buffer_bind | ( | VKVertexBuffer & | vertex_buffer, |
| int | slot ) |
Definition at line 113 of file vk_state_manager.cc.
References GPUSamplerState::default_sampler(), is_dirty, and blender::gpu::BindSpaceTextures::VertexBuffer.
Referenced by blender::gpu::VKVertexBuffer::bind_as_texture().
| void blender::gpu::VKStateManager::texel_buffer_unbind | ( | VKVertexBuffer & | vertex_buffer | ) |
Definition at line 122 of file vk_state_manager.cc.
References is_dirty.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 56 of file vk_state_manager.cc.
References is_dirty, blender::gpu::BindSpaceTextures::Texture, and texture().
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 62 of file vk_state_manager.cc.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 68 of file vk_state_manager.cc.
References is_dirty.
| uint blender::gpu::VKStateManager::texture_unpack_row_length_get | ( | ) | const |
Row length for unpacking host data when uploading texture data.
When set to zero (0) host data can be assumed to be stored sequentially.
Definition at line 154 of file vk_state_manager.cc.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 149 of file vk_state_manager.cc.
References len.
| void blender::gpu::VKStateManager::uniform_buffer_bind | ( | VKUniformBuffer * | uniform_buffer, |
| int | slot ) |
Definition at line 95 of file vk_state_manager.cc.
References is_dirty.
| void blender::gpu::VKStateManager::uniform_buffer_unbind | ( | VKUniformBuffer * | uniform_buffer | ) |
Definition at line 101 of file vk_state_manager.cc.
References is_dirty.
Referenced by blender::gpu::VKUniformBuffer::unbind().
| void blender::gpu::VKStateManager::uniform_buffer_unbind_all | ( | ) |
Definition at line 107 of file vk_state_manager.cc.
References is_dirty.
Referenced by blender::gpu::VKContext::debug_unbind_all_ubo().
|
friend |
Definition at line 218 of file vk_state_manager.hh.
References VKDescriptorSetUpdator.
Referenced by VKDescriptorSetUpdator.
| bool blender::gpu::VKStateManager::is_dirty = false |
Definition at line 228 of file vk_state_manager.hh.
Referenced by image_bind(), image_unbind(), image_unbind_all(), storage_buffer_bind(), storage_buffer_unbind(), storage_buffer_unbind_all(), texel_buffer_bind(), texel_buffer_unbind(), texture_bind(), texture_unbind(), texture_unbind_all(), uniform_buffer_bind(), uniform_buffer_unbind(), uniform_buffer_unbind_all(), and blender::gpu::VKDescriptorSetTracker::update_descriptor_set().