|
1 |
| -// RUN: %dxc -T ps_6_7 %s -DTYPE=uint | FileCheck %s |
2 |
| -// RUN: %dxc -T ps_6_7 %s -DTYPE=int | FileCheck %s |
| 1 | +// RUN: %dxc -T ps_6_7 %s -DSKIP_SAMPLE_CMP -DTYPE=uint | FileCheck %s |
| 2 | +// RUN: %dxc -T ps_6_7 %s -DSKIP_SAMPLE_CMP -DTYPE=int | FileCheck %s |
3 | 3 | // RUN: %dxc -T ps_6_6 %s -DTYPE=uint | FileCheck %s -check-prefix=CHKFAIL
|
4 |
| -// RUN: %dxc -T ps_6_7 %s -DTYPE=uint16_t -enable-16bit-types | FileCheck %s -check-prefix=CHECK16 |
5 |
| -// RUN: %dxc -T ps_6_7 %s -DTYPE=int16_t -enable-16bit-types | FileCheck %s -check-prefix=CHECK16 |
| 4 | +// RUN: %dxc -T ps_6_7 %s -DSKIP_SAMPLE_CMP -DTYPE=uint16_t -enable-16bit-types | FileCheck %s -check-prefix=CHECK16 |
| 5 | +// RUN: %dxc -T ps_6_7 %s -DSKIP_SAMPLE_CMP -DTYPE=int16_t -enable-16bit-types | FileCheck %s -check-prefix=CHECK16 |
6 | 6 | // RUN: %dxc -T ps_6_6 %s -DTYPE=uint16_t -enable-16bit-types | FileCheck %s -check-prefix=CHKFAIL
|
7 | 7 |
|
8 | 8 | SamplerState g_samp : register(s0);
|
9 | 9 | SamplerComparisonState g_sampCmp : register(s01);
|
10 | 10 | Texture2D<TYPE> g_tex0 : register(t0);
|
11 | 11 |
|
12 |
| -// CHECK: Note: shader requires additional functionality: |
13 |
| -// CHECK-NEXT: Advanced Texture Ops |
14 | 12 | // CHECK: call %dx.types.ResRet.i32 @dx.op.sample.i32(i32 60
|
15 | 13 | // CHECK: call %dx.types.ResRet.i32 @dx.op.sampleBias.i32(i32 61
|
16 | 14 | // CHECK: call %dx.types.ResRet.i32 @dx.op.sampleLevel.i32(i32 62
|
17 | 15 | // CHECK: call %dx.types.ResRet.i32 @dx.op.sampleGrad.i32(i32 63
|
18 |
| -// CHECK: call %dx.types.ResRet.f32 @dx.op.sampleCmp.f32(i32 64 |
19 |
| -// CHECK: call %dx.types.ResRet.f32 @dx.op.sampleCmpLevelZero.f32(i32 65 |
20 |
| -// CHECK: call %dx.types.ResRet.f32 @dx.op.sampleCmpLevel.f32(i32 224 |
21 | 16 |
|
22 |
| -// CHECK16: Note: shader requires additional functionality: |
23 |
| -// CHECK16: Advanced Texture Ops |
24 | 17 | // CHECK16: call %dx.types.ResRet.i16 @dx.op.sample.i16(i32 60
|
25 | 18 | // CHECK16: call %dx.types.ResRet.i16 @dx.op.sampleBias.i16(i32 61
|
26 | 19 | // CHECK16: call %dx.types.ResRet.i16 @dx.op.sampleLevel.i16(i32 62
|
27 | 20 | // CHECK16: call %dx.types.ResRet.i16 @dx.op.sampleGrad.i16(i32 63
|
28 |
| -// CHECK16: call %dx.types.ResRet.f32 @dx.op.sampleCmp.f32(i32 64 |
29 |
| -// CHECK16: call %dx.types.ResRet.f32 @dx.op.sampleCmpLevelZero.f32(i32 65 |
30 |
| -// CHECK16: call %dx.types.ResRet.f32 @dx.op.sampleCmpLevel.f32(i32 224 |
31 | 21 |
|
32 | 22 | // CHKFAIL: error: cannot Sample from resource containing
|
33 | 23 | // CHKFAIL: error: cannot SampleBias from resource containing
|
34 | 24 | // CHKFAIL: error: cannot SampleLevel from resource containing
|
35 | 25 | // CHKFAIL: error: cannot SampleGrad from resource containing
|
36 | 26 | // CHKFAIL: error: cannot SampleCmp from resource containing
|
37 | 27 | // CHKFAIL: error: cannot SampleCmpLevelZero from resource containing
|
| 28 | +// CHKFAIL: error: cannot SampleCmpLevel from resource containing |
38 | 29 |
|
39 | 30 | float4 main(float2 coord : TEXCOORD0) : SV_Target {
|
40 | 31 | float res = 0;
|
41 | 32 | res = g_tex0.Sample(g_samp, coord);
|
42 | 33 | res += g_tex0.SampleBias(g_samp, coord, 0.0);
|
43 | 34 | res += g_tex0.SampleLevel(g_samp, coord, 0.0);
|
44 | 35 | res += g_tex0.SampleGrad(g_samp, coord, 0.0, 0.0);
|
| 36 | +#ifndef SKIP_SAMPLE_CMP |
45 | 37 | res += g_tex0.SampleCmp(g_sampCmp, coord, 0.0);
|
46 | 38 | res += g_tex0.SampleCmpLevelZero(g_sampCmp, coord, 0.0);
|
47 |
| -#if __SHADER_TARGET_MAJOR > 6 || (__SHADER_TARGET_MAJOR == 6 && __SHADER_TARGET_MINOR >= 7) |
48 | 39 | res += g_tex0.SampleCmpLevel(g_sampCmp, coord, 0.0, 0.0);
|
49 | 40 | #endif
|
50 | 41 | return res;
|
|
0 commit comments