>Can you share the full warning message (I only see the "note" part)? And the context in which you are using the macro?
Oops sorry, here's the full warning:
C:/Users/marks/dev/xros/window/tests/windowtest.cpp:231:33: warning: implicit conversion from 'unsigned long long' to 'size_t' (aka 'unsigned long') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
buffer, WGPUMapMode_Write, 0, WGPU_WHOLE_SIZE,
^~~~~~~~~~~~~~~
C:\Users\marks\dev\emsdk\upstream\emscripten\cache\sysroot/include\webgpu/webgpu.h:61:26: note: expanded from macro 'WGPU_WHOLE_SIZE'
#define WGPU_WHOLE_SIZE (0xffffffffffffffffULL)
...and here's where I'm using the macro:
WGPUBindGroupEntry bgEntry{};
bgEntry.buffer = uniforms[eye];
bgEntry.offset = 0;
bgEntry.size = WGPU_WHOLE_SIZE;
..and...
wgpuBufferMapAsync(
buffer, WGPUMapMode_Write, 0, WGPU_WHOLE_SIZE,
[](WGPUBufferMapAsyncStatus, void* buffer) { stagingBuffers.push_back((WGPUBuffer)buffer); }, buffer);
...and...
wgpuRenderPassEncoderSetVertexBuffer(pass, 0, vertexBuffer, 0, WGPU_WHOLE_SIZE);
It's meant to save you having to specify buffer sizes in a few
places in native dawn, although I'm not clear on exactly where it can be
used.
This all works in native code, but I'm begining to think it doesn't work at all in emscripten, or at least not the same way!
Bye,
Mark