Skip to content

Commit 22ab085

Browse files
committed
Fixes
1 parent f278259 commit 22ab085

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

include/nbl/builtin/hlsl/glsl_compat/core.hlsl

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -127,31 +127,6 @@ enable_if_t<is_spirv_type_v<Ptr_T>, T> atomicCompSwap(Ptr_T ptr, T comparator, T
127127
return spirv::atomicCompareExchange<T, Ptr_T>(ptr, spv::ScopeDevice, spv::MemorySemanticsMaskNone, spv::MemorySemanticsMaskNone, value, comparator);
128128
}
129129

130-
/**
131-
* GLSL std 450
132-
*/
133-
134-
template<typename T>
135-
inline int findMSB(T val);
136-
137-
//template<>
138-
//inline int findMSB<int32_t>(int32_t val) { return spirv::FindSMsb(val); }
139-
template<>
140-
inline int findMSB<uint32_t>(uint32_t val) { return spirv::FindUMsb(val); }
141-
template<>
142-
inline int findMSB<uint64_t>(uint64_t val)
143-
{
144-
NBL_CONSTEXPR_STATIC uint64_t HighBitsMask = (~uint64_t(0)) << 32;
145-
NBL_CONSTEXPR_STATIC uint64_t LowBitsMask = ~uint32_t(0);
146-
uint32_t highBits = uint32_t((val & HighBitsMask) >> 32);
147-
uint32_t lowBits = uint32_t(val & LowBitsMask);
148-
149-
if (highBits == 0)
150-
return spirv::FindUMsb(lowBits);
151-
return spirv::FindUMsb(highBits) + 32;
152-
}
153-
154-
155130
/**
156131
* GLSL extended math
157132
*/

include/nbl/builtin/hlsl/tgmath.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ inline bool isInf(T val)
4444
template<>\
4545
inline bool isNaN<TYPE>(TYPE val)\
4646
{\
47-
return spirv::isnan(val);\
47+
return spirv::isNan(val);\
4848
}\
4949

5050
#define DEFINE_IS_INF_SPECIALIZATION(TYPE)\
5151
template<>\
5252
inline bool isInf<TYPE>(TYPE val)\
5353
{\
54-
return spirv::isinf(val);\
54+
return spirv::isInf(val);\
5555
}\
5656

5757
DEFINE_IS_NAN_SPECIALIZATION(float16_t)

0 commit comments

Comments
 (0)