1#version 450
2
3layout(binding = 0) uniform sampler1D tex1d;
4layout(binding = 1) uniform sampler2D tex2d;
5layout(binding = 2) uniform sampler3D tex3d;
6layout(binding = 3) uniform samplerCube texCube;
7layout(binding = 4) uniform sampler2DArray tex2dArray;
8layout(binding = 5) uniform samplerCubeArray texCubeArray;
9layout(binding = 6) uniform samplerBuffer texBuffer;
10
11layout(binding = 7) uniform sampler2DShadow depth2d;
12layout(binding = 8) uniform samplerCubeShadow depthCube;
13layout(binding = 9) uniform sampler2DArrayShadow depth2dArray;
14layout(binding = 10) uniform samplerCubeArrayShadow depthCubeArray;
15
16void main()
17{
18	// OpImageSampleImplicitLod
19	vec4 c = texture(tex1d, 0.0);
20	c = texture(tex2d, vec2(0.0, 0.0));
21	c = texture(tex3d, vec3(0.0, 0.0, 0.0));
22	c = texture(texCube, vec3(0.0, 0.0, 0.0));
23	c = texture(tex2dArray, vec3(0.0, 0.0, 0.0));
24	c = texture(texCubeArray, vec4(0.0, 0.0, 0.0, 0.0));
25
26	// OpImageSampleDrefImplicitLod
27	c.r = texture(depth2d, vec3(0.0, 0.0, 1.0));
28	c.r = texture(depthCube, vec4(0.0, 0.0, 0.0, 1.0));
29	c.r = texture(depth2dArray, vec4(0.0, 0.0, 0.0, 1.0));
30	c.r = texture(depthCubeArray, vec4(0.0, 0.0, 0.0, 0.0), 1.0);
31
32	// OpImageSampleProjImplicitLod
33	c = textureProj(tex1d, vec2(0.0, 1.0));
34	c = textureProj(tex2d, vec3(0.0, 0.0, 1.0));
35	c = textureProj(tex3d, vec4(0.0, 0.0, 0.0, 1.0));
36
37	// OpImageSampleProjDrefImplicitLod
38	c.r = textureProj(depth2d, vec4(0.0, 0.0, 1.0, 1.0));
39
40	// OpImageSampleExplicitLod
41	c = textureLod(tex1d, 0.0, 0.0);
42	c = textureLod(tex2d, vec2(0.0, 0.0), 0.0);
43	c = textureLod(tex3d, vec3(0.0, 0.0, 0.0), 0.0);
44	c = textureLod(texCube, vec3(0.0, 0.0, 0.0), 0.0);
45	c = textureLod(tex2dArray, vec3(0.0, 0.0, 0.0), 0.0);
46	c = textureLod(texCubeArray, vec4(0.0, 0.0, 0.0, 0.0), 0.0);
47
48	// OpImageSampleDrefExplicitLod
49	c.r = textureLod(depth2d, vec3(0.0, 0.0, 1.0), 0.0);
50
51	// OpImageSampleProjExplicitLod
52	c = textureProjLod(tex1d, vec2(0.0, 1.0), 0.0);
53	c = textureProjLod(tex2d, vec3(0.0, 0.0, 1.0), 0.0);
54	c = textureProjLod(tex3d, vec4(0.0, 0.0, 0.0, 1.0), 0.0);
55
56	// OpImageSampleProjDrefExplicitLod
57	c.r = textureProjLod(depth2d, vec4(0.0, 0.0, 1.0, 1.0), 0.0);
58
59	// OpImageFetch
60	c = texelFetch(tex1d, 0, 0);
61	c = texelFetch(tex2d, ivec2(0, 0), 0);
62	c = texelFetch(tex3d, ivec3(0, 0, 0), 0);
63	c = texelFetch(tex2dArray, ivec3(0, 0, 0), 0);
64
65	// Show that this transformation doesn't apply to Buffer images.
66	c = texelFetch(texBuffer, 0);
67
68	// OpImageGather
69	c = textureGather(tex2d, vec2(0.0, 0.0), 0);
70	c = textureGather(texCube, vec3(0.0, 0.0, 0.0), 1);
71	c = textureGather(tex2dArray, vec3(0.0, 0.0, 0.0), 2);
72	c = textureGather(texCubeArray, vec4(0.0, 0.0, 0.0, 0.0), 3);
73
74	// OpImageDrefGather
75	c = textureGather(depth2d, vec2(0.0, 0.0), 1.0);
76	c = textureGather(depthCube, vec3(0.0, 0.0, 0.0), 1.0);
77	c = textureGather(depth2dArray, vec3(0.0, 0.0, 0.0), 1.0);
78	c = textureGather(depthCubeArray, vec4(0.0, 0.0, 0.0, 0.0), 1.0);
79}
80