diff options
author | Jason Fielder <jason_apple> | 2022-06-27 12:41:04 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-06-27 12:45:49 +0300 |
commit | 9130a60d3d833718c932d3f971b746ba253734bc (patch) | |
tree | daa060bb87ee0bf52c96699aea103ea78e29caa7 /source/blender/gpu/intern/gpu_context.cc | |
parent | 7b6b740ace1e56a8217fb44ed9fd3cf0c0a324f4 (diff) |
MTLCommandBufferState for coordinating GPU workload submission and render pass coordination.
MTLFrameBuffer has been implemented to support creation of RenderCommandEncoders, along with supporting functionality in the Metal Context.
Optimisation stubs for GPU_framebuffer_bind_ext has been added, which enables specific assignment of attachment load-store ops at the bind level, rather than on a framebuffer object as a whole.
Begin and end frame markers are used to encapsulate frame boundaries for explicit workload submission. This is required for explicit APIs where implicit flushing of work does not occur.
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D15027
Diffstat (limited to 'source/blender/gpu/intern/gpu_context.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_context.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc index 9fb5826506a..4a0a9ecc7f6 100644 --- a/source/blender/gpu/intern/gpu_context.cc +++ b/source/blender/gpu/intern/gpu_context.cc @@ -123,6 +123,22 @@ GPUContext *GPU_context_active_get() return wrap(Context::get()); } +void GPU_context_begin_frame(GPUContext *ctx) +{ + blender::gpu::Context *_ctx = unwrap(ctx); + if (_ctx) { + _ctx->begin_frame(); + } +} + +void GPU_context_end_frame(GPUContext *ctx) +{ + blender::gpu::Context *_ctx = unwrap(ctx); + if (_ctx) { + _ctx->end_frame(); + } +} + /* -------------------------------------------------------------------- */ /** \name Main context global mutex * |