From 2b70ba8f7798107308a0c34358a9e83e77017dfd Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 19 Apr 2024 13:55:31 +0200 Subject: [PATCH] [dxbc] Do not emit OpImageQueryLevels for multisampled images --- src/dxbc/dxbc_compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 2fb15e26..5b65c8a7 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -5513,12 +5513,12 @@ namespace dxvk { result.type.ctype = DxbcScalarType::Uint32; result.type.ccount = 1; - if (info.image.sampled == 1) { + if (info.image.ms == 0 && info.image.sampled == 1) { result.id = m_module.opImageQueryLevels( getVectorTypeId(result.type), m_module.opLoad(info.typeId, info.varId)); } else { - // Report one LOD in case of UAVs + // Report one LOD in case of UAVs or multisampled images result.id = m_module.constu32(1); }