Use the resource format from the texture, with type hint, creating SRV

This commit is contained in:
baldurk
2016-07-31 20:32:11 +07:00
parent 399fb28a80
commit 1dad17ec7b
+1 -1
View File
@@ -1550,7 +1550,7 @@ bool D3D12DebugManager::RenderTexture(TextureDisplay cfg, bool blendAlpha)
D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
srvDesc.Format = GetTypedFormat(resource->GetDesc().Format, cfg.typeHint);
srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
srvDesc.Texture2D.MipLevels = 1;
srvDesc.Texture2D.MostDetailedMip = 0;