Browse Source

D3D12: Fixed GPU crash when binding 3D image to compute for RW.

Бранимир Караџић 7 years ago
parent
commit
4647e99f51
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/renderer_d3d12.cpp

+ 2 - 2
src/renderer_d3d12.cpp

@@ -4843,7 +4843,7 @@ namespace bgfx { namespace d3d12
 				if (TextureCube == m_type)
 				{
 					m_uavd.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2DARRAY;
-					m_uavd.Texture2DArray.MipSlice   = 0;
+					m_uavd.Texture2DArray.MipSlice  = 0;
 					m_uavd.Texture2DArray.ArraySize = 6;
 				}
 
@@ -4860,7 +4860,7 @@ namespace bgfx { namespace d3d12
 				m_uavd.ViewDimension         = D3D12_UAV_DIMENSION_TEXTURE3D;
 				m_uavd.Texture3D.MipSlice    = 0;
 				m_uavd.Texture3D.FirstWSlice = 0;
-				m_uavd.Texture3D.WSize       = 0;
+				m_uavd.Texture3D.WSize       = m_depth;
 				break;
 			}