SPIRV-Cross/reference/opt/shaders-hlsl/comp/image.comp
2018-03-12 15:11:55 +01:00

65 lines
2.3 KiB
Plaintext

RWTexture2D<float> uImageInF : register(u0);
RWTexture2D<float> uImageOutF : register(u1);
RWTexture2D<int> uImageInI : register(u2);
RWTexture2D<int> uImageOutI : register(u3);
RWTexture2D<uint> uImageInU : register(u4);
RWTexture2D<uint> uImageOutU : register(u5);
RWBuffer<float> uImageInBuffer : register(u6);
RWBuffer<float> uImageOutBuffer : register(u7);
RWTexture2D<float2> uImageInF2 : register(u8);
RWTexture2D<float2> uImageOutF2 : register(u9);
RWTexture2D<int2> uImageInI2 : register(u10);
RWTexture2D<int2> uImageOutI2 : register(u11);
RWTexture2D<uint2> uImageInU2 : register(u12);
RWTexture2D<uint2> uImageOutU2 : register(u13);
RWBuffer<float2> uImageInBuffer2 : register(u14);
RWBuffer<float2> uImageOutBuffer2 : register(u15);
RWTexture2D<float4> uImageInF4 : register(u16);
RWTexture2D<float4> uImageOutF4 : register(u17);
RWTexture2D<int4> uImageInI4 : register(u18);
RWTexture2D<int4> uImageOutI4 : register(u19);
RWTexture2D<uint4> uImageInU4 : register(u20);
RWTexture2D<uint4> uImageOutU4 : register(u21);
RWBuffer<float4> uImageInBuffer4 : register(u22);
RWBuffer<float4> uImageOutBuffer4 : register(u23);
RWTexture2D<float4> uImageNoFmtF : register(u24);
RWTexture2D<uint4> uImageNoFmtU : register(u25);
RWTexture2D<int4> uImageNoFmtI : register(u26);
static uint3 gl_GlobalInvocationID;
struct SPIRV_Cross_Input
{
uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
};
void comp_main()
{
int2 _23 = int2(gl_GlobalInvocationID.xy);
uImageOutF[_23] = uImageInF[_23].x;
uImageOutI[_23] = uImageInI[_23].x;
uImageOutU[_23] = uImageInU[_23].x;
int _74 = int(gl_GlobalInvocationID.x);
uImageOutBuffer[_74] = uImageInBuffer[_74].x;
uImageOutF2[_23] = uImageInF2[_23].xy;
uImageOutI2[_23] = uImageInI2[_23].xy;
uImageOutU2[_23] = uImageInU2[_23].xy;
float4 _135 = uImageInBuffer2[_74].xyyy;
uImageOutBuffer2[_74] = _135.xy;
uImageOutF4[_23] = uImageInF4[_23];
int4 _165 = uImageInI4[_23];
uImageOutI4[_23] = _165;
uint4 _180 = uImageInU4[_23];
uImageOutU4[_23] = _180;
uImageOutBuffer4[_74] = uImageInBuffer4[_74];
uImageNoFmtF[_23] = _135;
uImageNoFmtU[_23] = _180;
uImageNoFmtI[_23] = _165;
}
[numthreads(1, 1, 1)]
void main(SPIRV_Cross_Input stage_input)
{
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
comp_main();
}