Skip to content

Commit 1e4e7c8

Browse files
author
devsh
committed
fix the SPIR-V references trying to compile for C++
1 parent f7c05ad commit 1e4e7c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/nbl/builtin/hlsl/functional.hlsl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace nbl
1313
{
1414
namespace hlsl
1515
{
16+
#ifdef __HLSL_VERSION // CPP
1617
template<uint32_t StorageClass, typename T>
1718
using __spv_ptr_t = spirv::pointer_t<StorageClass,T>;
1819

@@ -78,7 +79,9 @@ struct reference_wrapper : enable_if_t<
7879
// TODO: partial specializations for T being a special SPIR-V type for image ops, etc.
7980

8081

81-
#ifndef __HLSL_VERSION // CPP
82+
#else // CPP
83+
84+
8285
#define ALIAS_STD(NAME,OP) template<typename T> struct NAME : std::NAME<T> { \
8386
using type_t = T;
8487
#else

0 commit comments

Comments
 (0)