Skip to content

Commit 3ecfc8e

Browse files
committed
fix compilation errors
1 parent 1497506 commit 3ecfc8e

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

include/nbl/builtin/hlsl/member_test_macros.hlsl

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@
77
#include <nbl/builtin/hlsl/type_traits.hlsl>
88

99
#ifdef __HLSL_VERSION
10-
#define NBL_GENERATE_MEMBER_TESTER(mem) \
11-
namespace nbl\
12-
{\
13-
namespace hlsl\
14-
{\
15-
template<class T, class=bool_constant<true> > \
16-
struct has_member_##mem : false_type {}; \
17-
template<class T> \
18-
struct has_member_##mem<T,bool_constant<impl::valid_expression<decltype(impl::declval<T>().mem)>::value> > : true_type {}; \
19-
}\
20-
}
2110

2211
namespace nbl
2312
{
@@ -41,6 +30,20 @@ T declval(){}
4130

4231
}
4332

33+
34+
#define NBL_GENERATE_MEMBER_TESTER(mem) \
35+
namespace nbl \
36+
{ \
37+
namespace hlsl \
38+
{ \
39+
template<class T, class=bool_constant<true> > \
40+
struct has_member_##mem : false_type {}; \
41+
template<class T> \
42+
struct has_member_##mem<T,bool_constant<impl::valid_expression<__decltype(impl::declval<T>().mem)>::value> > : true_type {}; \
43+
} \
44+
}
45+
46+
4447
NBL_GENERATE_MEMBER_TESTER(x)
4548
NBL_GENERATE_MEMBER_TESTER(y)
4649
NBL_GENERATE_MEMBER_TESTER(z)

include/nbl/builtin/hlsl/spirv_intrinsics/core.hlsl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ void memoryBarrier(uint32_t memoryScope, uint32_t memorySemantics);
110110
#pragma region CONVERSION
111111

112112
template<class T, class U>
113-
// [[vk::ext_extension("SPV_KHR_physical_storage_buffer")]]
114-
// [[vk::ext_capability(spv::CapabilityPhysicalStorageBufferAddresses)]]
115-
// [[vk::ext_capability(spv::CapabilityAddresses)]]
116-
// [[vk::ext_capability(spv::CapabilityFloat64)]]
117113
[[vk::ext_instruction(spv::OpBitcast)]]
118114
T bitcast(U);
119115

include/nbl/builtin/hlsl/type_traits.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ using integral_constant = std::integral_constant<T, val>;
487487
template<bool val>
488488
using bool_constant = std::bool_constant<val>;
489489

490-
using bool_constant = std::true_type;
491-
using false_type = std::false_type;
490+
using true_type = std::true_type;
491+
using false_type = std::false_type;
492492

493493
template <bool C, class T, class F>
494494
using conditional = std::conditional<C, T, F>;

0 commit comments

Comments
 (0)