mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 22:24:13 +01:00
[dxbc] Do not emit depth type for non-sampled resources
Fixes a crash in the Nvidia driver. These type declarations were never used in the first place.
This commit is contained in:
parent
14d5054893
commit
a567f6a5a5
@ -757,11 +757,18 @@ namespace dxvk {
|
|||||||
res.sampledTypeId = sampledTypeId;
|
res.sampledTypeId = sampledTypeId;
|
||||||
res.imageTypeId = imageTypeId;
|
res.imageTypeId = imageTypeId;
|
||||||
res.colorTypeId = imageTypeId;
|
res.colorTypeId = imageTypeId;
|
||||||
|
res.depthTypeId = 0;
|
||||||
|
res.structStride = 0;
|
||||||
|
|
||||||
|
if (resourceType != DxbcResourceDim::Buffer
|
||||||
|
&& resourceType != DxbcResourceDim::Texture2DMs
|
||||||
|
&& resourceType != DxbcResourceDim::Texture2DMsArr) {
|
||||||
res.depthTypeId = m_module.defImageType(sampledTypeId,
|
res.depthTypeId = m_module.defImageType(sampledTypeId,
|
||||||
typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
||||||
spv::ImageFormatUnknown);
|
spv::ImageFormatUnknown);
|
||||||
|
}
|
||||||
|
|
||||||
m_textures.at(registerId) = res;
|
m_textures.at(registerId) = res;
|
||||||
res.structStride = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store descriptor info for the shader interface
|
// Store descriptor info for the shader interface
|
||||||
@ -866,7 +873,7 @@ namespace dxvk {
|
|||||||
res.sampledTypeId = sampledTypeId;
|
res.sampledTypeId = sampledTypeId;
|
||||||
res.imageTypeId = resTypeId;
|
res.imageTypeId = resTypeId;
|
||||||
res.colorTypeId = resTypeId;
|
res.colorTypeId = resTypeId;
|
||||||
res.depthTypeId = resTypeId;
|
res.depthTypeId = 0;
|
||||||
res.structStride = resStride;
|
res.structStride = resStride;
|
||||||
m_textures.at(registerId) = res;
|
m_textures.at(registerId) = res;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user