From 2b76466c4bc8a47bd4ac69994bafdbb2924272c2 Mon Sep 17 00:00:00 2001 From: Darren Wihandi <65404740+fairywreath@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:49:59 -0500 Subject: Add CalculateLevelOfDetail* overloads for comparison samplers (#6018) * add CalculateLevelOfDetail* intrinsics for comparison samplers * fix dx12 test * fix metallib test * fix merge conflict --------- Co-authored-by: Yong He --- tests/cross-compile/glsl-calculatelevelofdetail.slang | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tests/cross-compile') diff --git a/tests/cross-compile/glsl-calculatelevelofdetail.slang b/tests/cross-compile/glsl-calculatelevelofdetail.slang index eb8c44a8b..bef0110ac 100644 --- a/tests/cross-compile/glsl-calculatelevelofdetail.slang +++ b/tests/cross-compile/glsl-calculatelevelofdetail.slang @@ -1,11 +1,18 @@ //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 +// CHECK: textureQueryLod(sampler2D( +// CHECK: textureQueryLod(sampler2D( +// CHECK: textureQueryLod(sampler2DShadow( +// CHECK: textureQueryLod(sampler2DShadow( Texture2D t; SamplerState s; +SamplerComparisonState sc; + float main() { - return t.CalculateLevelOfDetail(s, float2(0,0)) + t.CalculateLevelOfDetailUnclamped(s, float2(0,0)); + float result = 0.0; + result += t.CalculateLevelOfDetail(s, float2(0,0)) + t.CalculateLevelOfDetailUnclamped(s, float2(0,0)); + result += t.CalculateLevelOfDetail(sc, float2(0,0)) + t.CalculateLevelOfDetailUnclamped(sc, float2(0,0)); + return result; } -- cgit v1.2.3