[dxbc] Do not emit OpImageQueryLevels for multisampled images

This commit is contained in:
Philip Rebohle 2024-04-19 13:55:31 +02:00
parent 9c66c4bf1d
commit 2b70ba8f77
1 changed files with 2 additions and 2 deletions

View File

@ -5513,12 +5513,12 @@ namespace dxvk {
result.type.ctype = DxbcScalarType::Uint32; result.type.ctype = DxbcScalarType::Uint32;
result.type.ccount = 1; result.type.ccount = 1;
if (info.image.sampled == 1) { if (info.image.ms == 0 && info.image.sampled == 1) {
result.id = m_module.opImageQueryLevels( result.id = m_module.opImageQueryLevels(
getVectorTypeId(result.type), getVectorTypeId(result.type),
m_module.opLoad(info.typeId, info.varId)); m_module.opLoad(info.typeId, info.varId));
} else { } else {
// Report one LOD in case of UAVs // Report one LOD in case of UAVs or multisampled images
result.id = m_module.constu32(1); result.id = m_module.constu32(1);
} }