3 #extension GL_EXT_shader_image_load_formatted : require
\r
5 layout(binding = 0) uniform image1D i1D;
\r
6 layout(binding = 1) uniform image2D i2D;
\r
7 layout(binding = 2) uniform image3D i3D;
\r
8 layout(binding = 3) uniform imageCube iCube;
\r
9 layout(binding = 4) uniform imageCubeArray iCubeArray;
\r
10 layout(binding = 5) uniform image2DRect i2DRect;
\r
11 layout(binding = 6) uniform image1DArray i1DArray;
\r
12 layout(binding = 7) uniform image2DArray i2DArray;
\r
13 layout(binding = 8) uniform imageBuffer iBuffer;
\r
14 layout(binding = 9) uniform image2DMS i2DMS;
\r
15 layout(binding = 10) uniform image2DMSArray i2DMSArray;
\r
22 writeonly layout(binding = 1) uniform image2D wo2D;
\r
30 ivec3 iv = ivec3(0);
\r
31 iv.x += imageSize(i1D);
\r
32 iv.xy += imageSize(i2D);
\r
33 iv.xyz += imageSize(i3D);
\r
34 iv.xy += imageSize(iCube);
\r
35 iv.xyz += imageSize(iCubeArray);
\r
36 iv.xy += imageSize(i2DRect);
\r
37 iv.xy += imageSize(i1DArray);
\r
38 iv.xyz += imageSize(i2DArray);
\r
39 iv.x += imageSize(iBuffer);
\r
40 iv.xy += imageSize(i2DMS);
\r
41 iv.xyz += imageSize(i2DMSArray);
\r
43 iv.x += imageSamples(i2DMS);
\r
44 iv.x += imageSamples(i2DMSArray);
\r
47 v += imageLoad(i1D, ic1D);
\r
48 imageStore(i1D, ic1D, v);
\r
49 v += imageLoad(i2D, ic2D);
\r
50 imageStore(i2D, ic2D, v);
\r
51 v += imageLoad(i3D, ic3D);
\r
52 imageStore(i3D, ic3D, v);
\r
53 v += imageLoad(iCube, ic3D);
\r
54 imageStore(iCube, ic3D, v);
\r
55 v += imageLoad(iCubeArray, ic3D);
\r
56 imageStore(iCubeArray, ic3D, v);
\r
57 v += imageLoad(i2DRect, ic2D);
\r
58 imageStore(i2DRect, ic2D, v);
\r
59 v += imageLoad(i1DArray, ic2D);
\r
60 imageStore(i1DArray, ic2D, v);
\r
61 v += imageLoad(i2DArray, ic3D);
\r
62 imageStore(i2DArray, ic3D, v);
\r
63 v += imageLoad(iBuffer, ic1D);
\r
64 imageStore(iBuffer, ic1D, v);
\r
65 v += imageLoad(i2DMS, ic2D, 1);
\r
66 imageStore(i2DMS, ic2D, 2, v);
\r
67 v += imageLoad(i2DMSArray, ic3D, 3);
\r
68 imageStore(i2DMSArray, ic3D, 4, v);
\r
70 imageStore(wo2D, ic2D, v);
\r