diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-29 17:57:09 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-30 14:42:21 +0300 |
commit | 092962cf72e77abb3693f9f337b341bfc066d711 (patch) | |
tree | 2b15bb247d976583d62e12617c79a531e0cbc4aa /source/blender/draw/engines/eevee/eevee_private.h | |
parent | 77f5210f22332b3594fabe08bee5809fc8333dba (diff) |
GPU: Enforce Uniform buffer alignment to 16bytes
This seems to be a requirement and remove some errors in
renderdoc.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index 2e652dff232..6b82c7aa915 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -401,8 +401,15 @@ typedef struct EEVEE_ShadowRender { int shadow_samples_len; float shadow_samples_len_inv; float exponent; + float pad2; } EEVEE_ShadowRender; +BLI_STATIC_ASSERT_ALIGN(EEVEE_Light, 16) +BLI_STATIC_ASSERT_ALIGN(EEVEE_Shadow, 16) +BLI_STATIC_ASSERT_ALIGN(EEVEE_ShadowCube, 16) +BLI_STATIC_ASSERT_ALIGN(EEVEE_ShadowCascade, 16) +BLI_STATIC_ASSERT_ALIGN(EEVEE_ShadowRender, 16) + /* This is just a really long bitflag with special function to access it. */ #define MAX_LIGHTBITS_FIELDS (MAX_LIGHT / 8) typedef struct EEVEE_LightBits { @@ -685,8 +692,12 @@ typedef struct EEVEE_CommonUniformBuffer { int hiz_mip_offset; /* int */ int ray_type; /* int */ float ray_depth; /* float */ + + float pad_common_ubo; } EEVEE_CommonUniformBuffer; +BLI_STATIC_ASSERT_ALIGN(EEVEE_CommonUniformBuffer, 16) + /* ray_type (keep in sync with rayType) */ #define EEVEE_RAY_CAMERA 0 #define EEVEE_RAY_SHADOW 1 |