Skip to content

Commit 425bb68

Browse files
Merge pull request #933 from Devsh-Graphics-Programming/hotfix_ifdef_pragma_dxc_issue
Hotfix: commented out ifdefs around pragma dxc
2 parents a5f2718 + 19a61b0 commit 425bb68

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

include/nbl/builtin/hlsl/bxdf/common.hlsl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -941,14 +941,15 @@ struct beta
941941
{
942942
assert(x >= T(0.999) && y >= T(0.999));
943943

944-
#ifdef __HLSL_VERSION
944+
// currently throws a boost preprocess error, see: https://github.com/Devsh-Graphics-Programming/Nabla/issues/932
945+
// #ifdef __HLSL_VERSION
945946
#pragma dxc diagnostic push
946947
#pragma dxc diagnostic ignored "-Wliteral-range"
947-
#endif
948+
// #endif
948949
const T thresholds[4] = { 0, 5e5, 1e6, 1e15 }; // threshold values gotten from testing when the function returns nan/inf/1
949-
#ifdef __HLSL_VERSION
950+
// #ifdef __HLSL_VERSION
950951
#pragma dxc diagnostic pop
951-
#endif
952+
// #endif
952953
if (x+y > thresholds[mpl::find_lsb_v<sizeof(T)>])
953954
return T(0.0);
954955

include/nbl/builtin/hlsl/tgmath/impl.hlsl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,15 @@ struct l2gamma_helper<T NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<T>) >
539539
// implementation derived from Numerical Recipes in C, transformed for log2
540540
static T __call(T x)
541541
{
542-
#ifdef __HLSL_VERSION
542+
// currently throws a boost preprocess error, see: https://github.com/Devsh-Graphics-Programming/Nabla/issues/932
543+
// #ifdef __HLSL_VERSION
543544
#pragma dxc diagnostic push
544545
#pragma dxc diagnostic ignored "-Wliteral-range"
545-
#endif
546+
// #endif
546547
const T thresholds[4] = { 0, 5e4, 1e36, 1e305 }; // threshold values gotten from testing when the function returns nan/inf
547-
#ifdef __HLSL_VERSION
548+
// #ifdef __HLSL_VERSION
548549
#pragma dxc diagnostic pop
549-
#endif
550+
// #endif
550551
if (x > thresholds[mpl::find_lsb_v<sizeof(T)>])
551552
return bit_cast<T>(numeric_limits<T>::infinity);
552553

@@ -588,14 +589,15 @@ struct beta_helper<T NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<T>) >
588589
// implementation from Numerical Recipes in C, 2nd ed.
589590
static T __call(T v1, T v2)
590591
{
591-
#ifdef __HLSL_VERSION
592+
// currently throws a boost preprocess error, see: https://github.com/Devsh-Graphics-Programming/Nabla/issues/932
593+
// #ifdef __HLSL_VERSION
592594
#pragma dxc diagnostic push
593595
#pragma dxc diagnostic ignored "-Wliteral-range"
594-
#endif
596+
// #endif
595597
const T thresholds[4] = { 0, 2e4, 1e6, 1e15 }; // threshold values gotten from testing when the function returns nan/inf/1
596-
#ifdef __HLSL_VERSION
598+
// #ifdef __HLSL_VERSION
597599
#pragma dxc diagnostic pop
598-
#endif
600+
// #endif
599601
if (v1+v2 > thresholds[mpl::find_lsb_v<sizeof(T)>])
600602
return T(0.0);
601603

0 commit comments

Comments
 (0)