From 092962cf72e77abb3693f9f337b341bfc066d711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 29 May 2019 16:57:09 +0200 Subject: GPU: Enforce Uniform buffer alignment to 16bytes This seems to be a requirement and remove some errors in renderdoc. --- source/blender/makesdna/DNA_lightprobe_types.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/makesdna') 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 { -- cgit v1.2.3