From f30923718f8535ed02b92fb7f101dc19ddf53a92 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 22 Apr 2018 14:08:01 +0200 Subject: [PATCH] [dxbc] Fix texture component count for OpImageQueryLod Not a bug, but we don't need the extra component when dealing with array 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 4b30e545..d8c67c6d 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -2684,8 +2684,8 @@ namespace dxvk { const uint32_t samplerId = samplerReg.idx[0].offset; // Load texture coordinates - const DxbcRegisterValue coord = emitLoadTexCoord( - texCoordReg, m_textures.at(textureId).imageInfo); + const DxbcRegisterValue coord = emitRegisterLoad(texCoordReg, + DxbcRegMask::firstN(getTexLayerDim(m_textures.at(textureId).imageInfo))); // Query the LOD. The result is a two-dimensional float32 // vector containing the mip level and virtual LOD numbers.