Blender V5.0
blender::gpu::FrameBuffer Class Referenceabstract

#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 GPUAttachmentdepth_attachment () const
blender::gpu::Texturedepth_tex () const
blender::gpu::Texturecolor_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

Detailed Description

Definition at line 72 of file gpu_framebuffer_private.hh.

Constructor & Destructor Documentation

◆ FrameBuffer()

◆ ~FrameBuffer()

blender::gpu::FrameBuffer::~FrameBuffer ( )
virtual

Definition at line 49 of file gpu_framebuffer.cc.

References attachments_, and py_ref.

Member Function Documentation

◆ attachment_remove()

void blender::gpu::FrameBuffer::attachment_remove ( GPUAttachmentType type)

◆ attachment_set()

◆ attachment_set_loadstore_op()

virtual void blender::gpu::FrameBuffer::attachment_set_loadstore_op ( GPUAttachmentType type,
GPULoadStore ls )
pure virtual

◆ bind()

◆ blit_to()

virtual void blender::gpu::FrameBuffer::blit_to ( GPUFrameBufferBits planes,
int src_slot,
FrameBuffer * dst,
int dst_slot,
int dst_offset_x,
int dst_offset_y )
pure virtual

◆ check()

virtual bool blender::gpu::FrameBuffer::check ( char err_out[256])
pure virtual

◆ clear()

virtual void blender::gpu::FrameBuffer::clear ( GPUFrameBufferBits buffers,
const float clear_col[4],
float clear_depth,
uint clear_stencil )
pure virtual

◆ clear_attachment()

virtual void blender::gpu::FrameBuffer::clear_attachment ( GPUAttachmentType type,
eGPUDataFormat data_format,
const void * clear_value )
pure virtual

◆ clear_multi()

virtual void blender::gpu::FrameBuffer::clear_multi ( const float(*) clear_col[4])
pure virtual

◆ color_tex()

◆ default_size_set()

void blender::gpu::FrameBuffer::default_size_set ( int width,
int height )
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().

◆ depth_attachment()

const GPUAttachment & blender::gpu::FrameBuffer::depth_attachment ( ) const
inline

◆ depth_tex()

blender::gpu::Texture * blender::gpu::FrameBuffer::depth_tex ( ) const
inline

Definition at line 241 of file gpu_framebuffer_private.hh.

References depth_attachment(), and GPUAttachment::tex.

Referenced by GPU_framebuffer_blit().

◆ get_bits_per_pixel()

uint blender::gpu::FrameBuffer::get_bits_per_pixel ( )

◆ get_color_attachments_bitset()

uint16_t blender::gpu::FrameBuffer::get_color_attachments_bitset ( )
inline

Definition at line 266 of file gpu_framebuffer_private.hh.

References color_attachments_bits_.

◆ get_use_explicit_loadstore()

bool blender::gpu::FrameBuffer::get_use_explicit_loadstore ( ) const
inline

Definition at line 261 of file gpu_framebuffer_private.hh.

References use_explicit_load_store_.

Referenced by GPU_framebuffer_clear().

◆ load_store_config_array()

◆ name_get()

const char * blender::gpu::FrameBuffer::name_get ( ) const
inline

Definition at line 251 of file gpu_framebuffer_private.hh.

References name_.

◆ read()

virtual void blender::gpu::FrameBuffer::read ( GPUFrameBufferBits planes,
eGPUDataFormat format,
const int area[4],
int channel_len,
int slot,
void * r_data )
pure virtual

◆ scissor_get()

void blender::gpu::FrameBuffer::scissor_get ( int r_scissor[4]) const
inline

◆ scissor_reset()

◆ scissor_set()

void blender::gpu::FrameBuffer::scissor_set ( const int scissor[4])
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().

◆ scissor_test_get()

bool blender::gpu::FrameBuffer::scissor_test_get ( ) const
inline

◆ scissor_test_set()

void blender::gpu::FrameBuffer::scissor_test_set ( bool test)
inline

Definition at line 200 of file gpu_framebuffer_private.hh.

References dirty_state_, and scissor_test_.

Referenced by GPU_scissor_test().

◆ set_color_attachment_bit()

◆ set_use_explicit_loadstore()

void blender::gpu::FrameBuffer::set_use_explicit_loadstore ( bool use_explicit_loadstore)
inline

Definition at line 256 of file gpu_framebuffer_private.hh.

References use_explicit_load_store_.

◆ size_set()

◆ subpass_transition()

◆ subpass_transition_impl()

virtual void blender::gpu::FrameBuffer::subpass_transition_impl ( const GPUAttachmentState depth_attachment_state,
Span< GPUAttachmentState > color_attachment_states )
protectedpure virtual

◆ viewport_get()

void blender::gpu::FrameBuffer::viewport_get ( int r_viewport[4]) const
inline

◆ viewport_multi_set()

void blender::gpu::FrameBuffer::viewport_multi_set ( const int viewports[GPU_MAX_VIEWPORTS][4])
inline

◆ viewport_reset()

◆ viewport_set()

void blender::gpu::FrameBuffer::viewport_set ( const int viewport[4])
inline

Member Data Documentation

◆ attachments_

◆ color_attachments_bits_

uint16_t blender::gpu::FrameBuffer::color_attachments_bits_ = 0
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().

◆ dirty_attachments_

◆ dirty_state_

◆ height_

◆ multi_viewport_

◆ name_

◆ py_ref

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().

◆ scissor_

◆ scissor_test_

bool blender::gpu::FrameBuffer::scissor_test_ = false
protected

◆ use_explicit_load_store_

◆ viewport_

◆ width_


The documentation for this class was generated from the following files: