Skip to content

Commit 02f35ef

Browse files
committed
commented out ifdefs around pragma dxc due to #932
1 parent a5f2718 commit 02f35ef

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

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

944-
#ifdef __HLSL_VERSION
944+
// #ifdef __HLSL_VERSION
945945
#pragma dxc diagnostic push
946946
#pragma dxc diagnostic ignored "-Wliteral-range"
947-
#endif
947+
// #endif
948948
const T thresholds[4] = { 0, 5e5, 1e6, 1e15 }; // threshold values gotten from testing when the function returns nan/inf/1
949-
#ifdef __HLSL_VERSION
949+
// #ifdef __HLSL_VERSION
950950
#pragma dxc diagnostic pop
951-
#endif
951+
// #endif
952952
if (x+y > thresholds[mpl::find_lsb_v<sizeof(T)>])
953953
return T(0.0);
954954

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,14 @@ 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+
// #ifdef __HLSL_VERSION
543543
#pragma dxc diagnostic push
544544
#pragma dxc diagnostic ignored "-Wliteral-range"
545-
#endif
545+
// #endif
546546
const T thresholds[4] = { 0, 5e4, 1e36, 1e305 }; // threshold values gotten from testing when the function returns nan/inf
547-
#ifdef __HLSL_VERSION
547+
// #ifdef __HLSL_VERSION
548548
#pragma dxc diagnostic pop
549-
#endif
549+
// #endif
550550
if (x > thresholds[mpl::find_lsb_v<sizeof(T)>])
551551
return bit_cast<T>(numeric_limits<T>::infinity);
552552

@@ -588,14 +588,14 @@ struct beta_helper<T NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<T>) >
588588
// implementation from Numerical Recipes in C, 2nd ed.
589589
static T __call(T v1, T v2)
590590
{
591-
#ifdef __HLSL_VERSION
591+
// #ifdef __HLSL_VERSION
592592
#pragma dxc diagnostic push
593593
#pragma dxc diagnostic ignored "-Wliteral-range"
594-
#endif
594+
// #endif
595595
const T thresholds[4] = { 0, 2e4, 1e6, 1e15 }; // threshold values gotten from testing when the function returns nan/inf/1
596-
#ifdef __HLSL_VERSION
596+
// #ifdef __HLSL_VERSION
597597
#pragma dxc diagnostic pop
598-
#endif
598+
// #endif
599599
if (v1+v2 > thresholds[mpl::find_lsb_v<sizeof(T)>])
600600
return T(0.0);
601601

0 commit comments

Comments
 (0)