25 lines
397 B
Plaintext
25 lines
397 B
Plaintext
|
#include <metal_stdlib>
|
||
|
#include <simd/simd.h>
|
||
|
|
||
|
using namespace metal;
|
||
|
|
||
|
struct UBO
|
||
|
{
|
||
|
float b;
|
||
|
};
|
||
|
|
||
|
struct SSBO
|
||
|
{
|
||
|
float a;
|
||
|
};
|
||
|
|
||
|
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
|
||
|
|
||
|
kernel void main0(constant UBO& _12 [[buffer(0)]], device SSBO& _25 [[buffer(1)]])
|
||
|
{
|
||
|
long v = long(as_type<int>(_12.b));
|
||
|
v ^= long(0x8000000000000000ul);
|
||
|
_25.a = as_type<float>(int(v));
|
||
|
}
|
||
|
|