From f5d55726b368592e6c9c9a475e97db6e1bb9d1bd Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 11 Jun 2018 20:17:29 +0200 Subject: [PATCH] [dxbc] Fix index returned by ImmAtomicConsume instruction Since the atomic operations always return the old value, we have to subtract one for the consume instruction. The append instruction is unaffected. Fixes an issue with vegetation in Final Fantasy XV. --- src/dxbc/dxbc_compiler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 18f75b20..afa96296 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -2238,6 +2238,8 @@ namespace dxvk { case DxbcOpcode::ImmAtomicConsume: value.id = m_module.opAtomicISub(typeId, ptrId, scopeId, semanticsId, m_module.constu32(1)); + value.id = m_module.opISub(typeId, value.id, + m_module.constu32(1)); break; default: