Add constant buffers alignment for data structures (16-byte boundaries)

This commit is contained in:
Wojtek Figat
2024-05-23 13:58:46 +02:00
parent 91aa5a0fb9
commit 206ff89587
38 changed files with 54 additions and 49 deletions

View File

@@ -15,7 +15,7 @@ struct Item
uint32 Value;
};
PACK_STRUCT(struct Data {
PACK_STRUCT(struct alignas(GPU_SHADER_DATA_ALIGNMENT) Data {
Item NullItem;
uint32 CounterOffset;
uint32 MaxIterations;

View File

@@ -5,7 +5,7 @@
#include "Engine/Content/Content.h"
#include "Engine/Graphics/GPUContext.h"
PACK_STRUCT(struct Data {
PACK_STRUCT(struct alignas(GPU_SHADER_DATA_ALIGNMENT) Data {
Float2 TexelSize;
Float2 Padding;
});