SPIRV-Cross/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-4.asm.comp
Hans-Kristian Arntzen 711300baed MSL: Do not emit swizzled writes in packing fixups.
Similar to scalar access chain fix, this causes a read-modify-write on
memory we're not supposed to write to.
2020-07-06 10:03:46 +02:00

21 lines
361 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBOScalar
{
float4 a[16];
float4 b[16];
float4 c[16];
};
kernel void main0(device SSBOScalar& _4 [[buffer(0)]])
{
float2 _27 = _4.b[10].xy;
float _29 = _4.c[10].x;
(device float2&)_4.b[10] = float2(10.0, 11.0);
(device float2&)_4.a[10] = _27 * _29;
}