diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-01 07:15:55 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-01 07:15:55 +0000 |
| commit | 82d59de0d193554e1231b06347078d41ed8ec8d3 (patch) | |
| tree | b4d723394dd870f4e7a3201e3e804c88ff4aad7f /unityplugin/GhostCubePlugin/PluginSource | |
| parent | Updated submodules (added DRAW_FLAG_VERIFY_STATES & DISPATCH_FLAG_VERIFY_STAT... (diff) | |
| download | DiligentEngine-82d59de0d193554e1231b06347078d41ed8ec8d3.tar.gz DiligentEngine-82d59de0d193554e1231b06347078d41ed8ec8d3.zip | |
Improved thread safety of enum flags; added explicit state transitions to SetRenderTargets()
Diffstat (limited to 'unityplugin/GhostCubePlugin/PluginSource')
3 files changed, 3 insertions, 3 deletions
diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp index 46d3ac8..818ef04 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp @@ -66,7 +66,7 @@ void RenderAPI_D3D11::ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInt void RenderAPI_D3D11::BeginRendering() { ITextureView *RTVs[] = { m_RTV }; - m_Context->SetRenderTargets(1, RTVs, m_DSV); + m_Context->SetRenderTargets(1, RTVs, m_DSV, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL); } void RenderAPI_D3D11::AttachToNativeRenderTexture(void *nativeRenderTargetHandle, void *nativeDepthTextureHandle) diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp index 3f4f9ea..f62e635 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp @@ -166,7 +166,7 @@ void RenderAPI_D3D12::BeginRendering() m_RenderTarget->SetD3D12ResourceState(D3D12_RESOURCE_STATE_RENDER_TARGET); m_DepthBuffer->SetD3D12ResourceState(D3D12_RESOURCE_STATE_DEPTH_WRITE); ITextureView *RTVs[] = { m_RTV }; - m_Context->SetRenderTargets(1, RTVs, m_DSV); + m_Context->SetRenderTargets(1, RTVs, m_DSV, SET_RENDER_TARGETS_FLAG_VERIFY_STATES); } void RenderAPI_D3D12::EndRendering() diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp index cac774d..94f6ec4 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp @@ -117,7 +117,7 @@ void RenderAPI_OpenGLCoreES::BeginRendering() } ITextureView *RTVs[] = { m_RTV }; - m_Context->SetRenderTargets(1, RTVs, m_DSV); + m_Context->SetRenderTargets(1, RTVs, m_DSV, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL); } void RenderAPI_OpenGLCoreES::AttachToNativeRenderTexture(void *nativeRenderTargetHandle, void *nativeDepthTextureHandle) |
