mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 22:24:15 +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.imageTypeId = imageTypeId;
|
||||
res.colorTypeId = imageTypeId;
|
||||
res.depthTypeId = m_module.defImageType(sampledTypeId,
|
||||
typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
||||
spv::ImageFormatUnknown);
|
||||
m_textures.at(registerId) = res;
|
||||
res.depthTypeId = 0;
|
||||
res.structStride = 0;
|
||||
|
||||
if (resourceType != DxbcResourceDim::Buffer
|
||||
&& resourceType != DxbcResourceDim::Texture2DMs
|
||||
&& resourceType != DxbcResourceDim::Texture2DMsArr) {
|
||||
res.depthTypeId = m_module.defImageType(sampledTypeId,
|
||||
typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
||||
spv::ImageFormatUnknown);
|
||||
}
|
||||
|
||||
m_textures.at(registerId) = res;
|
||||
}
|
||||
|
||||
// Store descriptor info for the shader interface
|
||||
@ -866,7 +873,7 @@ namespace dxvk {
|
||||
res.sampledTypeId = sampledTypeId;
|
||||
res.imageTypeId = resTypeId;
|
||||
res.colorTypeId = resTypeId;
|
||||
res.depthTypeId = resTypeId;
|
||||
res.depthTypeId = 0;
|
||||
res.structStride = resStride;
|
||||
m_textures.at(registerId) = res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user