From 2a45bc312d9e4d2bc7d4ef0f172dd54750133b35 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 7 Jun 2024 21:42:45 -0700 Subject: Support HLSL `.mips` syntax. (#4310) --- tests/hlsl/texture-mips-operator.slang | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/hlsl/texture-mips-operator.slang (limited to 'tests') diff --git a/tests/hlsl/texture-mips-operator.slang b/tests/hlsl/texture-mips-operator.slang new file mode 100644 index 000000000..9da8711c5 --- /dev/null +++ b/tests/hlsl/texture-mips-operator.slang @@ -0,0 +1,13 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +// CHECK: OpImageFetch %v4float {{.*}} Lod %int_1 + +RWStructuredBuffer result; + +uniform Texture2D gTex; + +[numthreads(1,1,1)] +void main() +{ + result[0] = gTex.mips[1][int2(3,4)]; +} \ No newline at end of file -- cgit v1.2.3