summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-09-09 00:42:51 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-09-09 00:42:51 +0000
commitd06553e2b4700aa026acd4445a598eadf10dfb35 (patch)
tree534c3761a92cfb93d370b75f29f6b720a10c64a8 /Graphics/GraphicsEngineOpenGL
parentRenamed IDeviceContext::Wait to IDeviceContext::WaitForFence (updated API ver... (diff)
downloadDiligentCore-d06553e2b4700aa026acd4445a598eadf10dfb35.tar.gz
DiligentCore-d06553e2b4700aa026acd4445a598eadf10dfb35.zip
Added IDeviceContext::WaitForIdle() method (updated API version to 240028)
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h6
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp6
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp2
3 files changed, 11 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
index 7b1931b1..601976ee 100644
--- a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
@@ -95,8 +95,6 @@ public:
virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final;
- virtual void Flush()override final;
-
virtual void UpdateBuffer(IBuffer* pBuffer,
Uint32 Offset,
Uint32 Size,
@@ -152,6 +150,10 @@ public:
virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext)override final;
+ virtual void WaitForIdle()override final;
+
+ virtual void Flush()override final;
+
virtual bool UpdateCurrentGLContext()override final;
void BindProgramResources(Uint32& NewMemoryBarriers, IShaderResourceBinding* pResBinding);
diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
index 23836746..94537d40 100644
--- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
@@ -1082,6 +1082,12 @@ namespace Diligent
pFenceGLImpl->Wait(Value, FlushContext);
}
+ void DeviceContextGLImpl::WaitForIdle()
+ {
+ VERIFY(!m_bIsDeferred, "Only immediate contexts can be idled");
+ glFinish();
+ }
+
bool DeviceContextGLImpl::UpdateCurrentGLContext()
{
auto* pRenderDeviceGL = m_pDevice.RawPtr<RenderDeviceGLImpl>();
diff --git a/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp b/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp
index 1850255d..a8f55e27 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/GLProgramResources.cpp
@@ -583,7 +583,7 @@ namespace Diligent
if ( strcmp(LastBlock.Name, Name.data()) == 0)
{
ArraySize = std::max(ArraySize, static_cast<GLint>(LastBlock.ArraySize));
- VERIFY(static_cast<GLuint>(SBIndex) == LastBlock.SBIndex + Ind, "Storage block indices are expected to be continuous");
+ VERIFY(static_cast<GLint>(SBIndex) == LastBlock.SBIndex + Ind, "Storage block indices are expected to be continuous");
LastBlock.ArraySize = ArraySize;
continue;
}