[Bf-blender-cvs] [a3f5722cc68] tmp-gpu-shader-descriptor-2: Check ubo struct sizes during compilation.

Jeroen Bakker noreply at git.blender.org
Wed Jan 12 13:42:07 CET 2022


Commit: a3f5722cc68d0e2b05d0fdb2377ca6516350f38b
Author: Jeroen Bakker
Date:   Wed Jan 12 11:38:01 2022 +0100
Branches: tmp-gpu-shader-descriptor-2
https://developer.blender.org/rBa3f5722cc68d0e2b05d0fdb2377ca6516350f38b

Check ubo struct sizes during compilation.

===================================================================

M	source/blender/gpu/GPU_shader_shared.h

===================================================================

diff --git a/source/blender/gpu/GPU_shader_shared.h b/source/blender/gpu/GPU_shader_shared.h
index 576f88ddcca..8b822507d1a 100644
--- a/source/blender/gpu/GPU_shader_shared.h
+++ b/source/blender/gpu/GPU_shader_shared.h
@@ -22,6 +22,7 @@ struct NodeLinkData {
   float expandSize;
   float arrowSize;
 };
+BLI_STATIC_ASSERT_ALIGN(struct NodeLinkData, 16)
 
 struct NodeLinkInstanceData {
   float4 colors[6];
@@ -29,6 +30,7 @@ struct NodeLinkInstanceData {
   float arrowSize;
   float2 _pad;
 };
+BLI_STATIC_ASSERT_ALIGN(struct NodeLinkInstanceData, 16)
 
 struct GPencilStrokeData {
   float2 viewport;
@@ -42,14 +44,17 @@ struct GPencilStrokeData {
   bool1 fill_stroke;
   float2 _pad;
 };
+BLI_STATIC_ASSERT_ALIGN(struct GPencilStrokeData, 16)
 
 struct GPUClipPlanes {
   float4x4 ModelMatrix;
   float4 world[6];
 };
+BLI_STATIC_ASSERT_ALIGN(struct GPUClipPlanes, 16)
 
 struct SimpleLightingData {
   float4 color;
   float3 light;
   float _pad;
-};
\ No newline at end of file
+};
+BLI_STATIC_ASSERT_ALIGN(struct SimpleLightingData, 16)



More information about the Bf-blender-cvs mailing list