You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm rendering Clay with Odin through WebGPU. Two targets: win64 (through GLFW) and js_wasm32. On desktop, everything is working as expected. For the wasm target, I am getting "RuntimeError: memory access out of bounds" when trying to access a rectangle config.
for i in0 ..< render_commands.length {
render_command := clay.RenderCommandArray_Get(render_commands, i32(i))
switch (render_command.commandType) {
case clay.RenderCommandType.None:
case clay.RenderCommandType.Text:
case clay.RenderCommandType.Image:
case clay.RenderCommandType.ScissorStart:
case clay.RenderCommandType.ScissorEnd:
case clay.RenderCommandType.Rectangle:
config := renderCommand.config.rectangleElementConfig
fmt.println(config)
// BUG: Crashing herecase clay.RenderCommandType.Border:
case clay.RenderCommandType.Custom:
}
}
The pointer to renderCommand.config.rectangleElementConfig is 64bit on desktop and 32 bit in the browser. I'm assuming it's being lopped off.
(Found Clay through your recent Youtube vid - looks nice and I'm excited to play with it some more)
The text was updated successfully, but these errors were encountered:
Hello, and thanks for reaching out! I've seen a bit of weirdness around 32 vs 64bit pointers in wasm, so I'll take a closer look and let you know what I find.
I'm rendering Clay with Odin through WebGPU. Two targets: win64 (through GLFW) and js_wasm32. On desktop, everything is working as expected. For the wasm target, I am getting "RuntimeError: memory access out of bounds" when trying to access a rectangle config.
Code...
The pointer to
renderCommand.config.rectangleElementConfig
is 64bit on desktop and 32 bit in the browser. I'm assuming it's being lopped off.(Found Clay through your recent Youtube vid - looks nice and I'm excited to play with it some more)
The text was updated successfully, but these errors were encountered: