[spirv] Emit the grad and const offset image ops in the correct order

Currently the grad and const offset image operand ids are emitted in the
incorrect order. This causes incorrect code gen if both the grad and const
offset image operands are used.

This fixes the compilation error found when running TopSpin 2k25 through
DXVK using the NVIDIA proprietary Vulkan driver.
This commit is contained in:
esullivan 2025-01-02 14:51:27 -08:00
parent 8b9b46dfff
commit 14fa874afb

View file

@ -3892,15 +3892,15 @@ namespace dxvk {
if (op.flags & spv::ImageOperandsLodMask)
m_code.putWord(op.sLod);
if (op.flags & spv::ImageOperandsConstOffsetMask)
m_code.putWord(op.sConstOffset);
if (op.flags & spv::ImageOperandsGradMask) {
m_code.putWord(op.sGradX);
m_code.putWord(op.sGradY);
}
if (op.flags & spv::ImageOperandsConstOffsetMask)
m_code.putWord(op.sConstOffset);
if (op.flags & spv::ImageOperandsOffsetMask)
m_code.putWord(op.gOffset);