SPIRV-Cross/reference/opt/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp

22 lines
467 B
Plaintext
Raw Normal View History

2017-11-22 11:08:06 +00:00
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
2018-03-24 03:16:18 +00:00
constant uint _5_tmp [[function_constant(10)]];
constant uint _5 = is_function_constant_defined(_5_tmp) ? _5_tmp : 9u;
constant uint _6_tmp [[function_constant(12)]];
constant uint _6 = is_function_constant_defined(_6_tmp) ? _6_tmp : 4u;
constant uint3 gl_WorkGroupSize = uint3(_5, 20u, _6);
2017-11-22 11:08:06 +00:00
struct SSBO
{
float a;
};
kernel void main0(device SSBO& _4 [[buffer(0)]])
{
_4.a += 1.0;
}