Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Fielder <jason_apple>2022-06-27 12:41:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-06-27 12:45:49 +0300
commit9130a60d3d833718c932d3f971b746ba253734bc (patch)
treedaa060bb87ee0bf52c96699aea103ea78e29caa7 /source/blender/gpu/opengl
parent7b6b740ace1e56a8217fb44ed9fd3cf0c0a324f4 (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/opengl')
-rw-r--r--source/blender/gpu/opengl/gl_context.cc10
-rw-r--r--source/blender/gpu/opengl/gl_context.hh2
-rw-r--r--source/blender/gpu/opengl/gl_framebuffer.hh5
3 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc
index f4f060821b0..e6af126e9cd 100644
--- a/source/blender/gpu/opengl/gl_context.cc
+++ b/source/blender/gpu/opengl/gl_context.cc
@@ -149,6 +149,16 @@ void GLContext::deactivate()
is_active_ = false;
}
+void GLContext::begin_frame()
+{
+ /* No-op. */
+}
+
+void GLContext::end_frame()
+{
+ /* No-op. */
+}
+
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh
index c333c8a4afd..234bc712513 100644
--- a/source/blender/gpu/opengl/gl_context.hh
+++ b/source/blender/gpu/opengl/gl_context.hh
@@ -106,6 +106,8 @@ class GLContext : public Context {
void activate() override;
void deactivate() override;
+ void begin_frame() override;
+ void end_frame() override;
void flush() override;
void finish() override;
diff --git a/source/blender/gpu/opengl/gl_framebuffer.hh b/source/blender/gpu/opengl/gl_framebuffer.hh
index 3927ff27532..9dcdb5d13cd 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.hh
+++ b/source/blender/gpu/opengl/gl_framebuffer.hh
@@ -77,6 +77,11 @@ class GLFrameBuffer : public FrameBuffer {
eGPUDataFormat data_format,
const void *clear_value) override;
+ /* Attachment load-stores are currently no-op's in OpenGL. */
+ void attachment_set_loadstore_op(GPUAttachmentType type,
+ eGPULoadOp load_action,
+ eGPUStoreOp store_action) override{};
+
void read(eGPUFrameBufferBits planes,
eGPUDataFormat format,
const int area[4],