From c883946441ffefa7b931e73c4c9d67bcfd5d443b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 19 Jul 2016 12:27:49 +0200 Subject: OpenSubdiv: Fix broken structure alignment when using color material --- intern/opensubdiv/gpu_shader_opensubd_display.glsl | 1 + intern/opensubdiv/opensubdiv_gpu_capi.cc | 2 ++ 2 files changed, 3 insertions(+) (limited to 'intern') diff --git a/intern/opensubdiv/gpu_shader_opensubd_display.glsl b/intern/opensubdiv/gpu_shader_opensubd_display.glsl index a17dcef81c7..3a9392e994c 100644 --- a/intern/opensubdiv/gpu_shader_opensubd_display.glsl +++ b/intern/opensubdiv/gpu_shader_opensubd_display.glsl @@ -208,6 +208,7 @@ struct LightSource { float spotCutoff; float spotExponent; float spotCosCutoff; + float pad, pad2; #endif }; diff --git a/intern/opensubdiv/opensubdiv_gpu_capi.cc b/intern/opensubdiv/opensubdiv_gpu_capi.cc index 698fdfee00f..20b3cffd2c8 100644 --- a/intern/opensubdiv/opensubdiv_gpu_capi.cc +++ b/intern/opensubdiv/opensubdiv_gpu_capi.cc @@ -47,6 +47,7 @@ using OpenSubdiv::Osd::GLMeshInterface; extern "C" char datatoc_gpu_shader_opensubd_display_glsl[]; #define MAX_LIGHTS 8 + typedef struct Light { float position[4]; float ambient[4]; @@ -60,6 +61,7 @@ typedef struct Light { float spot_cutoff; float spot_exponent; float spot_cos_cutoff; + float pad, pad2; #endif } Light; -- cgit v1.2.3