df76a14056
ptr_chain was really just masking the proper i == 0 check. Be more explicit about what the check is actually doing and comment this.
29 lines
342 B
Plaintext
29 lines
342 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct SSBO;
|
|
|
|
struct S
|
|
{
|
|
float3 v;
|
|
};
|
|
|
|
struct SSBO
|
|
{
|
|
S s[1];
|
|
};
|
|
|
|
struct PC
|
|
{
|
|
uint2 ptr;
|
|
};
|
|
|
|
kernel void main0(constant PC& pc [[buffer(0)]])
|
|
{
|
|
device SSBO* ssbo = reinterpret_cast<device SSBO*>(as_type<ulong>(pc.ptr));
|
|
ssbo->s[0].v = float3(1.0);
|
|
}
|
|
|