Skip to content

Commit 5718451

Browse files
committed
address PR comments - formatting changes
1 parent 670b8cc commit 5718451

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

clang/lib/Headers/hlsl/hlsl_intrinsic_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ template <typename T> constexpr vector<T, 4> lit_impl(T NDotL, T NDotH, T M) {
105105
bool DiffuseCond = NDotL < 0;
106106
T Diffuse = select<T>(DiffuseCond, 0, NDotL);
107107
vector<T, 4> Result = {1, Diffuse, 0, 1};
108-
bool SpecularCond = or (DiffuseCond, (NDotH < 0));
108+
bool SpecularCond = or(DiffuseCond, (NDotH < 0));
109109
T SpecularExp = exp(log(NDotH) * M);
110110
Result[2] = select<T>(SpecularCond, 0, SpecularExp);
111111
return Result;

clang/test/CodeGenHLSL/builtins/lit.hlsl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// CHECK-NEXT: [[HLSL_SELECT7_I:%.*]] = select reassoc nnan ninf nsz arcp afn i1 [[HLSL_OR_I]], half 0xH0000, half [[ELT_EXP_I]]
1616
// CHECK-NEXT: [[VECINS_I:%.*]] = insertelement <4 x half> [[VECINIT2_I]], half [[HLSL_SELECT7_I]], i64 2
1717
// CHECK-NEXT: ret <4 x half> [[VECINS_I]]
18-
//
1918
half4 test_lit_half(half NDotL, half NDotH, half M) { return lit(NDotL, NDotH, M); }
2019

2120
// CHECK-LABEL: test_lit_float
@@ -32,5 +31,4 @@ half4 test_lit_half(half NDotL, half NDotH, half M) { return lit(NDotL, NDotH, M
3231
// CHECK-NEXT: [[HLSL_SELECT7_I:%.*]] = select reassoc nnan ninf nsz arcp afn i1 [[HLSL_OR_I]], float 0.000000e+00, float [[ELT_EXP_I]]
3332
// CHECK-NEXT: [[VECINS_I:%.*]] = insertelement <4 x float> [[VECINIT2_I]], float [[HLSL_SELECT7_I]], i64 2
3433
// CHECK-NEXT: ret <4 x float> [[VECINS_I]]
35-
//
3634
float4 test_lit_float(float NDotL, float NDotH, float M) { return lit(NDotL, NDotH, M); }

0 commit comments

Comments
 (0)