Check type

This commit is contained in:
gdkchan 2024-09-18 00:43:03 -03:00
parent 617c0963d5
commit aacf293681

View file

@ -281,7 +281,14 @@ namespace Ryujinx.Graphics.Shader.Instructions
}
break;
case AtomOp.Exch:
res = context.AtomicSwap(storageKind, e0, e1, value);
if (type == AtomSize.S32 || type == AtomSize.U32)
{
res = context.AtomicSwap(storageKind, e0, e1, value);
}
else
{
context.TranslatorContext.GpuAccessor.Log($"Invalid reduction type: {type}.");
}
break;
default:
context.TranslatorContext.GpuAccessor.Log($"Invalid atomic operation: {op}.");