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.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.slang')
| -rw-r--r-- | tests/metal/texture.slang | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/metal/texture.slang b/tests/metal/texture.slang index feb0b4738..816c168ff 100644 --- a/tests/metal/texture.slang +++ b/tests/metal/texture.slang @@ -341,6 +341,31 @@ bool TEST_texture( // METALLIB: call {{.*}}.calculate_clamped_lod_texture_cube_array( && float(0) == tCubeArray.CalculateLevelOfDetail(samplerState, normalize(float3(u, 1 - u, u))) + // SamplerComparisonState variant + + // Functional tests that require SM higher than 6.6 (as of writing) cannot run. +#if !defined(EXCLUDE_SM_6_7) + // METAL: t2D{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_texture_2d( + && float(0) == t2D.CalculateLevelOfDetail(shadowSampler, float2(u, u)) + + // METAL: t3D{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_texture_3d( + && float(0) == t3D.CalculateLevelOfDetail(shadowSampler, float3(u, u, u)) + + // METAL: tCube{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_texture_cube( + && float(0) == tCube.CalculateLevelOfDetail(shadowSampler, normalize(float3(u, 1 - u, u))) + + // METAL: t2DArray{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_texture_2d_array( + && float(0) == t2DArray.CalculateLevelOfDetail(shadowSampler, float2(u, u)) + + // METAL: tCubeArray{{.*}}.calculate_clamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_clamped_lod_texture_cube_array( + && float(0) == tCubeArray.CalculateLevelOfDetail(shadowSampler, normalize(float3(u, 1 - u, u))) +#endif + // ======================================== // float CalculateLevelOfDetailUnclamped() // ======================================== @@ -367,6 +392,29 @@ bool TEST_texture( // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_cube_array( && float(0) >= tCubeArray.CalculateLevelOfDetailUnclamped(samplerState, normalize(float3(u, 1 - u, u))) + // SamplerComparisonState variant +#if !defined(EXCLUDE_SM_6_7) + // METAL: t2D{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_2d( + && float(0) >= t2D.CalculateLevelOfDetailUnclamped(shadowSampler, float2(u, u)) + + // METAL: t3D{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_3d( + && float(0) >= t3D.CalculateLevelOfDetailUnclamped(shadowSampler, float3(u, u, u)) + + // METAL: tCube{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_cube( + && float(0) >= tCube.CalculateLevelOfDetailUnclamped(shadowSampler, normalize(float3(u, 1 - u, u))) + + // METAL: t2DArray{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_2d_array( + && float(0) >= t2DArray.CalculateLevelOfDetailUnclamped(shadowSampler, float2(u, u)) + + // METAL: tCubeArray{{.*}}.calculate_unclamped_lod({{.*}} + // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_cube_array( + && float(0) >= tCubeArray.CalculateLevelOfDetailUnclamped(shadowSampler, normalize(float3(u, 1 - u, u))) +#endif + // =========== // T Sample() // =========== |
