Skip to content

Commit bec77d9

Browse files
committed
namespace the shady.h contents in C++ mode
1 parent 22a8660 commit bec77d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vcc-std/include/shady.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
#error "This header can only be used with Vcc"
66
#endif
77

8+
#if defined(__cplusplus) & !defined(SHADY_CPP_NO_NAMESPACE)
9+
namespace vcc {
10+
#endif
11+
812
#define vertex_shader __attribute__((annotate("shady::entry_point::Vertex")))
913
#define fragment_shader __attribute__((annotate("shady::entry_point::Fragment")))
1014
#define compute_shader __attribute__((annotate("shady::entry_point::Compute")))
@@ -56,4 +60,8 @@ __attribute__((annotate("shady::builtin::WorkgroupSize")))
5660
__attribute__((address_space(389)))
5761
uvec3 gl_WorkGroupSize;
5862

63+
#if defined(__cplusplus) & !defined(SHADY_CPP_NO_NAMESPACE)
64+
}
65+
#endif
66+
5967
#endif

0 commit comments

Comments
 (0)