#panic: incorrect alignment

1 messages · Page 1 of 1 (latest)

naive apex
#

Hello everyone,

I'm currently having fun following the vkguide but using zig and I have it a weird wall. I'm getting a n error panic: incorrect alignment and frankly, I have no idea where this is coming from.

The line throwing is the following :

const push_constants = buffers.GPUDrawPushConstants { // src/renderer/engine.zig : line 678
  .world_matrix = c.glms_mat4_zero().raw,
  .vertex_buffer = rectangle.vertex_buffer_address,
};

resulting in

.world_matrix = c.glms_mat4_zero().raw,
                                ^

If you could provide some help or maybe a starting point to debug this, it will be much appreciate !

https://github.com/MrScriptX/z8/tree/remaster

GitHub

Contribute to MrScriptX/z8 development by creating an account on GitHub.

pulsar hull
naive apex
#

so I resolved the issue by doing std.mem.zero(c.mat4)

#

Now I have a sweet validation error with the fence

naive apex
#

correcting myself there. Very bad idea to do : std.mem.zero(c.mat4). This will lead to an undefined behavior. world matrix should be set to identity