Blender
V3.3
|
#include <mtl_framebuffer.hh>
Creation & Deletion | |
MTLFrameBuffer (MTLContext *ctx, const char *name) | |
~MTLFrameBuffer () | |
void | bind (bool enabled_srgb) override |
bool | check (char err_out[256]) override |
void | clear (eGPUFrameBufferBits buffers, const float clear_col[4], float clear_depth, uint clear_stencil) override |
void | clear_multi (const float(*clear_cols)[4]) override |
void | clear_attachment (GPUAttachmentType type, eGPUDataFormat data_format, const void *clear_value) override |
void | read (eGPUFrameBufferBits planes, eGPUDataFormat format, const int area[4], int channel_len, int slot, void *r_data) override |
void | blit_to (eGPUFrameBufferBits planes, int src_slot, FrameBuffer *dst, int dst_slot, int dst_offset_x, int dst_offset_y) override |
Additional Inherited Members | |
![]() | |
void ** | py_ref = nullptr |
void ** | ref = nullptr |
![]() | |
GPUAttachment | attachments_ [GPU_FB_MAX_ATTACHMENT] |
bool | dirty_attachments_ |
int | width_ |
int | height_ |
char | name_ [DEBUG_NAME_LEN] |
int | viewport_ [4] = {0} |
int | scissor_ [4] = {0} |
bool | scissor_test_ = false |
bool | dirty_state_ = true |
Implementation of FrameBuffer object using Metal.
Definition at line 44 of file mtl_framebuffer.hh.
blender::gpu::MTLFrameBuffer::MTLFrameBuffer | ( | MTLContext * | ctx, |
const char * | name | ||
) |
Create a conventional framebuffer to attach texture to.
Definition at line 21 of file mtl_framebuffer.mm.
References GPU_FB_MAX_COLOR_ATTACHMENT, init, MTL_FB_CONFIG_MAX, blender::gpu::FrameBuffer::scissor_reset(), blender::gpu::FrameBuffer::size_set(), blender::gpu::MTLAttachment::used, and blender::gpu::FrameBuffer::viewport_reset().
blender::gpu::MTLFrameBuffer::~MTLFrameBuffer | ( | ) |
Definition at line 54 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, blender::gpu::Context::back_left, BLI_assert, blender::gpu::MTLCommandBufferManager::end_active_command_encoder(), blender::gpu::MTLCommandBufferManager::get_active_framebuffer(), GPU_context_active_get(), GPU_FB_MAX_COLOR_ATTACHMENT, GPU_framebuffer_restore(), blender::gpu::MTLContext::main_command_buffer, MTL_FB_CONFIG_MAX, remove_all_attachments(), and blender::gpu::unwrap().
bool blender::gpu::MTLFrameBuffer::add_color_attachment | ( | gpu::MTLTexture * | texture, |
uint | slot, | ||
int | miplevel, | ||
int | layer | ||
) |
\ Adding and Removing attachments
Definition at line 799 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::Texture::d_, blender::gpu::MTLAttachment::depth_plane, get_attachment_limit(), GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE, blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_1D_ARRAY, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_2D_ARRAY, blender::gpu::GPU_TEXTURE_3D, blender::gpu::GPU_TEXTURE_BUFFER, blender::gpu::GPU_TEXTURE_CUBE, blender::gpu::GPU_TEXTURE_CUBE_ARRAY, blender::gpu::FrameBuffer::height_, blender::gpu::Texture::height_get(), blender::gpu::MTLAttachment::load_action, mark_dirty(), max_ii(), blender::gpu::MTLAttachment::mip, MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTL_MAX_MIPMAP_COUNT, blender::gpu::MTLAttachment::render_target_array_length, blender::gpu::FrameBuffer::scissor_reset(), blender::gpu::FrameBuffer::size_set(), blender::gpu::MTLAttachment::slice, blender::gpu::MTLAttachment::store_action, blender::gpu::MTLAttachment::texture, blender::gpu::Texture::type_, blender::gpu::MTLAttachment::used, blender::gpu::FrameBuffer::viewport_reset(), blender::gpu::FrameBuffer::width_, and blender::gpu::Texture::width_get().
Referenced by update_attachments().
bool blender::gpu::MTLFrameBuffer::add_depth_attachment | ( | gpu::MTLTexture * | texture, |
int | miplevel, | ||
int | layer | ||
) |
Definition at line 927 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::Texture::d_, blender::gpu::MTLAttachment::depth_plane, GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE, blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_1D_ARRAY, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_2D_ARRAY, blender::gpu::GPU_TEXTURE_3D, blender::gpu::GPU_TEXTURE_BUFFER, blender::gpu::GPU_TEXTURE_CUBE, blender::gpu::GPU_TEXTURE_CUBE_ARRAY, blender::gpu::FrameBuffer::height_, blender::gpu::Texture::height_get(), blender::gpu::MTLAttachment::load_action, mark_dirty(), max_ii(), blender::gpu::MTLAttachment::mip, MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTL_MAX_MIPMAP_COUNT, blender::gpu::MTLAttachment::render_target_array_length, blender::gpu::FrameBuffer::scissor_reset(), blender::gpu::FrameBuffer::size_set(), blender::gpu::MTLAttachment::slice, blender::gpu::MTLAttachment::store_action, blender::gpu::MTLAttachment::texture, blender::gpu::Texture::type_, blender::gpu::MTLAttachment::used, blender::gpu::FrameBuffer::viewport_reset(), blender::gpu::FrameBuffer::width_, and blender::gpu::Texture::width_get().
Referenced by update_attachments().
bool blender::gpu::MTLFrameBuffer::add_stencil_attachment | ( | gpu::MTLTexture * | texture, |
int | miplevel, | ||
int | layer | ||
) |
Definition at line 1049 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::Texture::d_, blender::gpu::MTLAttachment::depth_plane, GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE, blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_1D_ARRAY, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_2D_ARRAY, blender::gpu::GPU_TEXTURE_3D, blender::gpu::GPU_TEXTURE_BUFFER, blender::gpu::GPU_TEXTURE_CUBE, blender::gpu::GPU_TEXTURE_CUBE_ARRAY, blender::gpu::FrameBuffer::height_, blender::gpu::Texture::height_get(), blender::gpu::MTLAttachment::load_action, mark_dirty(), max_ii(), blender::gpu::MTLAttachment::mip, MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTL_MAX_MIPMAP_COUNT, blender::gpu::MTLAttachment::render_target_array_length, blender::gpu::FrameBuffer::scissor_reset(), blender::gpu::FrameBuffer::size_set(), blender::gpu::MTLAttachment::slice, blender::gpu::MTLAttachment::store_action, blender::gpu::MTLAttachment::texture, blender::gpu::Texture::type_, blender::gpu::MTLAttachment::used, blender::gpu::FrameBuffer::viewport_reset(), blender::gpu::FrameBuffer::width_, and blender::gpu::Texture::width_get().
Referenced by update_attachments().
void blender::gpu::MTLFrameBuffer::apply_state | ( | ) |
Definition at line 761 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, BLI_assert, blender::gpu::FrameBuffer::dirty_state_, GPU_context_active_get(), MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::FrameBuffer::scissor_, blender::gpu::FrameBuffer::scissor_test_, blender::gpu::MTLContext::set_scissor(), blender::gpu::MTLContext::set_scissor_enabled(), blender::gpu::MTLContext::set_viewport(), blender::gpu::unwrap(), blender::gpu::FrameBuffer::viewport_, and blender::gpu::FrameBuffer::viewport_reset().
Referenced by clear(), clear_attachment(), clear_multi(), and blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder().
|
overridevirtual |
\ Clear values and Load-store actions
Implements blender::gpu::FrameBuffer.
Definition at line 1249 of file mtl_framebuffer.mm.
References GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, set_color_loadstore_op(), set_depth_loadstore_op(), set_stencil_loadstore_op(), and type.
MTLRenderPassDescriptor * blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor | ( | bool | load_contents | ) |
Definition at line 1496 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::clear_value, blender::gpu::MTLAttachment::color, blender::gpu::MTLAttachment::depth, blender::gpu::MTLAttachment::depth_plane, blender::gpu::MTLContext::device, blender::gpu::FrameBuffer::get_bits_per_pixel(), blender::gpu::MTLContext::get_inside_frame(), get_is_srgb(), get_pending_clear(), get_srgb_enabled(), GPU_context_active_get(), GPU_FB_MAX_COLOR_ATTACHMENT, GPU_LOADACTION_CLEAR, GPU_LOADACTION_LOAD, init, len, blender::gpu::MTLAttachment::load_action, blender::gpu::MTLAttachment::mip, blender::gpu::mtl_load_action_from_gpu(), MTL_LOG_ERROR, blender::gpu::mtl_store_action_from_gpu(), blender::gpu::MTLAttachment::render_target_array_length, blender::gpu::MTLAttachment::slice, blender::gpu::MTLAttachment::stencil, blender::gpu::MTLAttachment::store_action, blender::gpu::MTLAttachment::texture, UNUSED_VARS_NDEBUG, blender::gpu::unwrap(), and blender::gpu::MTLAttachment::used.
Referenced by blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder().
Implements blender::gpu::FrameBuffer.
Definition at line 93 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, BLI_assert, blender::gpu::FrameBuffer::dirty_state_, blender::gpu::MTLContext::framebuffer_bind(), GPU_context_active_get(), GPU_shader_set_framebuffer_srgb_target(), mark_dirty(), MTL_LOG_WARNING, reset_clear_state(), blender::gpu::unwrap(), and update_attachments().
void blender::gpu::MTLFrameBuffer::blit | ( | uint | read_slot, |
uint | src_x_offset, | ||
uint | src_y_offset, | ||
MTLFrameBuffer * | metal_fb_write, | ||
uint | write_slot, | ||
uint | dst_x_offset, | ||
uint | dst_y_offset, | ||
uint | width, | ||
uint | height, | ||
eGPUFrameBufferBits | blit_buffers | ||
) |
\ Blitting
Definition at line 1743 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLCommandBufferManager::ensure_begin_blit_encoder(), blender::gpu::Texture::format_get(), get_color_attachment(), get_depth_attachment(), get_stencil_attachment(), GPU_COLOR_BIT, GPU_context_active_get(), GPU_DEPTH_BIT, GPU_STENCIL_BIT, height, blender::gpu::MTLContext::main_command_buffer, blender::gpu::MTLAttachment::mip, MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTLAttachment::slice, blender::gpu::MTLAttachment::texture, blender::gpu::MTLAttachment::used, and width.
Referenced by blit_to().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 528 of file mtl_framebuffer.mm.
References BLI_assert, blit(), get_color_attachment(), get_depth_attachment(), get_stencil_attachment(), GPU_COLOR_BIT, GPU_DEPTH_BIT, GPU_STENCIL_BIT, blender::gpu::Texture::height_get(), blender::gpu::MTLAttachment::texture, update_attachments(), blender::gpu::MTLAttachment::used, and blender::gpu::Texture::width_get().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 129 of file mtl_framebuffer.mm.
References BLI_assert, BLI_snprintf(), get_attachment_count(), get_color_attachment(), get_depth_attachment(), get_stencil_attachment(), GPU_TEXTURE_USAGE_ATTACHMENT, has_depth_attachment(), has_stencil_attachment(), blender::gpu::Texture::height_get(), MTL_LOG_ERROR, blender::gpu::FrameBuffer::name_, blender::gpu::MTLAttachment::texture, update_attachments(), blender::gpu::MTLAttachment::used, and blender::gpu::Texture::width_get().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 290 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, apply_state(), BLI_assert, GPU_COLOR_BIT, GPU_context_active_get(), GPU_DEPTH_BIT, GPU_STENCIL_BIT, has_depth_attachment(), has_stencil_attachment(), reset_clear_state(), set_color_attachment_clear_color(), set_depth_attachment_clear_value(), set_stencil_attachment_clear_value(), blender::gpu::unwrap(), and update_attachments().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 370 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, apply_state(), BLI_assert, BLI_assert_msg, float(), GPU_context_active_get(), GPU_DATA_FLOAT, GPU_DATA_INT, GPU_DATA_UINT, GPU_DATA_UINT_24_8, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, has_attachment_at_slot(), has_depth_attachment(), has_stencil_attachment(), reset_clear_state(), set_color_attachment_clear_color(), set_depth_attachment_clear_value(), set_stencil_attachment_clear_value(), type, and blender::gpu::unwrap().
Implements blender::gpu::FrameBuffer.
Definition at line 340 of file mtl_framebuffer.mm.
References apply_state(), get_attachment_limit(), has_attachment_at_slot(), reset_clear_state(), and set_color_attachment_clear_color().
void blender::gpu::MTLFrameBuffer::ensure_render_target_size | ( | ) |
Definition at line 1230 of file mtl_framebuffer.mm.
References has_depth_attachment(), has_stencil_attachment(), blender::gpu::FrameBuffer::scissor_reset(), blender::gpu::FrameBuffer::size_set(), and blender::gpu::FrameBuffer::viewport_reset().
Referenced by remove_all_attachments(), remove_color_attachment(), remove_depth_attachment(), and remove_stencil_attachment().
uint blender::gpu::MTLFrameBuffer::get_attachment_count | ( | ) |
Definition at line 1431 of file mtl_framebuffer.mm.
References BLI_assert.
Referenced by check(), and update_attachments().
|
inline |
Definition at line 180 of file mtl_framebuffer.hh.
References GPU_FB_MAX_COLOR_ATTACHMENT.
Referenced by add_color_attachment(), clear_multi(), get_color_attachment_slot_from_texture(), has_attachment_at_slot(), has_color_attachment_with_texture(), remove_color_attachment(), and set_color_attachment_clear_color().
MTLAttachment blender::gpu::MTLFrameBuffer::get_color_attachment | ( | uint | slot | ) |
Definition at line 1437 of file mtl_framebuffer.mm.
References BLI_assert, GPU_FB_MAX_COLOR_ATTACHMENT, and blender::gpu::MTLAttachment::used.
Referenced by blit(), blit_to(), check(), read(), and update_attachments().
int blender::gpu::MTLFrameBuffer::get_color_attachment_slot_from_texture | ( | gpu::MTLTexture * | texture | ) |
Definition at line 1417 of file mtl_framebuffer.mm.
References BLI_assert, and get_attachment_limit().
MTLAttachment blender::gpu::MTLFrameBuffer::get_depth_attachment | ( | ) |
Definition at line 1448 of file mtl_framebuffer.mm.
References BLI_assert.
Referenced by blit(), blit_to(), check(), read(), and update_attachments().
|
inline |
Definition at line 206 of file mtl_framebuffer.hh.
Referenced by blender::gpu::MTLContext::ensure_begin_render_pass().
int blender::gpu::MTLFrameBuffer::get_height | ( | ) |
Definition at line 1894 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::height_.
|
inline |
Definition at line 221 of file mtl_framebuffer.hh.
Referenced by bake_render_pass_descriptor().
|
inline |
Definition at line 211 of file mtl_framebuffer.hh.
Referenced by bake_render_pass_descriptor(), and blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder().
|
inline |
Definition at line 216 of file mtl_framebuffer.hh.
Referenced by bake_render_pass_descriptor().
MTLAttachment blender::gpu::MTLFrameBuffer::get_stencil_attachment | ( | ) |
Definition at line 1454 of file mtl_framebuffer.mm.
References BLI_assert.
Referenced by blit(), blit_to(), check(), and update_attachments().
int blender::gpu::MTLFrameBuffer::get_width | ( | ) |
Definition at line 1890 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::width_.
\ Fetch values and Framebuffer status
Definition at line 1382 of file mtl_framebuffer.mm.
References BLI_assert, get_attachment_limit(), and blender::gpu::MTLAttachment::used.
Referenced by clear_attachment(), clear_multi(), read(), remove_color_attachment(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::has_color_attachment_with_texture | ( | gpu::MTLTexture * | texture | ) |
Definition at line 1392 of file mtl_framebuffer.mm.
References BLI_assert, and get_attachment_limit().
bool blender::gpu::MTLFrameBuffer::has_depth_attachment | ( | ) |
Definition at line 1405 of file mtl_framebuffer.mm.
References BLI_assert, and blender::gpu::MTLAttachment::used.
Referenced by check(), clear(), clear_attachment(), ensure_render_target_size(), read(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::has_stencil_attachment | ( | ) |
Definition at line 1411 of file mtl_framebuffer.mm.
References BLI_assert, and blender::gpu::MTLAttachment::used.
Referenced by check(), clear(), clear_attachment(), ensure_render_target_size(), and update_attachments().
void blender::gpu::MTLFrameBuffer::mark_cleared | ( | ) |
Definition at line 594 of file mtl_framebuffer.mm.
Referenced by blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder().
void blender::gpu::MTLFrameBuffer::mark_dirty | ( | ) |
\ Private METAL implementation functions
Definition at line 583 of file mtl_framebuffer.mm.
Referenced by add_color_attachment(), add_depth_attachment(), add_stencil_attachment(), bind(), remove_all_attachments(), remove_color_attachment(), remove_depth_attachment(), and remove_stencil_attachment().
void blender::gpu::MTLFrameBuffer::mark_do_clear | ( | ) |
Definition at line 599 of file mtl_framebuffer.mm.
void blender::gpu::MTLFrameBuffer::mark_loadstore_dirty | ( | ) |
Definition at line 589 of file mtl_framebuffer.mm.
Referenced by set_color_attachment_clear_color(), set_color_loadstore_op(), set_depth_attachment_clear_value(), set_depth_loadstore_op(), set_stencil_attachment_clear_value(), and set_stencil_loadstore_op().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 456 of file mtl_framebuffer.mm.
References blender::compositor::area(), BLI_assert, color, get_color_attachment(), get_depth_attachment(), GPU_COLOR_BIT, GPU_DEPTH_BIT, GPU_STENCIL_BIT, has_attachment_at_slot(), has_depth_attachment(), MTL_LOG_ERROR, tex, blender::gpu::MTLAttachment::texture, and blender::gpu::to_bytesize().
void blender::gpu::MTLFrameBuffer::remove_all_attachments | ( | ) |
Definition at line 1211 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::FrameBuffer::dirty_attachments_, ensure_render_target_size(), GPU_FB_MAX_COLOR_ATTACHMENT, mark_dirty(), remove_color_attachment(), remove_depth_attachment(), and remove_stencil_attachment().
Referenced by update_attachments(), and ~MTLFrameBuffer().
Definition at line 1171 of file mtl_framebuffer.mm.
References BLI_assert, ensure_render_target_size(), get_attachment_limit(), has_attachment_at_slot(), mark_dirty(), and blender::gpu::MTLAttachment::used.
Referenced by remove_all_attachments(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::remove_depth_attachment | ( | ) |
Definition at line 1187 of file mtl_framebuffer.mm.
References BLI_assert, ensure_render_target_size(), mark_dirty(), blender::gpu::MTLAttachment::texture, and blender::gpu::MTLAttachment::used.
Referenced by remove_all_attachments(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::remove_stencil_attachment | ( | ) |
Definition at line 1199 of file mtl_framebuffer.mm.
References BLI_assert, ensure_render_target_size(), mark_dirty(), blender::gpu::MTLAttachment::texture, and blender::gpu::MTLAttachment::used.
Referenced by remove_all_attachments(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::reset_clear_state | ( | ) |
Definition at line 1366 of file mtl_framebuffer.mm.
References GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE, set_color_loadstore_op(), set_depth_loadstore_op(), and set_stencil_loadstore_op().
Referenced by bind(), clear(), clear_attachment(), and clear_multi().
bool blender::gpu::MTLFrameBuffer::set_color_attachment_clear_color | ( | uint | slot, |
const float | clear_color[4] | ||
) |
Definition at line 1266 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::color, get_attachment_limit(), GPU_LOADACTION_CLEAR, blender::gpu::MTLAttachment::load_action, and mark_loadstore_dirty().
Referenced by clear(), clear_attachment(), clear_multi(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::set_color_loadstore_op | ( | uint | slot, |
eGPULoadOp | load_action, | ||
eGPUStoreOp | store_action | ||
) |
Definition at line 1313 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::load_action, mark_loadstore_dirty(), and blender::gpu::MTLAttachment::store_action.
Referenced by attachment_set_loadstore_op(), reset_clear_state(), and update_attachments().
Definition at line 1287 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::clear_value, blender::gpu::MTLAttachment::depth, GPU_LOADACTION_CLEAR, blender::gpu::MTLAttachment::load_action, and mark_loadstore_dirty().
Referenced by clear(), clear_attachment(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::set_depth_loadstore_op | ( | eGPULoadOp | load_action, |
eGPUStoreOp | store_action | ||
) |
Definition at line 1332 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::load_action, mark_loadstore_dirty(), and blender::gpu::MTLAttachment::store_action.
Referenced by attachment_set_loadstore_op(), reset_clear_state(), and update_attachments().
Definition at line 1300 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::clear_value, GPU_LOADACTION_CLEAR, blender::gpu::MTLAttachment::load_action, mark_loadstore_dirty(), and blender::gpu::MTLAttachment::stencil.
Referenced by clear(), clear_attachment(), and update_attachments().
bool blender::gpu::MTLFrameBuffer::set_stencil_loadstore_op | ( | eGPULoadOp | load_action, |
eGPUStoreOp | store_action | ||
) |
Definition at line 1349 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::load_action, mark_loadstore_dirty(), and blender::gpu::MTLAttachment::store_action.
Referenced by attachment_set_loadstore_op(), reset_clear_state(), and update_attachments().
Definition at line 604 of file mtl_framebuffer.mm.
References add_color_attachment(), add_depth_attachment(), add_stencil_attachment(), blender::gpu::FrameBuffer::attachments_, blender::gpu::MTLAttachment::clear_value, blender::gpu::MTLAttachment::color, blender::gpu::MTLAttachment::depth, blender::gpu::FrameBuffer::dirty_attachments_, blender::gpu::Texture::format_get(), get_attachment_count(), get_color_attachment(), get_depth_attachment(), get_stencil_attachment(), GPU_DEPTH24_STENCIL8, GPU_DEPTH32F_STENCIL8, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_COLOR_ATTACHMENT1, GPU_FB_COLOR_ATTACHMENT2, GPU_FB_COLOR_ATTACHMENT3, GPU_FB_COLOR_ATTACHMENT4, GPU_FB_COLOR_ATTACHMENT5, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_FB_MAX_ATTACHMENT, GPU_SRGB8_A8, GPU_texture_format(), has_attachment_at_slot(), has_depth_attachment(), has_stencil_attachment(), blender::gpu::FrameBuffer::height_, GPUAttachment::layer, blender::gpu::MTLAttachment::load_action, GPUAttachment::mip, remove_all_attachments(), remove_color_attachment(), remove_depth_attachment(), remove_stencil_attachment(), blender::gpu::FrameBuffer::scissor_get(), blender::gpu::FrameBuffer::scissor_reset(), blender::gpu::FrameBuffer::scissor_set(), set_color_attachment_clear_color(), set_color_loadstore_op(), set_depth_attachment_clear_value(), set_depth_loadstore_op(), set_stencil_attachment_clear_value(), set_stencil_loadstore_op(), blender::gpu::MTLAttachment::stencil, blender::gpu::MTLAttachment::store_action, GPUAttachment::tex, blender::gpu::MTLAttachment::texture, type, blender::gpu::unwrap(), blender::gpu::FrameBuffer::viewport_get(), blender::gpu::FrameBuffer::viewport_reset(), blender::gpu::FrameBuffer::viewport_set(), and blender::gpu::FrameBuffer::width_.
Referenced by bind(), blit_to(), check(), clear(), and validate_render_pass().
bool blender::gpu::MTLFrameBuffer::validate_render_pass | ( | ) |
\ METAL API Resources and Validation
Definition at line 1465 of file mtl_framebuffer.mm.
References BLI_assert, GPU_FB_MAX_COLOR_ATTACHMENT, update_attachments(), and blender::gpu::MTLAttachment::used.