Skip to content

Commit

Permalink
Fix Emscripten wasm64 compilation error.
Browse files Browse the repository at this point in the history
Fixes the following compile error:

```
bimg/3rdparty/nvtt/nvcore/debug.h:177:10: error: cast from pointer to
smaller type 'uint32' (aka 'unsigned int') loses information
```
  • Loading branch information
tritao committed Apr 28, 2024
1 parent e9fa0ce commit d32b9d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 3rdparty/nvtt/nvcore/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ NVCORE_API void NV_CDECL nvDebugPrint( const char *msg, ... ) __attribute__((for
namespace nv
{
inline bool isValidPtr(const void * ptr) {
#if NV_CPU_X86_64 || NV_CPU_AARCH64
#if NV_CPU_X86_64 || NV_CPU_AARCH64 || defined(__wasm64__)
if (ptr == NULL) return true;
if (reinterpret_cast<uint64>(ptr) < 0x10000ULL) return false;
if (reinterpret_cast<uint64>(ptr) >= 0x000007FFFFFEFFFFULL) return false;
Expand Down

0 comments on commit d32b9d6

Please sign in to comment.