summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cross-compile/glsl-calculatelevelofdetail.slang11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/cross-compile/glsl-calculatelevelofdetail.slang b/tests/cross-compile/glsl-calculatelevelofdetail.slang
new file mode 100644
index 000000000..eb8c44a8b
--- /dev/null
+++ b/tests/cross-compile/glsl-calculatelevelofdetail.slang
@@ -0,0 +1,11 @@
+//TEST:CROSS_COMPILE(filecheck=CHECK): -profile ps_5_0 -entry main -target glsl
+
+// CHECK: textureQueryLod(sampler2D(t_0,s_0), ({{.*}})).x
+// CHECK: textureQueryLod(sampler2D(t_0,s_0), ({{.*}})).y
+
+Texture2D t;
+SamplerState s;
+float main()
+{
+ return t.CalculateLevelOfDetail(s, float2(0,0)) + t.CalculateLevelOfDetailUnclamped(s, float2(0,0));
+}