From a5706254d52e6e8f0894ad78ad37b7c7d83fe767 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 28 Feb 2018 06:51:13 +0100 Subject: [PATCH] [dxbc] Do not emit depth image types for integer images --- src/dxbc/dxbc_compiler.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index de404e226..00c74793f 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -812,10 +812,11 @@ namespace dxvk { res.depthTypeId = 0; res.structStride = 0; - if (resourceType == DxbcResourceDim::Texture2D - || resourceType == DxbcResourceDim::Texture2DArr - || resourceType == DxbcResourceDim::TextureCube - || resourceType == DxbcResourceDim::TextureCubeArr) { + if ((sampledType == DxbcScalarType::Float32) + && (resourceType == DxbcResourceDim::Texture2D + || resourceType == DxbcResourceDim::Texture2DArr + || resourceType == DxbcResourceDim::TextureCube + || resourceType == DxbcResourceDim::TextureCubeArr)) { res.depthTypeId = m_module.defImageType(sampledTypeId, typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled, spv::ImageFormatUnknown);