Skip to content

Commit 9636c1f

Browse files
committed
address pr comments
1 parent 2807d0e commit 9636c1f

File tree

5 files changed

+13
-23
lines changed

5 files changed

+13
-23
lines changed

clang/lib/Headers/hlsl/hlsl_compat_overloads.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//===--- hlsl_compat_overloads.h - Additional HLSL overload definitions for
2-
// intrinsics --===//
1+
//===--- hlsl_compat_overloads.h - Extra HLSL overloads for intrinsics --===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
54
// See https://llvm.org/LICENSE.txt for license information.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 | FileCheck %s -DTEST_TYPE=half
2+
// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 | FileCheck %s -DTEST_TYPE=half3
3+
// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 | FileCheck %s -DTEST_TYPE=int16_t
4+
// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 | FileCheck %s -DTEST_TYPE=int16_t3
5+
// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 | FileCheck %s -DTEST_TYPE=uint16_t
6+
// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 | FileCheck %s -DTEST_TYPE=uint16_t3
7+
8+
// check we error on 16 bit type if shader model is too old
9+
// CHECK: '-enable-16bit-types' option requires target HLSL Version >= 2018 and shader model >= 6.2, but HLSL Version is 'hlsl202x' and shader model is '6.0'
10+
half test_half_error(DTEST_TYPE p0, int p1) {
11+
return clamp(p0, p1, p1);
12+
}

clang/test/SemaHLSL/BuiltIns/clamp-errors-half.hlsl

Lines changed: 0 additions & 7 deletions
This file was deleted.

clang/test/SemaHLSL/BuiltIns/clamp-errors-int16.hlsl

Lines changed: 0 additions & 7 deletions
This file was deleted.

clang/test/SemaHLSL/BuiltIns/clamp-errors-uint16.hlsl

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)