Skip to content

Commit

Permalink
Add support for Wasm as a platform
Browse files Browse the repository at this point in the history
This helps to address issue shader-slang#5115.
  • Loading branch information
aleino-nv committed Sep 25, 2024
1 parent e34a253 commit 5857c74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/slang.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ Operating system defines, see http://sourceforge.net/p/predef/wiki/OperatingSyst
# define SLANG_PSP2 1
# elif defined(__ghs__)
# define SLANG_WIIU 1
# elif defined(__EMSCRIPTEN__)
# define SLANG_WASM 1
# else
# error "unknown target platform"
# endif
Expand Down Expand Up @@ -417,7 +419,9 @@ convention for interface methods.
# define SLANG_PROCESSOR_ARM 1
#elif defined(_M_ARM64) || defined(__aarch64__)
# define SLANG_PROCESSOR_ARM_64 1
#endif
#elif defined(__EMSCRIPTEN__)
# define SLANG_PROCESSOR_WASM 1
#endif

#ifndef SLANG_PROCESSOR_ARM
# define SLANG_PROCESSOR_ARM 0
Expand Down Expand Up @@ -465,6 +469,8 @@ convention for interface methods.
# endif
#elif SLANG_PROCESSOR_FAMILY_POWER_PC
# define SLANG_BIG_ENDIAN 1
#elif SLANG_WASM
# define SLANG_LITTLE_ENDIAN 1
#endif

#ifndef SLANG_LITTLE_ENDIAN
Expand Down

0 comments on commit 5857c74

Please sign in to comment.