SPIRV-Cross/reference/shaders-msl-no-opt/frag/pixel-interlock-simple-callstack.msl2.frag
Hans-Kristian Arntzen 1f6653ec07 MSL: Do not override variable name late.
If we have emitted block IO lowering at the end of vertex shader, we
will end up using the wrong name. Forcing a v_ prefix does not solve any
actual problems since the intentifier already has to be valid.
2023-03-30 18:30:44 +02:00

38 lines
806 B
GLSL

#pragma clang diagnostic ignored "-Wmissing-prototypes"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO1
{
uint values1[1];
};
struct SSBO0
{
uint values0[1];
};
static inline __attribute__((always_inline))
void callee2(device SSBO1& _14, thread float4& gl_FragCoord)
{
int _25 = int(gl_FragCoord.x);
_14.values1[_25]++;
}
static inline __attribute__((always_inline))
void callee(device SSBO1& _14, thread float4& gl_FragCoord, device SSBO0& _35)
{
int _38 = int(gl_FragCoord.x);
_35.values0[_38]++;
callee2(_14, gl_FragCoord);
}
fragment void main0(device SSBO1& _14 [[buffer(0), raster_order_group(0)]], device SSBO0& _35 [[buffer(1), raster_order_group(0)]], float4 gl_FragCoord [[position]])
{
callee(_14, gl_FragCoord, _35);
}