better hardware utilization of depthstencil resources

This commit is contained in:
turanszkij
2017-08-18 21:48:37 +02:00
parent fdfccd7c11
commit c2e8a89ccb
3 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ void wiDepthTarget::Initialize(int width, int height, UINT MSAAC)
depthDesc.Height = height;
depthDesc.MipLevels = 1;
depthDesc.ArraySize = 1;
depthDesc.Format = FORMAT_R24G8_TYPELESS;
//depthDesc.Format = FORMAT_R24G8_TYPELESS;
depthDesc.Format = FORMAT_R32G8X24_TYPELESS; // better utilization of hardware
depthDesc.SampleDesc.Count = MSAAC;
// depthDesc.SampleDesc.Quality = 0; // auto-filll in device
depthDesc.Usage = USAGE_DEFAULT;
+6
View File
@@ -1954,6 +1954,9 @@ HRESULT GraphicsDevice_DX11::CreateShaderResourceView(Texture2D* pTexture)
case FORMAT_R24G8_TYPELESS:
shaderResourceViewDesc.Format = DXGI_FORMAT_R24_UNORM_X8_TYPELESS;
break;
case FORMAT_R32G8X24_TYPELESS:
shaderResourceViewDesc.Format = DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS;
break;
default:
shaderResourceViewDesc.Format = _ConvertFormat(pTexture->desc.Format);
break;
@@ -2289,6 +2292,9 @@ HRESULT GraphicsDevice_DX11::CreateDepthStencilView(Texture2D* pTexture)
case FORMAT_R24G8_TYPELESS:
depthStencilViewDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
break;
case FORMAT_R32G8X24_TYPELESS:
depthStencilViewDesc.Format = DXGI_FORMAT_D32_FLOAT_S8X24_UINT;
break;
default:
depthStencilViewDesc.Format = _ConvertFormat(pTexture->desc.Format);
break;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates
const int minor = 12;
// minor bug fixes, alterations, refactors, updates
const int revision = 4;
const int revision = 5;
long GetVersion()