Debian Codegraph @

third_party/spirv-cross/shaders/desktop-only/frag/image-query.desktop.frag

raw
1 #version 450
2
3 layout(binding = 0) uniform sampler1D uSampler1D;
4 layout(binding = 1) uniform sampler2D uSampler2D;
5 layout(binding = 2) uniform sampler2DArray uSampler2DArray;
6 layout(binding = 3) uniform sampler3D uSampler3D;
7 layout(binding = 4) uniform samplerCube uSamplerCube;
8 layout(binding = 5) uniform samplerCubeArray uSamplerCubeArray;
9 layout(binding = 6) uniform samplerBuffer uSamplerBuffer;
10 layout(binding = 7) uniform sampler2DMS uSamplerMS;
11 layout(binding = 8) uniform sampler2DMSArray uSamplerMSArray;
12
13 layout(r32f, binding = 9) uniform image1D uImage1D;
14 layout(r32f, binding = 10) uniform image2D uImage2D;
15 layout(r32f, binding = 11) uniform image2DArray uImage2DArray;
16 layout(r32f, binding = 12) uniform image3D uImage3D;
17 layout(r32f, binding = 13) uniform imageCube uImageCube;
18 layout(r32f, binding = 14) uniform imageCubeArray uImageCubeArray;
19 layout(r32f, binding = 15) uniform imageBuffer uImageBuffer;
20 layout(r32f, binding = 16) uniform image2DMS uImageMS;
21 layout(r32f, binding = 17) uniform image2DMSArray uImageMSArray;
22
23 void main()
24 {
25 int a = textureSize(uSampler1D, 0);
26 ivec2 b = textureSize(uSampler2D, 0);
27 ivec3 c = textureSize(uSampler2DArray, 0);
28 ivec3 d = textureSize(uSampler3D, 0);
29 ivec2 e = textureSize(uSamplerCube, 0);
30 ivec3 f = textureSize(uSamplerCubeArray, 0);
31 int g = textureSize(uSamplerBuffer);
32 ivec2 h = textureSize(uSamplerMS);
33 ivec3 i = textureSize(uSamplerMSArray);
34
35 int l0 = textureQueryLevels(uSampler1D);
36 int l1 = textureQueryLevels(uSampler2D);
37 int l2 = textureQueryLevels(uSampler2DArray);
38 int l3 = textureQueryLevels(uSampler3D);
39 int l4 = textureQueryLevels(uSamplerCube);
40 int l5 = textureQueryLevels(uSamplerCubeArray);
41
42 a = imageSize(uImage1D);
43 b = imageSize(uImage2D);
44 c = imageSize(uImage2DArray);
45 d = imageSize(uImage3D);
46 e = imageSize(uImageCube);
47 f = imageSize(uImageCubeArray);
48 g = imageSize(uImageBuffer);
49 h = imageSize(uImageMS);
50 i = imageSize(uImageMSArray);
51
52 int s0 = textureSamples(uSamplerMS);
53 int s1 = textureSamples(uSamplerMSArray);
54 int s2 = imageSamples(uImageMS);
55 int s3 = imageSamples(uImageMSArray);
56 }