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/makesdna/DNA_lightprobe_types.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/makesdna/DNA_lightprobe_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_lightprobe_types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index 92b343fbeb9..c5121481f88 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -25,6 +25,8 @@ #include "DNA_listBase.h" #include "DNA_ID.h" +#include "BLI_assert.h" + #ifdef __cplusplus extern "C" { #endif @@ -141,6 +143,10 @@ typedef struct LightGridCache { float visibility_bias, visibility_bleed, visibility_range, _pad5; } LightGridCache; +/* Theses are used as ubo data. They need to be aligned to size of vec4. */ +BLI_STATIC_ASSERT_ALIGN(LightProbeCache, 16) +BLI_STATIC_ASSERT_ALIGN(LightGridCache, 16) + /* ------ Eevee Lightcache ------- */ typedef struct LightCacheTexture { |