SPIRV-Cross/reference/shaders-hlsl/comp/image.nonwritable-uav-texture.comp

74 lines
3.1 KiB
Plaintext

static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
Texture2D<float4> uImageInF : register(t0);
RWTexture2D<float> uImageOutF : register(u1);
Texture2D<int4> uImageInI : register(t2);
RWTexture2D<int> uImageOutI : register(u3);
Texture2D<uint4> uImageInU : register(t4);
RWTexture2D<uint> uImageOutU : register(u5);
Buffer<float4> uImageInBuffer : register(t6);
RWBuffer<float> uImageOutBuffer : register(u7);
Texture2D<float4> uImageInF2 : register(t8);
RWTexture2D<float2> uImageOutF2 : register(u9);
Texture2D<int4> uImageInI2 : register(t10);
RWTexture2D<int2> uImageOutI2 : register(u11);
Texture2D<uint4> uImageInU2 : register(t12);
RWTexture2D<uint2> uImageOutU2 : register(u13);
Buffer<float4> uImageInBuffer2 : register(t14);
RWBuffer<float2> uImageOutBuffer2 : register(u15);
Texture2D<float4> uImageInF4 : register(t16);
RWTexture2D<float4> uImageOutF4 : register(u17);
Texture2D<int4> uImageInI4 : register(t18);
RWTexture2D<int4> uImageOutI4 : register(u19);
Texture2D<uint4> uImageInU4 : register(t20);
RWTexture2D<uint4> uImageOutU4 : register(u21);
Buffer<float4> uImageInBuffer4 : register(t22);
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()
{
float4 f = uImageInF[int2(gl_GlobalInvocationID.xy)];
uImageOutF[int2(gl_GlobalInvocationID.xy)] = f.x;
int4 i = uImageInI[int2(gl_GlobalInvocationID.xy)];
uImageOutI[int2(gl_GlobalInvocationID.xy)] = i.x;
uint4 u = uImageInU[int2(gl_GlobalInvocationID.xy)];
uImageOutU[int2(gl_GlobalInvocationID.xy)] = u.x;
float4 b = uImageInBuffer[int(gl_GlobalInvocationID.x)];
uImageOutBuffer[int(gl_GlobalInvocationID.x)] = b.x;
float4 f2 = uImageInF2[int2(gl_GlobalInvocationID.xy)];
uImageOutF2[int2(gl_GlobalInvocationID.xy)] = f2.xy;
int4 i2 = uImageInI2[int2(gl_GlobalInvocationID.xy)];
uImageOutI2[int2(gl_GlobalInvocationID.xy)] = i2.xy;
uint4 u2 = uImageInU2[int2(gl_GlobalInvocationID.xy)];
uImageOutU2[int2(gl_GlobalInvocationID.xy)] = u2.xy;
float4 b2 = uImageInBuffer2[int(gl_GlobalInvocationID.x)];
uImageOutBuffer2[int(gl_GlobalInvocationID.x)] = b2.xy;
float4 f4 = uImageInF4[int2(gl_GlobalInvocationID.xy)];
uImageOutF4[int2(gl_GlobalInvocationID.xy)] = f4;
int4 i4 = uImageInI4[int2(gl_GlobalInvocationID.xy)];
uImageOutI4[int2(gl_GlobalInvocationID.xy)] = i4;
uint4 u4 = uImageInU4[int2(gl_GlobalInvocationID.xy)];
uImageOutU4[int2(gl_GlobalInvocationID.xy)] = u4;
float4 b4 = uImageInBuffer4[int(gl_GlobalInvocationID.x)];
uImageOutBuffer4[int(gl_GlobalInvocationID.x)] = b4;
uImageNoFmtF[int2(gl_GlobalInvocationID.xy)] = b2;
uImageNoFmtU[int2(gl_GlobalInvocationID.xy)] = u4;
uImageNoFmtI[int2(gl_GlobalInvocationID.xy)] = i4;
}
[numthreads(1, 1, 1)]
void main(SPIRV_Cross_Input stage_input)
{
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
comp_main();
}