|
Blender V5.0
|
#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 (GPUFrameBufferBits 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 (GPUFrameBufferBits planes, eGPUDataFormat format, const int area[4], int channel_len, int slot, void *r_data)=0 |
| virtual void | blit_to (GPUFrameBufferBits 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 () |
| const GPUAttachment & | depth_attachment () const |
| blender::gpu::Texture * | depth_tex () const |
| blender::gpu::Texture * | color_tex (int slot) const |
| const char * | name_get () const |
| void | set_use_explicit_loadstore (bool use_explicit_loadstore) |
| bool | get_use_explicit_loadstore () const |
| uint16_t | get_color_attachments_bitset () |
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) |
| 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 |
| void | set_color_attachment_bit (GPUAttachmentType type, bool value) |
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 |
| uint16_t | color_attachments_bits_ = 0 |
Definition at line 72 of file gpu_framebuffer_private.hh.
| blender::gpu::FrameBuffer::FrameBuffer | ( | const char * | name | ) |
Definition at line 30 of file gpu_framebuffer.cc.
References attachments_, dirty_attachments_, dirty_state_, name, name_, and STRNCPY().
Referenced by blender::gpu::DummyFrameBuffer::blit_to(), blit_to(), blender::gpu::GLFrameBuffer::blit_to(), blender::gpu::MTLFrameBuffer::blit_to(), blender::gpu::VKFrameBuffer::blit_to(), blender::gpu::DummyFrameBuffer::DummyFrameBuffer(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), blender::gpu::MTLFrameBuffer::MTLFrameBuffer(), and blender::gpu::VKFrameBuffer::VKFrameBuffer().
|
virtual |
Definition at line 49 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_, GPU_ATTACHMENT_NONE, and set_color_attachment_bit().
| void blender::gpu::FrameBuffer::attachment_set | ( | GPUAttachmentType | type, |
| const GPUAttachment & | new_attachment ) |
Definition at line 70 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, set_color_attachment_bit(), and GPUAttachment::tex.
Referenced by blender::gpu::GLFrameBuffer::attachment_set_loadstore_op(), gpu_framebuffer_texture_attach_ex(), and blender::gpu::GLFrameBuffer::subpass_transition_impl().
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by load_store_config_array().
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by GPU_backbuffer_bind(), GPU_framebuffer_blit(), GPU_framebuffer_restore(), and GPU_offscreen_bind().
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
References FrameBuffer().
Referenced by GPU_framebuffer_blit(), and GPU_offscreen_draw_to_screen().
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by GPU_framebuffer_check_valid().
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
References buffers.
Referenced by GPU_clear_color(), GPU_clear_depth(), and GPU_framebuffer_clear().
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 246 of file gpu_framebuffer_private.hh.
References attachments_, and GPU_FB_COLOR_ATTACHMENT0.
Referenced by blender::gpu::VKFrameBuffer::color_attachments_resource_size(), GPU_framebuffer_blit(), blender::gpu::VKFrameBuffer::subpass_transition_impl(), and blender::gpu::VKFrameBuffer::update_srgb().
|
inline |
Definition at line 164 of file gpu_framebuffer_private.hh.
References dirty_attachments_, dirty_state_, height_, and width_.
Referenced by GPU_framebuffer_default_size().
|
inline |
Definition at line 233 of file gpu_framebuffer_private.hh.
References attachments_, GPU_FB_DEPTH_ATTACHMENT, and GPU_FB_DEPTH_STENCIL_ATTACHMENT.
Referenced by blender::gpu::VKFrameBuffer::clear(), and depth_tex().
|
inline |
Definition at line 241 of file gpu_framebuffer_private.hh.
References depth_attachment(), and GPUAttachment::tex.
Referenced by GPU_framebuffer_blit().
| uint blender::gpu::FrameBuffer::get_bits_per_pixel | ( | ) |
Definition at line 196 of file gpu_framebuffer.cc.
References attachments_, blender::gpu::Texture::format_get(), blender::gpu::to_bytesize(), and blender::gpu::to_component_len().
|
inline |
Definition at line 266 of file gpu_framebuffer_private.hh.
References color_attachments_bits_.
|
inline |
Definition at line 261 of file gpu_framebuffer_private.hh.
References use_explicit_load_store_.
Referenced by GPU_framebuffer_clear().
| void blender::gpu::FrameBuffer::load_store_config_array | ( | const GPULoadStore * | load_store_actions, |
| uint | actions_len ) |
Definition at line 160 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, i, GPULoadStore::load_action, blender::Span< T >::size(), and GPULoadStore::store_action.
|
inline |
Definition at line 251 of file gpu_framebuffer_private.hh.
References name_.
|
pure virtual |
Implemented in blender::gpu::DummyFrameBuffer, blender::gpu::GLFrameBuffer, blender::gpu::MTLFrameBuffer, and blender::gpu::VKFrameBuffer.
Referenced by GPU_frontbuffer_read_color().
|
inline |
Definition at line 211 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), and scissor_.
Referenced by GPU_scissor_get(), and blender::gpu::VKFrameBuffer::render_area_update().
|
inline |
Definition at line 227 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 192 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 216 of file gpu_framebuffer_private.hh.
References scissor_test_.
Referenced by blender::gpu::VKFrameBuffer::render_area_update().
|
inline |
Definition at line 200 of file gpu_framebuffer_private.hh.
References dirty_state_, and scissor_test_.
Referenced by GPU_scissor_test().
|
inlineprotected |
Definition at line 136 of file gpu_framebuffer_private.hh.
References color_attachments_bits_, GPU_FB_COLOR_ATTACHMENT0, and SET_FLAG_FROM_TEST.
Referenced by blender::gpu::MTLFrameBuffer::add_color_attachment(), attachment_remove(), attachment_set(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), blender::gpu::MTLFrameBuffer::remove_color_attachment(), and subpass_transition().
|
inline |
Definition at line 256 of file gpu_framebuffer_private.hh.
References use_explicit_load_store_.
|
inline |
Definition at line 156 of file gpu_framebuffer_private.hh.
References dirty_state_, height_, and width_.
Referenced by 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 131 of file gpu_framebuffer.cc.
References attachments_, BLI_assert, GPU_ATTACHMENT_IGNORE, GPU_ATTACHMENT_READ, GPU_ATTACHMENT_WRITE, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_FB_MAX_COLOR_ATTACHMENT, i, set_color_attachment_bit(), blender::Span< T >::size(), and subpass_transition_impl().
|
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 206 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), and viewport_.
Referenced by GPU_framebuffer_viewport_get(), GPU_viewport_size_get_f(), and GPU_viewport_size_get_i().
|
inline |
Definition at line 181 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), dirty_state_, equals_v4v4_int(), GPU_MAX_VIEWPORTS, i, multi_viewport_, and viewport_.
Referenced by GPU_framebuffer_multi_viewports_set().
|
inline |
Definition at line 221 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(), GPU_framebuffer_viewport_reset(), and blender::gpu::MTLFrameBuffer::MTLFrameBuffer().
|
inline |
Definition at line 172 of file gpu_framebuffer_private.hh.
References copy_v4_v4_int(), dirty_state_, equals_v4v4_int(), multi_viewport_, and viewport_.
Referenced by GPU_framebuffer_viewport_set(), GPU_viewport(), and viewport_reset().
|
protected |
Set of texture attachments to render to. DEPTH and DEPTH_STENCIL are mutually exclusive.
Definition at line 75 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_attachment(), FrameBuffer(), get_bits_per_pixel(), load_store_config_array(), blender::gpu::GLFrameBuffer::read(), blender::gpu::VKFrameBuffer::read(), blender::gpu::VKFrameBuffer::rendering_ensure_dynamic_rendering(), 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 |
Bit-set indicating the color attachments slots in use.
Definition at line 91 of file gpu_framebuffer_private.hh.
Referenced by get_color_attachments_bitset(), and set_color_attachment_bit().
|
protected |
Is true if internal representation need to be updated.
Definition at line 77 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(), 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 87 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 79 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(), blender::gpu::VKFrameBuffer::render_area_update(), scissor_reset(), size_set(), and viewport_reset().
|
protected |
Definition at line 85 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_append(), and blender::gpu::VKFrameBuffer::vk_viewports_append().
|
protected |
Debug name.
Definition at line 81 of file gpu_framebuffer_private.hh.
Referenced by blender::gpu::GLFrameBuffer::check(), blender::gpu::MTLFrameBuffer::check(), FrameBuffer(), blender::gpu::GLFrameBuffer::GLFrameBuffer(), name_get(), and blender::draw::Framebuffer::operator=().
| 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 99 of file gpu_framebuffer_private.hh.
Referenced by ~FrameBuffer().
|
protected |
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(), scissor_get(), and scissor_set().
|
protected |
Definition at line 86 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 89 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 83 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_append().
|
protected |
Size of attachment textures.
Definition at line 79 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(), blender::gpu::VKFrameBuffer::render_area_update(), scissor_reset(), size_set(), and viewport_reset().