summaryrefslogtreecommitdiffstats
path: root/tests/bugs/gh-122.slang.glsl
blob: a6f43256e452de5f7b6479930e36900055d2bcf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#version 450
//TEST_IGNORE_FILE:

layout(binding = 0)
uniform sampler SLANG_hack_samplerForTexelFetch;

layout(binding = 1)
uniform texture2D t;

vec4 main_()
{
	uint x, y, mipCount;

	x = textureSize(sampler2D(t,SLANG_hack_samplerForTexelFetch), 0).x;
	y = textureSize(sampler2D(t,SLANG_hack_samplerForTexelFetch), 0).y;
	mipCount = textureQueryLevels(sampler2D(t,SLANG_hack_samplerForTexelFetch));

    return vec4(
    	float(x),
    	float(y),
    	float(mipCount),
    	0.0);
}

layout(location = 0)
out vec4 SLANG_out_main_result;

void main()
{
	vec4 main_result = main_();
	SLANG_out_main_result = main_result;
}