SPIRV-Cross/reference/shaders-msl/comp/argument-buffers-discrete.msl2.argument.discrete.comp
Ryan Harrison cf1bf1c6ae Update external/ to SPIR-V 1.5
Rolled the hashes used for glslang, SPIRV-Tools, and SPIRV-Headers to
HEAD, which includes the update to 1.5.

Added passing '--amb' to glslang, so I didn't have to explicitly set
bindings in a large number of test shaders that currently don't, and
now glslang considers them invalid.

Marked all shaders that no longer pass spirv-val as .invalid.
2019-09-18 16:04:27 -04:00

43 lines
743 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO3
{
float4 v;
};
struct SSBO0
{
float4 v;
};
struct SSBO1
{
float4 v;
};
struct SSBO2
{
float4 v;
};
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
struct spvDescriptorSetBuffer0
{
const device SSBO0* ssbo0 [[id(0)]];
};
struct spvDescriptorSetBuffer1
{
const device SSBO1* ssbo1 [[id(0)]];
};
kernel void main0(constant spvDescriptorSetBuffer0& spvDescriptorSet0 [[buffer(0)]], constant spvDescriptorSetBuffer1& spvDescriptorSet1 [[buffer(1)]], device SSBO3& ssbo3 [[buffer(2)]], const device SSBO2& ssbo2 [[buffer(3)]])
{
ssbo3.v = ((*spvDescriptorSet0.ssbo0).v + (*spvDescriptorSet1.ssbo1).v) + ssbo2.v;
}