I have the following struct
struct NormalData { packed_float3 N[1]; };
declared as a buffer
device NormalData& _163 [[buffer(1)]]
I want to do an atomic float operation on the components on the vector via
atomic_fetch_add_explicit((device atomic_float*)&_163.N[0][0u], _206.x, memory_order_relaxed);
However, I get the error
error: address of vector element requested
The spec is a little vague on this, since it says addresses of vector. swizzles are illegal, but [0u] isn't a swizzle IMO.
What is correct, and is there a way to apply an atomic operation to a vector component?