mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 11:51:50 +00:00
[vulkan] Check qfv_matrix_buffer_t size
Instead of forcing it via unnecessary alignment. I didn't feel like using aligned malloc to silence ubsan when really the alignment was just to force the size to be aligned.
This commit is contained in:
parent
83c65e6abd
commit
46a0be837e
1 changed files with 4 additions and 1 deletions
|
@ -36,14 +36,17 @@
|
|||
#include "QF/Vulkan/image.h"
|
||||
#include "QF/simd/types.h"
|
||||
|
||||
typedef __attribute__((aligned(64))) struct qfv_matrix_buffer_s {
|
||||
typedef struct qfv_matrix_buffer_s {
|
||||
// projection and view matrices (model is push constant)
|
||||
mat4f_t Projection3d;
|
||||
mat4f_t View[6];
|
||||
mat4f_t Sky;
|
||||
mat4f_t Projection2d;
|
||||
vec2f_t ScreenSize;
|
||||
vec2f_t pad[7];
|
||||
} qfv_matrix_buffer_t;
|
||||
static_assert ((sizeof (qfv_matrix_buffer_t) & 63) == 0,
|
||||
"qfv_matrix_buffer_t size not a multiple of 64");
|
||||
|
||||
typedef struct matrixframe_s {
|
||||
VkBuffer buffer;
|
||||
|
|
Loading…
Reference in a new issue