From 438ae5cdfce7e7b2b0b34b22caac5bf3310ccc41 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 5 Aug 2022 18:17:21 +0000 Subject: [PATCH] [dxso] Fix getting sampler type of vertex textures Fixes: c7afe0dd2386f0c4acdf610fb7d2c9eaa95c3516 --- src/dxso/dxso_compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dxso/dxso_compiler.cpp b/src/dxso/dxso_compiler.cpp index 357eccf74..a9e7fcedd 100644 --- a/src/dxso/dxso_compiler.cpp +++ b/src/dxso/dxso_compiler.cpp @@ -3050,7 +3050,7 @@ void DxsoCompiler::emitControlFlowGenericLoop( auto SampleType = [&](DxsoSamplerType samplerType) { uint32_t typeId = m_module.defIntType(32, 0); - uint32_t offset = m_module.consti32(m_programInfo.type() == DxsoProgramTypes::VertexShader ? samplerIdx + 17 : samplerIdx); + uint32_t offset = m_module.consti32(m_programInfo.type() == DxsoProgramTypes::VertexShader ? samplerIdx + caps::MaxTexturesPS : samplerIdx); uint32_t bitCnt = m_module.consti32(1); uint32_t isNull = m_module.opBitFieldUExtract(typeId, m_nullSpecConstant, offset, bitCnt);