diff options
| author | Darren Wihandi <65404740+fairywreath@users.noreply.github.com> | 2025-01-09 23:49:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-09 20:49:59 -0800 |
| commit | 2b76466c4bc8a47bd4ac69994bafdbb2924272c2 (patch) | |
| tree | c000028f7ae01e8f275dc18ea6431934bc8d6152 /tests/metal/texture-sampler-less.slang | |
| parent | 55ff4686e5685c414d82f16b9c1a4a331bd4f853 (diff) | |
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 <yonghe@outlook.com>
Diffstat (limited to 'tests/metal/texture-sampler-less.slang')
| -rw-r--r-- | tests/metal/texture-sampler-less.slang | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/metal/texture-sampler-less.slang b/tests/metal/texture-sampler-less.slang index 78d092e17..a2631e90e 100644 --- a/tests/metal/texture-sampler-less.slang +++ b/tests/metal/texture-sampler-less.slang @@ -236,6 +236,24 @@ bool TEST_texture_float() // METALLIB: call {{.*}}.calculate_clamped_lod_texture_cube_array( && float(0) == tCubeArray.CalculateLevelOfDetail(normalize(float3(u, 1 - u, u))) + // Shadow variant + + // METAL: d2D{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_depth_2d( + && float(0) == d2D.CalculateLevelOfDetail(float2(u, u)) + + // METAL: dCube{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_depth_cube( + && float(0) == dCube.CalculateLevelOfDetail(normalize(float3(u, 1 - u, u))) + + // METAL: d2DArray{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_depth_2d_array( + && float(0) == d2DArray.CalculateLevelOfDetail(float2(u, u)) + + // METAL: dCubeArray{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_depth_cube_array( + && float(0) == dCubeArray.CalculateLevelOfDetail(normalize(float3(u, 1 - u, u))) + // ======================================== // float CalculateLevelOfDetailUnclamped() // ======================================== @@ -260,6 +278,24 @@ bool TEST_texture_float() // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_cube_array( && float(0) >= tCubeArray.CalculateLevelOfDetailUnclamped(normalize(float3(u, 1 - u, u))) + // Shadow variant + + // METAL: d2D{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_depth_2d( + && float(0) >= d2D.CalculateLevelOfDetailUnclamped(float2(u, u)) + + // METAL: dCube{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_depth_cube( + && float(0) >= dCube.CalculateLevelOfDetailUnclamped(normalize(float3(u, 1 - u, u))) + + // METAL: d2DArray{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_depth_2d_array( + && float(0) >= d2DArray.CalculateLevelOfDetailUnclamped(float2(u, u)) + + // METAL: dCubeArray{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_depth_cube_array( + && float(0) >= dCubeArray.CalculateLevelOfDetailUnclamped(normalize(float3(u, 1 - u, u))) + // =========== // T Sample() // =========== |
