Explorar el Código

D3D12: Fixed 37-gpudrivenrendering.

Branimir Karadžić hace 7 años
padre
commit
2c4e35508b
Se han modificado 1 ficheros con 10 adiciones y 4 borrados
  1. 10 4
      src/renderer_d3d12.cpp

+ 10 - 4
src/renderer_d3d12.cpp

@@ -5520,6 +5520,8 @@ data.NumQualityLevels = 0;
 					m_batch.flush(m_commandList, true);
 					kick();
 
+					commandListChanged = true;
+
 					view = key.m_view;
 					currentPso = NULL;
 					currentSamplerStateIdx = kInvalidHandle;
@@ -5586,6 +5588,13 @@ data.NumQualityLevels = 0;
 							PIX3_BEGINEVENT(m_commandList, D3DCOLOR_COMPUTE, viewName);
 						}
 
+						commandListChanged = true;
+					}
+
+					if (commandListChanged)
+					{
+						commandListChanged = false;
+
 						m_commandList->SetComputeRootSignature(m_rootSignature);
 						ID3D12DescriptorHeap* heaps[] = {
 							m_samplerAllocator.getHeap(),
@@ -5751,10 +5760,7 @@ data.NumQualityLevels = 0;
 
 				if (wasCompute)
 				{
-					if (wasCompute)
-					{
-						wasCompute = false;
-					}
+					wasCompute = false;
 
 					if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) )
 					{