|
Blender V5.0
|
#include <mtl_framebuffer.hh>
Inherits blender::gpu::FrameBuffer.
Creation & Deletion | |
| MTLFrameBuffer (MTLContext *ctx, const char *name) | |
| ~MTLFrameBuffer () override | |
| void | bind (bool enabled_srgb) override |
| bool | check (char err_out[256]) override |
| void | clear (GPUFrameBufferBits 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 (GPUFrameBufferBits planes, eGPUDataFormat format, const int area[4], int channel_len, int slot, void *r_data) override |
| void | blit_to (GPUFrameBufferBits 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 Member Functions inherited from blender::gpu::FrameBuffer | |
| void | set_color_attachment_bit (GPUAttachmentType type, bool value) |
| 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 |
| uint16_t | color_attachments_bits_ = 0 |
Implementation of FrameBuffer object using Metal.
Definition at line 47 of file mtl_framebuffer.hh.
| blender::gpu::MTLFrameBuffer::MTLFrameBuffer | ( | MTLContext * | ctx, |
| const char * | name ) |
Create a conventional frame-buffer to attach texture to.
Definition at line 25 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::FrameBuffer(), GPU_FB_MAX_COLOR_ATTACHMENT, i, init(), name, blender::gpu::FrameBuffer::scissor_reset(), blender::gpu::FrameBuffer::size_set(), and blender::gpu::FrameBuffer::viewport_reset().
|
override |
Definition at line 58 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLContext::get(), GPU_FB_MAX_COLOR_ATTACHMENT, GPU_framebuffer_restore(), i, 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 837 of file mtl_framebuffer.mm.
References BLI_assert, default_size_set(), get_attachment_limit(), GPU_FB_COLOR_ATTACHMENT0, 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, mark_dirty(), max_ii(), MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTL_MAX_MIPMAP_COUNT, blender::gpu::FrameBuffer::set_color_attachment_bit(), and texture().
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(), 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, mark_dirty(), max_ii(), MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTL_MAX_MIPMAP_COUNT, and texture().
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(), 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, mark_dirty(), max_ii(), MTL_LOG_ERROR, MTL_LOG_WARNING, blender::gpu::MTL_MAX_MIPMAP_COUNT, and texture().
Referenced by update_attachments().
| void blender::gpu::MTLFrameBuffer::apply_state | ( | ) |
Definition at line 792 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(), and clear_multi().
|
overridevirtual |
\ Clear values and Load-store actions
Implements blender::gpu::FrameBuffer.
Definition at line 1279 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 1537 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::MTLAttachment::clear_value, blender::gpu::MTLAttachment::color, blender::gpu::MTLAttachment::depth_plane, blender::gpu::MTLContext::get(), blender::gpu::MTLContext::get_inside_frame(), get_is_srgb(), get_pending_clear(), 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::slice, 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 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, | ||
| GPUFrameBufferBits | blit_buffers ) |
\ Blitting
Definition at line 1843 of file mtl_framebuffer.mm.
References assert, 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, MTLFrameBuffer(), blender::gpu::MTLAttachment::slice, blender::gpu::MTLAttachment::texture, texture(), and blender::gpu::MTLAttachment::used.
Referenced by blit_to().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 574 of file mtl_framebuffer.mm.
References BLI_assert, blit(), ensure_attachments_and_viewport(), blender::gpu::FrameBuffer::FrameBuffer(), get_color_attachment(), get_depth_attachment(), get_stencil_attachment(), GPU_COLOR_BIT, GPU_DEPTH_BIT, GPU_STENCIL_BIT, blender::gpu::Texture::height_get(), MTLFrameBuffer(), 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 apply_state(), BLI_assert, buffers, blender::gpu::MTLContext::get(), GPU_COLOR_BIT, GPU_DEPTH_BIT, GPU_STENCIL_BIT, has_depth_attachment(), has_stencil_attachment(), i, 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 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_DEPRECATED, 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(), i, reset_clear_state(), and set_color_attachment_clear_color().
|
inline |
Definition at line 255 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 1262 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 206 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 1483 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 1462 of file mtl_framebuffer.mm.
References BLI_assert, get_attachment_limit(), and texture().
| int blender::gpu::MTLFrameBuffer::get_default_height | ( | ) |
Definition at line 2002 of file mtl_framebuffer.mm.
Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().
| int blender::gpu::MTLFrameBuffer::get_default_width | ( | ) |
Definition at line 1998 of file mtl_framebuffer.mm.
Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().
| MTLAttachment blender::gpu::MTLFrameBuffer::get_depth_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(), read(), and update_attachments().
|
inline |
Definition at line 235 of file mtl_framebuffer.hh.
Referenced by blender::gpu::MTLBatch::bind().
| int blender::gpu::MTLFrameBuffer::get_height | ( | ) |
Definition at line 1993 of file mtl_framebuffer.mm.
References blender::gpu::FrameBuffer::height_.
Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().
|
inline |
Definition at line 250 of file mtl_framebuffer.hh.
Referenced by blender::gpu::MTLShader::bake_current_pipeline_state(), and bake_render_pass_descriptor().
|
inline |
Definition at line 240 of file mtl_framebuffer.hh.
Referenced by bake_render_pass_descriptor().
|
inline |
Definition at line 245 of file mtl_framebuffer.hh.
Referenced by blender::gpu::MTLShader::bake_current_pipeline_state().
| MTLAttachment blender::gpu::MTLFrameBuffer::get_stencil_attachment | ( | ) |
Definition at line 1500 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 1989 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 1426 of file mtl_framebuffer.mm.
References BLI_assert, and get_attachment_limit().
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 1436 of file mtl_framebuffer.mm.
References BLI_assert, get_attachment_limit(), and texture().
| bool blender::gpu::MTLFrameBuffer::has_depth_attachment | ( | ) |
Definition at line 1450 of file mtl_framebuffer.mm.
References BLI_assert.
Referenced by check(), clear(), clear_attachment(), ensure_render_target_size(), read(), and update_attachments().
| bool blender::gpu::MTLFrameBuffer::has_stencil_attachment | ( | ) |
Definition at line 1456 of file mtl_framebuffer.mm.
References BLI_assert.
Referenced by check(), clear(), clear_attachment(), ensure_render_target_size(), and update_attachments().
| void blender::gpu::MTLFrameBuffer::mark_cleared | ( | ) |
Definition at line 640 of file mtl_framebuffer.mm.
| void blender::gpu::MTLFrameBuffer::mark_dirty | ( | ) |
\ Private METAL implementation functions
Definition at line 629 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 645 of file mtl_framebuffer.mm.
| void blender::gpu::MTLFrameBuffer::mark_loadstore_dirty | ( | ) |
Definition at line 635 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 497 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::Texture::format_, 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, blender::gpu::MTLAttachment::texture, and blender::gpu::to_bytesize().
| void blender::gpu::MTLFrameBuffer::remove_all_attachments | ( | ) |
Definition at line 1243 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(), GPU_FB_COLOR_ATTACHMENT0, has_attachment_at_slot(), mark_dirty(), and blender::gpu::FrameBuffer::set_color_attachment_bit().
Referenced by remove_all_attachments(), and update_attachments().
| bool blender::gpu::MTLFrameBuffer::remove_depth_attachment | ( | ) |
Definition at line 1219 of file mtl_framebuffer.mm.
References BLI_assert, ensure_render_target_size(), and mark_dirty().
Referenced by remove_all_attachments(), and update_attachments().
| bool blender::gpu::MTLFrameBuffer::remove_stencil_attachment | ( | ) |
Definition at line 1231 of file mtl_framebuffer.mm.
References BLI_assert, ensure_render_target_size(), and mark_dirty().
Referenced by remove_all_attachments(), and update_attachments().
| bool blender::gpu::MTLFrameBuffer::reset_clear_state | ( | ) |
Definition at line 1410 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 1303 of file mtl_framebuffer.mm.
References BLI_assert, get_attachment_limit(), GPU_LOADACTION_CLEAR, 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, |
| GPULoadOp | load_action, | ||
| GPUStoreOp | store_action ) |
Definition at line 1357 of file mtl_framebuffer.mm.
References BLI_assert, and mark_loadstore_dirty().
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 1329 of file mtl_framebuffer.mm.
References BLI_assert, GPU_LOADACTION_CLEAR, and mark_loadstore_dirty().
Referenced by attachment_set_loadstore_op(), clear(), clear_attachment(), and update_attachments().
| bool blender::gpu::MTLFrameBuffer::set_depth_loadstore_op | ( | GPULoadOp | load_action, |
| GPUStoreOp | store_action ) |
Definition at line 1376 of file mtl_framebuffer.mm.
References BLI_assert, and mark_loadstore_dirty().
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 1343 of file mtl_framebuffer.mm.
References BLI_assert, GPU_LOADACTION_CLEAR, and mark_loadstore_dirty().
Referenced by clear(), clear_attachment(), and update_attachments().
| bool blender::gpu::MTLFrameBuffer::set_stencil_loadstore_op | ( | GPULoadOp | load_action, |
| GPUStoreOp | store_action ) |
Definition at line 1393 of file mtl_framebuffer.mm.
References BLI_assert, and mark_loadstore_dirty().
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::MTLBackend::capabilities, GPU_ATTACHMENT_READ, GPU_FB_COLOR_ATTACHMENT0, GPU_texture_image_bind(), i, and blender::Span< T >::index_range().
| void blender::gpu::MTLFrameBuffer::update_attachments | ( | bool | update_viewport | ) |
Definition at line 650 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_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_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(), size(), blender::gpu::FrameBuffer::size_set(), blender::gpu::MTLAttachment::stencil, blender::gpu::MTLAttachment::store_action, and GPUAttachment::tex.
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 1511 of file mtl_framebuffer.mm.
References BLI_assert, blender::gpu::FrameBuffer::dirty_attachments_, and update_attachments().