summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp')
-rw-r--r--src/render/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/render/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp b/src/render/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp
index b2512d84a..81081943d 100644
--- a/src/render/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp
+++ b/src/render/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp
@@ -330,6 +330,37 @@ void GraphicsHelperGL3_3::drawBuffer(GLenum mode)
m_funcs->glDrawBuffer(mode);
}
+void *GraphicsHelperGL3_3::fenceSync()
+{
+ return m_funcs->glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
+}
+
+void GraphicsHelperGL3_3::clientWaitSync(void *sync, GLuint64 nanoSecTimeout)
+{
+ m_funcs->glClientWaitSync(static_cast<GLsync>(sync), GL_SYNC_FLUSH_COMMANDS_BIT, nanoSecTimeout);
+}
+
+void GraphicsHelperGL3_3::waitSync(void *sync)
+{
+ m_funcs->glWaitSync(static_cast<GLsync>(sync), 0, GL_TIMEOUT_IGNORED);
+}
+
+bool GraphicsHelperGL3_3::wasSyncSignaled(void *sync)
+{
+ GLint v;
+ m_funcs->glGetSynciv(static_cast<GLsync>(sync),
+ GL_SYNC_STATUS,
+ sizeof(v),
+ nullptr,
+ &v);
+ return v == GL_SIGNALED;
+}
+
+void GraphicsHelperGL3_3::deleteSync(void *sync)
+{
+ m_funcs->glDeleteSync(static_cast<GLsync>(sync));
+}
+
void GraphicsHelperGL3_3::blendEquation(GLenum mode)
{
m_funcs->glBlendEquation(mode);
@@ -477,6 +508,7 @@ bool GraphicsHelperGL3_3::supportsFeature(GraphicsHelperInterface::Feature featu
case TextureDimensionRetrieval:
case BindableFragmentOutputs:
case BlitFramebuffer:
+ case Fences:
return true;
case Tessellation:
return !m_tessFuncs.isNull();