|
Blender V4.3
|
#include <gpu_framebuffer_private.hh>
Inherited by blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Public Member Functions | |
| virtual void | bind (bool enabled_srgb)=0 |
| virtual bool | check (char err_out[256])=0 |
| virtual void | clear (eGPUFrameBufferBits buffers, const float clear_col[4], float clear_depth, uint clear_stencil)=0 |
| virtual void | clear_multi (const float(*clear_col)[4])=0 |
| virtual void | clear_attachment (GPUAttachmentType type, eGPUDataFormat data_format, const void *clear_value)=0 |
| virtual void | attachment_set_loadstore_op (GPUAttachmentType type, GPULoadStore ls)=0 |
| virtual void | read (eGPUFrameBufferBits planes, eGPUDataFormat format, const int area[4], int channel_len, int slot, void *r_data)=0 |
| virtual void | blit_to (eGPUFrameBufferBits planes, int src_slot, FrameBuffer *dst, int dst_slot, int dst_offset_x, int dst_offset_y)=0 |
| void | size_set (int width, int height) |
| void | default_size_set (int width, int height) |
| void | viewport_set (const int viewport[4]) |
| void | viewport_multi_set (const int viewports[GPU_MAX_VIEWPORTS][4]) |
| void | scissor_set (const int scissor[4]) |
| void | scissor_test_set (bool test) |
| void | viewport_get (int r_viewport[4]) const |
| void | scissor_get (int r_scissor[4]) const |
| bool | scissor_test_get () const |
| void | viewport_reset () |
| void | scissor_reset () |
| GPUTexture * | depth_tex () const |
| GPUTexture * | color_tex (int slot) const |
| const char *const | name_get () const |
| void | set_use_explicit_loadstore (bool use_explicit_loadstore) |
| bool | get_use_explicit_loadstore () const |
Constructor / Destructor | |
| FrameBuffer (const char *name) | |
| virtual | ~FrameBuffer () |
Attachments Management | |
| void | subpass_transition (const GPUAttachmentState depth_attachment_state, Span< GPUAttachmentState > color_attachment_states) |
| void | load_store_config_array (const GPULoadStore *load_store_actions, uint actions_len) |
| void | attachment_set (GPUAttachmentType type, const GPUAttachment &new_attachment) |
| void | attachment_remove (GPUAttachmentType type) |
| void | recursive_downsample (int max_lvl, void(*callback)(void *user_data, int level), void *user_data) |
| uint | get_bits_per_pixel () |
Public Attributes | |
| void ** | py_ref = nullptr |
Protected Member Functions | |
| virtual void | subpass_transition_impl (const GPUAttachmentState depth_attachment_state, Span< GPUAttachmentState > color_attachment_states)=0 |
Protected Attributes | |
| GPUAttachment | attachments_ [GPU_FB_MAX_ATTACHMENT] |
| bool | dirty_attachments_ = true |
| int | width_ = 0 |
| int | height_ = 0 |
| char | name_ [DEBUG_NAME_LEN] |
| int | viewport_ [GPU_MAX_VIEWPORTS][4] = {{0}} |
| int | scissor_ [4] = {0} |
| bool | multi_viewport_ = false |
| bool | scissor_test_ = false |
| bool | dirty_state_ = true |
| bool | use_explicit_load_store_ = false |
Definition at line 73 of file gpu_framebuffer_private.hh.
| blender::gpu::FrameBuffer::FrameBuffer | ( | const char * | name | ) |
Definition at line 32 of file gpu_framebuffer.cc.
References attachments_, dirty_attachments_, dirty_state_, name_, and STRNCPY.
|
virtual |
Definition at line 51 of file gpu_framebuffer.cc.
References attachments_, and py_ref.
| void blender::gpu::FrameBuffer::attachment_remove | ( | GPUAttachmentType | type | ) |
Definition at line 124 of file gpu_framebuffer.cc.
References attachments_, dirty_attachments_, and GPU_ATTACHMENT_NONE.
Referenced by blender::gpu::Texture::attach_to(), blender::gpu::Texture::detach_from(), blender::gpu::Texture::~Texture(), and blender::gpu::VKContext::~VKContext().
| void blender::gpu::FrameBuffer::attachment_set | ( | GPUAttachmentType | type, |
| const GPUAttachment & | new_attachment ) |
Definition at line 72 of file gpu_framebuffer.cc.
References attachments_, BLI_assert, dirty_attachments_, ELEM, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_FB_MAX_ATTACHMENT, GPU_FB_MAX_COLOR_ATTACHMENT, GPU_texture_has_depth_format(), GPU_texture_has_stencil_format(), GPU_texture_is_array(), GPU_texture_is_cube(), GPUAttachment::layer, GPUAttachment::mip, and GPUAttachment::tex.
Referenced by blender::gpu::GLFrameBuffer::attachment_set_loadstore_op(), blender::gpu::GLFrameBuffer::subpass_transition_impl(), and blender::gpu::VKContext::sync_backbuffer().
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by load_store_config_array(), and recursive_downsample().
|
pure virtual |
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by GPU_framebuffer_blit(), and GPU_offscreen_draw_to_screen().
|
pure virtual |
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by GPU_clear_color(), and GPU_clear_depth().
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 236 of file gpu_framebuffer_private.hh.
References attachments_, GPU_FB_COLOR_ATTACHMENT0, and GPUAttachment::tex.
Referenced by blender::gpu::VKFrameBuffer::color_attachments_resource_size(), GPU_framebuffer_blit(), blender::gpu::VKFrameBuffer::subpass_transition_impl(), and blender::gpu::VKFrameBuffer::update_srgb().
Definition at line 159 of file gpu_framebuffer_private.hh.
References dirty_attachments_, dirty_state_, height_, and width_.
|
inline |
Definition at line 228 of file gpu_framebuffer_private.hh.
References attachments_, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPUAttachment::tex, and tex.
Referenced by blender::gpu::VKFrameBuffer::clear(), and GPU_framebuffer_blit().
| uint blender::gpu::FrameBuffer::get_bits_per_pixel | ( | ) |
Definition at line 194 of file gpu_framebuffer.cc.
References attachments_, tex, blender::gpu::to_bytesize(), and blender::gpu::to_component_len().
|
inline |
Definition at line 251 of file gpu_framebuffer_private.hh.
References use_explicit_load_store_.
| void blender::gpu::FrameBuffer::load_store_config_array | ( | const GPULoadStore * | load_store_actions, |
| uint | actions_len ) |
Definition at line 158 of file gpu_framebuffer.cc.
References attachment_set_loadstore_op(), attachments_, BLI_assert, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_FB_MAX_COLOR_ATTACHMENT, GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_DONT_CARE, GPULoadStore::load_action, blender::Span< T >::size(), GPULoadStore::store_action, and tex.
|
inline |
Definition at line 241 of file gpu_framebuffer_private.hh.
References name_.
Referenced by blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder().
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by GPU_frontbuffer_read_color().
| void blender::gpu::FrameBuffer::recursive_downsample | ( | int | max_lvl, |
| void(* | callback )(void *user_data, int level), | ||
| void * | user_data ) |
Definition at line 207 of file gpu_framebuffer.cc.
References attachment_set_loadstore_op(), attachments_, bind(), callback, dirty_attachments_, floor(), GPU_FB_DEPTH_ATTACHMENT, GPU_LOADACTION_DONT_CARE, GPU_mip_render_workaround(), GPU_STOREACTION_STORE, height_, max_ii(), min_ii(), NULL_ATTACHMENT_COLOR, tex, and width_.
|
inline |
Definition at line 206 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), and scissor_.
Referenced by GPU_scissor_get(), and blender::gpu::VKFrameBuffer::vk_render_areas_get().
|
inline |
Definition at line 222 of file gpu_framebuffer_private.hh.
References height_, scissor_set(), and width_.
Referenced by blender::gpu::GLFrameBuffer::bind(), blender::gpu::VKFrameBuffer::bind(), blender::gpu::MTLFrameBuffer::ensure_attachments_and_viewport(), and blender::gpu::MTLFrameBuffer::MTLFrameBuffer().
|
inline |
Definition at line 187 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), dirty_state_, equals_v4v4_int(), and scissor_.
Referenced by GPU_scissor(), and scissor_reset().
|
inline |
Definition at line 211 of file gpu_framebuffer_private.hh.
References scissor_test_.
Referenced by blender::gpu::VKFrameBuffer::vk_render_areas_get().
|
inline |
Definition at line 195 of file gpu_framebuffer_private.hh.
References dirty_state_, and scissor_test_.
Referenced by GPU_scissor_test().
|
inline |
Definition at line 246 of file gpu_framebuffer_private.hh.
References use_explicit_load_store_.
Definition at line 151 of file gpu_framebuffer_private.hh.
References dirty_state_, height_, and width_.
Referenced by blender::gpu::GLContext::activate(), blender::gpu::MTLFrameBuffer::MTLFrameBuffer(), blender::gpu::MTLFrameBuffer::update_attachments(), blender::gpu::VKFrameBuffer::update_size(), and blender::gpu::VKFrameBuffer::VKFrameBuffer().
| void blender::gpu::FrameBuffer::subpass_transition | ( | const GPUAttachmentState | depth_attachment_state, |
| Span< GPUAttachmentState > | color_attachment_states ) |
Definition at line 130 of file gpu_framebuffer.cc.
References attachments_, BLI_assert, GPU_ATTACHMENT_IGNORE, GPU_ATTACHMENT_READ, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_FB_MAX_COLOR_ATTACHMENT, blender::Span< T >::size(), subpass_transition_impl(), and tex.
|
protectedpure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by subpass_transition().
|
inline |
Definition at line 201 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), and viewport_.
Referenced by GPU_viewport_size_get_f(), and GPU_viewport_size_get_i().
|
inline |
Definition at line 176 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), dirty_state_, equals_v4v4_int(), GPU_MAX_VIEWPORTS, multi_viewport_, and viewport_.
|
inline |
Definition at line 216 of file gpu_framebuffer_private.hh.
References height_, viewport_set(), and width_.
Referenced by blender::gpu::GLFrameBuffer::bind(), blender::gpu::VKFrameBuffer::bind(), blender::gpu::MTLFrameBuffer::ensure_attachments_and_viewport(), and blender::gpu::MTLFrameBuffer::MTLFrameBuffer().
|
inline |
Definition at line 167 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), dirty_state_, equals_v4v4_int(), multi_viewport_, and viewport_.
Referenced by GPU_viewport(), and viewport_reset().
|
protected |
Set of texture attachments to render to. DEPTH and DEPTH_STENCIL are mutually exclusive.
Definition at line 76 of file gpu_framebuffer_private.hh.
Referenced by attachment_remove(), attachment_set(), blender::gpu::VKFrameBuffer::blit_to(), blender::gpu::GLFrameBuffer::clear_multi(), color_tex(), depth_tex(), FrameBuffer(), get_bits_per_pixel(), load_store_config_array(), blender::gpu::GLFrameBuffer::read(), blender::gpu::VKFrameBuffer::read(), recursive_downsample(), blender::gpu::VKFrameBuffer::rendering_ensure(), subpass_transition(), blender::gpu::GLFrameBuffer::subpass_transition_impl(), blender::gpu::MTLFrameBuffer::subpass_transition_impl(), blender::gpu::MTLFrameBuffer::update_attachments(), blender::gpu::VKFrameBuffer::update_size(), and ~FrameBuffer().
|
protected |
Is true if internal representation need to be updated.
Definition at line 78 of file gpu_framebuffer_private.hh.
Referenced by attachment_remove(), attachment_set(), blender::gpu::GLFrameBuffer::bind(), blender::gpu::GLFrameBuffer::blit_to(), default_size_set(), blender::gpu::MTLFrameBuffer::ensure_attachments_and_viewport(), FrameBuffer(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), recursive_downsample(), blender::gpu::MTLFrameBuffer::remove_all_attachments(), blender::gpu::VKFrameBuffer::rendering_ensure(), blender::gpu::GLFrameBuffer::subpass_transition_impl(), blender::gpu::MTLFrameBuffer::update_attachments(), blender::gpu::VKFrameBuffer::update_size(), and blender::gpu::MTLFrameBuffer::validate_render_pass().
|
protected |
Definition at line 88 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::GLFrameBuffer::apply_state(), blender::gpu::MTLFrameBuffer::apply_state(), blender::gpu::GLFrameBuffer::bind(), blender::gpu::MTLFrameBuffer::bind(), default_size_set(), FrameBuffer(), blender::gpu::VKFrameBuffer::rendering_ensure(), scissor_set(), scissor_test_set(), size_set(), viewport_multi_set(), and viewport_set().
|
protected |
Definition at line 80 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor(), blender::gpu::GLFrameBuffer::blit_to(), default_size_set(), blender::gpu::MTLFrameBuffer::get_height(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), recursive_downsample(), scissor_reset(), size_set(), viewport_reset(), and blender::gpu::VKFrameBuffer::vk_render_areas_get().
|
protected |
Definition at line 86 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::GLFrameBuffer::apply_state(), blender::gpu::MTLFrameBuffer::apply_state(), viewport_multi_set(), viewport_set(), blender::gpu::VKFrameBuffer::vk_render_areas_get(), and blender::gpu::VKFrameBuffer::vk_viewports_get().
|
protected |
Debug name.
Definition at line 82 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::GLFrameBuffer::check(), blender::gpu::MTLFrameBuffer::check(), FrameBuffer(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), and name_get().
| void** blender::gpu::FrameBuffer::py_ref = nullptr |
Reference of a pointer that needs to be cleaned when deallocating the frame-buffer. Points to BPyGPUFrameBuffer.fb
Definition at line 98 of file gpu_framebuffer_private.hh.
Referenced by ~FrameBuffer().
|
protected |
Definition at line 85 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::GLFrameBuffer::apply_state(), blender::gpu::MTLFrameBuffer::apply_state(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), scissor_get(), and scissor_set().
|
protected |
Definition at line 87 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::GLFrameBuffer::apply_state(), blender::gpu::MTLFrameBuffer::apply_state(), scissor_test_get(), and scissor_test_set().
|
protected |
Definition at line 90 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor(), get_use_explicit_loadstore(), blender::gpu::VKFrameBuffer::rendering_end(), and set_use_explicit_loadstore().
|
protected |
Frame-buffer state.
Definition at line 84 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::GLFrameBuffer::apply_state(), blender::gpu::MTLFrameBuffer::apply_state(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), viewport_get(), viewport_multi_set(), viewport_set(), and blender::gpu::VKFrameBuffer::vk_viewports_get().
|
protected |
Size of attachment textures.
Definition at line 80 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor(), blender::gpu::GLFrameBuffer::blit_to(), default_size_set(), blender::gpu::MTLFrameBuffer::get_width(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), recursive_downsample(), scissor_reset(), size_set(), viewport_reset(), and blender::gpu::VKFrameBuffer::vk_render_areas_get().