Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-05-29 17:57:09 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-30 14:42:21 +0300
commit092962cf72e77abb3693f9f337b341bfc066d711 (patch)
tree2b15bb247d976583d62e12617c79a531e0cbc4aa /source/blender/gpu/intern/gpu_material.c
parent77f5210f22332b3594fabe08bee5809fc8333dba (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/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 007a13a06ef..f5051a1d767 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -262,8 +262,11 @@ typedef struct GPUSssKernelData {
float kernel[SSS_SAMPLES][4];
float param[3], max_radius;
int samples;
+ int pad[3];
} GPUSssKernelData;
+BLI_STATIC_ASSERT_ALIGN(GPUSssKernelData, 16)
+
static void sss_calculate_offsets(GPUSssKernelData *kd, int count, float exponent)
{
float step = 2.0f / (float)(count - 1);