23662668dd
Speculate that we can modify the SSA value in-place. As long as it is not used after the modify, this is fine. Also need to make sure we don't attempt to RMW something that is impossible to modify.
23 lines
339 B
Plaintext
23 lines
339 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct SSBOScalar
|
|
{
|
|
float2 a;
|
|
packed_float3 b;
|
|
packed_float3 c;
|
|
float3 d;
|
|
};
|
|
|
|
kernel void main0(device SSBOScalar& _4 [[buffer(0)]])
|
|
{
|
|
float3 _23 = float3(_4.b);
|
|
float3 _24 = _23;
|
|
_24.z = 2.0;
|
|
_4.a = _23.xy * _23.z;
|
|
_4.b = _24;
|
|
}
|
|
|