@@ -341,6 +341,31 @@ bool TEST_texture(
341
341
// METALLIB: call {{.*}}.calculate_clamped_lod_texture_cube_array(
342
342
&& float (0 ) == tCubeArray .CalculateLevelOfDetail (samplerState, normalize(float3(u, 1 - u, u)))
343
343
344
+ // SamplerComparisonState variant
345
+
346
+ // Functional tests that require SM higher than 6.6 (as of writing) cannot run.
347
+ #if ! defined (EXCLUDE_SM_6_7 )
348
+ // METAL: t2D{{.*}}.calculate_clamped_lod({{.*}}
349
+ // METALLIB: call {{.*}}.calculate_clamped_lod_texture_2d(
350
+ && float (0 ) == t2D .CalculateLevelOfDetail (shadowSampler, float2(u, u))
351
+
352
+ // METAL: t3D{{.*}}.calculate_clamped_lod({{.*}}
353
+ // METALLIB: call {{.*}}.calculate_clamped_lod_texture_3d(
354
+ && float (0 ) == t3D .CalculateLevelOfDetail (shadowSampler, float3(u, u, u))
355
+
356
+ // METAL: tCube{{.*}}.calculate_clamped_lod({{.*}}
357
+ // METALLIB: call {{.*}}.calculate_clamped_lod_texture_cube(
358
+ && float (0 ) == tCube .CalculateLevelOfDetail (shadowSampler, normalize(float3(u, 1 - u, u)))
359
+
360
+ // METAL: t2DArray{{.*}}.calculate_clamped_lod({{.*}}
361
+ // METALLIB: call {{.*}}.calculate_clamped_lod_texture_2d_array(
362
+ && float (0 ) == t2DArray .CalculateLevelOfDetail (shadowSampler, float2(u, u))
363
+
364
+ // METAL: tCubeArray{{.*}}.calculate_clamped_lod({{.*}}
365
+ // METALLIB: call {{.*}}.calculate_clamped_lod_texture_cube_array(
366
+ && float (0 ) == tCubeArray .CalculateLevelOfDetail (shadowSampler, normalize(float3(u, 1 - u, u)))
367
+ #endif
368
+
344
369
// ========================================
345
370
// float CalculateLevelOfDetailUnclamped()
346
371
// ========================================
@@ -367,6 +392,29 @@ bool TEST_texture(
367
392
// METALLIB: call {{.*}}.calculate_unclamped_lod_texture_cube_array(
368
393
&& float (0 ) >= tCubeArray .CalculateLevelOfDetailUnclamped (samplerState, normalize(float3(u, 1 - u, u)))
369
394
395
+ // SamplerComparisonState variant
396
+ #if ! defined (EXCLUDE_SM_6_7 )
397
+ // METAL: t2D{{.*}}.calculate_unclamped_lod({{.*}}
398
+ // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_2d(
399
+ && float (0 ) >= t2D .CalculateLevelOfDetailUnclamped (shadowSampler, float2(u, u))
400
+
401
+ // METAL: t3D{{.*}}.calculate_unclamped_lod({{.*}}
402
+ // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_3d(
403
+ && float (0 ) >= t3D .CalculateLevelOfDetailUnclamped (shadowSampler, float3(u, u, u))
404
+
405
+ // METAL: tCube{{.*}}.calculate_unclamped_lod({{.*}}
406
+ // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_cube(
407
+ && float (0 ) >= tCube .CalculateLevelOfDetailUnclamped (shadowSampler, normalize(float3(u, 1 - u, u)))
408
+
409
+ // METAL: t2DArray{{.*}}.calculate_unclamped_lod({{.*}}
410
+ // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_2d_array(
411
+ && float (0 ) >= t2DArray .CalculateLevelOfDetailUnclamped (shadowSampler, float2(u, u))
412
+
413
+ // METAL: tCubeArray{{.*}}.calculate_unclamped_lod({{.*}}
414
+ // METALLIB: call {{.*}}.calculate_unclamped_lod_texture_cube_array(
415
+ && float (0 ) >= tCubeArray .CalculateLevelOfDetailUnclamped (shadowSampler, normalize(float3(u, 1 - u, u)))
416
+ #endif
417
+
370
418
// ===========
371
419
// T Sample()
372
420
// ===========
0 commit comments