|
Blender V4.3
|
#include <mtl_framebuffer.hh>
Inherits blender::gpu::FrameBuffer.
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 |
| void | ensure_attachments_and_viewport () |
| void | subpass_transition_impl (const GPUAttachmentState, Span< GPUAttachmentState > color_attachment_states) override |
Additional Inherited Members | |
Public Attributes inherited from blender::gpu::FrameBuffer | |
| void ** | py_ref = nullptr |
Protected Attributes inherited from blender::gpu::FrameBuffer | |
| 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 |
Implementation of FrameBuffer object using Metal.
Definition at line 46 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 25 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 58 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::MTLContext::get(), blender::gpu::MTLCommandBufferManager::get_active_framebuffer(), GPU_FB_MAX_COLOR_ATTACHMENT, GPU_framebuffer_restore(), blender::gpu::MTLContext::main_command_buffer, MTL_FB_CONFIG_MAX, and remove_all_attachments().
| bool blender::gpu::MTLFrameBuffer::add_color_attachment | ( | gpu::MTLTexture * | texture, |
| uint | slot, | ||
| int | miplevel, | ||
| int | layer ) |
\ Adding and Removing attachments
Definition at line 838 of file mtl_framebuffer.mm.
References BLI_assert, default_size_set(), 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::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::MTLAttachment::slice, blender::gpu::MTLAttachment::store_action, blender::gpu::MTLAttachment::texture, texture, and blender::gpu::MTLAttachment::used.
Referenced by update_attachments().
| bool blender::gpu::MTLFrameBuffer::add_depth_attachment | ( | gpu::MTLTexture * | texture, |
| int | miplevel, | ||
| int | layer ) |
Definition at line 964 of file mtl_framebuffer.mm.
References BLI_assert, BLI_assert_msg, default_size_set(), 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::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::MTLAttachment::slice, blender::gpu::MTLAttachment::store_action, blender::gpu::MTLAttachment::texture, texture, and blender::gpu::MTLAttachment::used.
Referenced by update_attachments().
| bool blender::gpu::MTLFrameBuffer::add_stencil_attachment | ( | gpu::MTLTexture * | texture, |
| int | miplevel, | ||
| int | layer ) |
Definition at line 1083 of file mtl_framebuffer.mm.
References BLI_assert, BLI_assert_msg, default_size_set(), 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::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::MTLAttachment::slice, blender::gpu::MTLAttachment::store_action, blender::gpu::MTLAttachment::texture, texture, and blender::gpu::MTLAttachment::used.
Referenced by update_attachments().
| void blender::gpu::MTLFrameBuffer::apply_state | ( | ) |
Definition at line 793 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, BLI_assert, blender::gpu::FrameBuffer::dirty_state_, blender::gpu::MTLContext::get(), GPU_MAX_VIEWPORTS, MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::FrameBuffer::multi_viewport_, 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::MTLContext::set_viewports(), and blender::gpu::FrameBuffer::viewport_.
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 1278 of file mtl_framebuffer.mm.
References GPULoadStore::clear_value, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_LOADACTION_CLEAR, GPULoadStore::load_action, set_color_attachment_clear_color(), set_color_loadstore_op(), set_depth_attachment_clear_value(), set_depth_loadstore_op(), set_stencil_loadstore_op(), and GPULoadStore::store_action.
| MTLRenderPassDescriptor * blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor | ( | bool | load_contents | ) |
Definition at line 1531 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::get(), blender::gpu::MTLContext::get_inside_frame(), get_is_srgb(), get_pending_clear(), get_srgb_enabled(), GPU_FB_MAX_COLOR_ATTACHMENT, GPU_LOADACTION_CLEAR, GPU_LOADACTION_DONT_CARE, GPU_LOADACTION_LOAD, GPU_STOREACTION_DONT_CARE, GPU_STOREACTION_STORE, GPU_TEXTURE_USAGE_MEMORYLESS, blender::gpu::FrameBuffer::height_, init(), blender::gpu::MTLTexture::is_format_srgb(), 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, texture, UNPACK4, UNUSED_VARS_NDEBUG, blender::gpu::Texture::usage_get(), blender::gpu::FrameBuffer::use_explicit_load_store_, blender::gpu::MTLAttachment::used, and blender::gpu::FrameBuffer::width_.
Referenced by blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 109 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, BLI_assert_msg, blender::gpu::FrameBuffer::dirty_state_, ensure_attachments_and_viewport(), blender::gpu::MTLContext::framebuffer_bind(), blender::gpu::MTLContext::get(), mark_dirty(), MTL_LOG_WARNING, reset_clear_state(), and blender::gpu::Shader::set_framebuffer_srgb_target().
| 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 1837 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLCommandBufferManager::ensure_begin_blit_encoder(), blender::gpu::Texture::format_get(), blender::gpu::MTLContext::get(), get_color_attachment(), get_depth_attachment(), get_stencil_attachment(), GPU_COLOR_BIT, GPU_DEPTH_BIT, GPU_STENCIL_BIT, blender::gpu::MTLContext::main_command_buffer, blender::gpu::MTLAttachment::mip, MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTLAttachment::slice, blender::gpu::MTLAttachment::texture, and blender::gpu::MTLAttachment::used.
Referenced by blit_to().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 575 of file mtl_framebuffer.mm.
References BLI_assert, blit(), ensure_attachments_and_viewport(), 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, blender::gpu::MTLAttachment::used, and blender::gpu::Texture::width_get().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 147 of file mtl_framebuffer.mm.
References BLI_assert, BLI_snprintf(), ensure_attachments_and_viewport(), 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, blender::gpu::MTLAttachment::used, and blender::gpu::Texture::width_get().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 311 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, apply_state(), BLI_assert, buffers, blender::gpu::MTLContext::get(), GPU_COLOR_BIT, 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(), and update_attachments().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 391 of file mtl_framebuffer.mm.
References blender::gpu::Context::active_fb, apply_state(), BLI_assert, BLI_assert_msg, float, blender::gpu::MTLContext::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(), and set_stencil_attachment_clear_value().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 361 of file mtl_framebuffer.mm.
References apply_state(), get_attachment_limit(), has_attachment_at_slot(), reset_clear_state(), and set_color_attachment_clear_color().
Definition at line 253 of file mtl_framebuffer.hh.
References w().
Referenced by add_color_attachment(), add_depth_attachment(), add_stencil_attachment(), and ensure_render_target_size().
| void blender::gpu::MTLFrameBuffer::ensure_attachments_and_viewport | ( | ) |
Definition at line 97 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::dirty_attachments_, blender::gpu::FrameBuffer::scissor_reset(), update_attachments(), and blender::gpu::FrameBuffer::viewport_reset().
| void blender::gpu::MTLFrameBuffer::ensure_render_target_size | ( | ) |
Definition at line 1261 of file mtl_framebuffer.mm.
References default_size_set(), has_depth_attachment(), and has_stencil_attachment().
Referenced by remove_all_attachments(), remove_color_attachment(), remove_depth_attachment(), and remove_stencil_attachment().
| uint blender::gpu::MTLFrameBuffer::get_attachment_count | ( | ) |
|
inline |
Definition at line 204 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 1477 of file mtl_framebuffer.mm.
References BLI_assert, GPU_FB_MAX_COLOR_ATTACHMENT, and blender::gpu::MTLAttachment::used.
Referenced by blender::gpu::MTLShader::bake_current_pipeline_state(), blit(), blit_to(), check(), read(), and update_attachments().
| int blender::gpu::MTLFrameBuffer::get_color_attachment_slot_from_texture | ( | gpu::MTLTexture * | texture | ) |
Definition at line 1456 of file mtl_framebuffer.mm.
References BLI_assert, and get_attachment_limit().
| int blender::gpu::MTLFrameBuffer::get_default_height | ( | ) |
Definition at line 1996 of file mtl_framebuffer.mm.
Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().
| int blender::gpu::MTLFrameBuffer::get_default_width | ( | ) |
Definition at line 1992 of file mtl_framebuffer.mm.
Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().
| MTLAttachment blender::gpu::MTLFrameBuffer::get_depth_attachment | ( | ) |
Definition at line 1488 of file mtl_framebuffer.mm.
References BLI_assert.
Referenced by blender::gpu::MTLShader::bake_current_pipeline_state(), blit(), blit_to(), check(), read(), and update_attachments().
|
inline |
Definition at line 233 of file mtl_framebuffer.hh.
Referenced by blender::gpu::MTLBatch::bind(), blender::gpu::MTLContext::ensure_begin_render_pass(), and blender::gpu::MTLContext::ensure_render_pipeline_state().
| int blender::gpu::MTLFrameBuffer::get_height | ( | ) |
Definition at line 1987 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::height_.
Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().
|
inline |
Definition at line 248 of file mtl_framebuffer.hh.
Referenced by blender::gpu::MTLShader::bake_current_pipeline_state(), and bake_render_pass_descriptor().
|
inline |
Definition at line 238 of file mtl_framebuffer.hh.
Referenced by bake_render_pass_descriptor(), and blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder().
|
inline |
Definition at line 243 of file mtl_framebuffer.hh.
Referenced by blender::gpu::MTLShader::bake_current_pipeline_state(), and bake_render_pass_descriptor().
| MTLAttachment blender::gpu::MTLFrameBuffer::get_stencil_attachment | ( | ) |
Definition at line 1494 of file mtl_framebuffer.mm.
References BLI_assert.
Referenced by blender::gpu::MTLShader::bake_current_pipeline_state(), blit(), blit_to(), check(), and update_attachments().
| int blender::gpu::MTLFrameBuffer::get_width | ( | ) |
Definition at line 1983 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::width_.
Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().
| bool blender::gpu::MTLFrameBuffer::has_attachment_at_slot | ( | uint | slot | ) |
\ Fetch values and Frame-buffer status
Definition at line 1420 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 1430 of file mtl_framebuffer.mm.
References BLI_assert, and get_attachment_limit().
| bool blender::gpu::MTLFrameBuffer::has_depth_attachment | ( | ) |
Definition at line 1444 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 1450 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 641 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 630 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 646 of file mtl_framebuffer.mm.
| void blender::gpu::MTLFrameBuffer::mark_loadstore_dirty | ( | ) |
Definition at line 636 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 498 of file mtl_framebuffer.mm.
References BLI_assert, 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, and blender::gpu::to_bytesize().
| void blender::gpu::MTLFrameBuffer::remove_all_attachments | ( | ) |
Definition at line 1242 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().
| bool blender::gpu::MTLFrameBuffer::remove_color_attachment | ( | uint | slot | ) |
Definition at line 1202 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 1218 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 1230 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 1404 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 1302 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 attachment_set_loadstore_op(), 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 1351 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().
| bool blender::gpu::MTLFrameBuffer::set_depth_attachment_clear_value | ( | float | depth_clear | ) |
Definition at line 1323 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 attachment_set_loadstore_op(), clear(), clear_attachment(), and update_attachments().
| bool blender::gpu::MTLFrameBuffer::set_depth_loadstore_op | ( | eGPULoadOp | load_action, |
| eGPUStoreOp | store_action ) |
Definition at line 1370 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().
| bool blender::gpu::MTLFrameBuffer::set_stencil_attachment_clear_value | ( | uint | stencil_clear | ) |
Definition at line 1337 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 1387 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().
|
overrideprotectedvirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 476 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::attachments_, blender::gpu::MTLCommandBufferManager::end_active_command_encoder(), GPU_ARCHITECTURE_TBDR, GPU_ATTACHMENT_READ, GPU_FB_COLOR_ATTACHMENT0, GPU_platform_architecture(), GPU_texture_image_bind(), blender::Span< T >::index_range(), blender::gpu::MTLContext::main_command_buffer, and GPUAttachment::tex.
| void blender::gpu::MTLFrameBuffer::update_attachments | ( | bool | update_viewport | ) |
Definition at line 651 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_, 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_COLOR_ATTACHMENT6, GPU_FB_COLOR_ATTACHMENT7, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_FB_MAX_ATTACHMENT, GPU_SRGB8_A8, GPU_texture_format(), GPU_texture_get_mipmap_size(), has_attachment_at_slot(), has_depth_attachment(), has_stencil_attachment(), GPUAttachment::layer, blender::gpu::MTLAttachment::load_action, GPUAttachment::mip, remove_all_attachments(), remove_color_attachment(), remove_depth_attachment(), remove_stencil_attachment(), 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::FrameBuffer::size_set(), blender::gpu::MTLAttachment::stencil, blender::gpu::MTLAttachment::store_action, GPUAttachment::tex, and blender::gpu::unwrap().
Referenced by clear(), ensure_attachments_and_viewport(), and validate_render_pass().
| bool blender::gpu::MTLFrameBuffer::validate_render_pass | ( | ) |
\ METAL API Resources and Validation
Definition at line 1505 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::FrameBuffer::dirty_attachments_, and update_attachments().