|
Blender V4.3
|
#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 |
| bool | use_bgl = false |
Friends | |
| class | VKDescriptorSetTracker |
Definition at line 202 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.
Implements blender::gpu::StateManager.
Definition at line 74 of file vk_state_manager.cc.
References blender::gpu::BindSpaceImages< Offset >::bind(), is_dirty, tex, and blender::gpu::unwrap().
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 81 of file vk_state_manager.cc.
References is_dirty, tex, blender::gpu::BindSpaceImages< Offset >::unbind(), and blender::gpu::unwrap().
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 88 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceImages< Offset >::unbind_all().
|
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.
| void blender::gpu::VKStateManager::storage_buffer_bind | ( | BindSpaceStorageBuffers::Type | resource_type, |
| void * | resource, | ||
| int | binding ) |
Definition at line 136 of file vk_state_manager.cc.
References blender::gpu::BindSpaceStorageBuffers::bind(), and is_dirty.
Referenced by blender::gpu::VKIndexBuffer::bind_as_ssbo(), and blender::gpu::VKVertexBuffer::bind_as_ssbo().
| void blender::gpu::VKStateManager::storage_buffer_unbind | ( | void * | resource | ) |
Definition at line 144 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceStorageBuffers::unbind().
Referenced by blender::gpu::VKUniformBuffer::unbind().
| void blender::gpu::VKStateManager::storage_buffer_unbind_all | ( | ) |
Definition at line 150 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceStorageBuffers::unbind_all().
Referenced by blender::gpu::VKContext::debug_unbind_all_ssbo().
| void blender::gpu::VKStateManager::texel_buffer_bind | ( | VKVertexBuffer & | vertex_buffer, |
| int | slot ) |
Definition at line 121 of file vk_state_manager.cc.
References blender::gpu::BindSpaceTextures::bind(), 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 130 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceTextures::unbind().
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 56 of file vk_state_manager.cc.
References blender::gpu::BindSpaceTextures::bind(), is_dirty, sampler(), and blender::gpu::BindSpaceTextures::Texture.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 62 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceTextures::unbind().
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 68 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceTextures::unbind_all().
| 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 sequential.
Definition at line 161 of file vk_state_manager.cc.
|
overridevirtual |
Implements blender::gpu::StateManager.
Definition at line 156 of file vk_state_manager.cc.
References len.
| void blender::gpu::VKStateManager::unbind_from_all_namespaces | ( | void * | resource | ) |
Definition at line 112 of file vk_state_manager.cc.
References is_dirty, blender::gpu::BindSpaceImages< Offset >::unbind(), blender::gpu::BindSpaceStorageBuffers::unbind(), blender::gpu::BindSpaceTextures::unbind(), and blender::gpu::BindSpaceUniformBuffers::unbind().
| void blender::gpu::VKStateManager::uniform_buffer_bind | ( | VKUniformBuffer * | uniform_buffer, |
| int | slot ) |
Definition at line 94 of file vk_state_manager.cc.
References blender::gpu::BindSpaceUniformBuffers::bind(), and is_dirty.
| void blender::gpu::VKStateManager::uniform_buffer_unbind | ( | VKUniformBuffer * | uniform_buffer | ) |
Definition at line 100 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceUniformBuffers::unbind().
Referenced by blender::gpu::VKUniformBuffer::unbind().
| void blender::gpu::VKStateManager::uniform_buffer_unbind_all | ( | ) |
Definition at line 106 of file vk_state_manager.cc.
References is_dirty, and blender::gpu::BindSpaceUniformBuffers::unbind_all().
Referenced by blender::gpu::VKContext::debug_unbind_all_ubo().
|
friend |
Definition at line 203 of file vk_state_manager.hh.
| bool blender::gpu::VKStateManager::is_dirty = false |
Definition at line 213 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(), unbind_from_all_namespaces(), uniform_buffer_bind(), uniform_buffer_unbind(), uniform_buffer_unbind_all(), and blender::gpu::VKDescriptorSetTracker::update_descriptor_set().