[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.
This commit is contained in:
Philip Rebohle 2018-06-11 20:17:29 +02:00
parent dce2f844c0
commit f5d55726b3
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 2 additions and 0 deletions

View File

@ -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: