From d4ad89c1eeb306b4e0d85d9c5d04656b47e4b5bf Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 25 Nov 2015 00:16:48 +0100 Subject: Fix OpenSubdiv geometry shader error on Linux / AMD. Differential Revision: https://developer.blender.org/D1638 --- source/blender/gpu/intern/gpu_codegen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/intern/gpu_codegen.c') diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index d479415556e..c7f77011197 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -829,10 +829,11 @@ static char *code_generate_geometry(ListBase *nodes, bool use_opensubdiv) for (input = node->inputs.first; input; input = input->next) { if (input->source == GPU_SOURCE_ATTRIB && input->attribfirst) { if (input->attribtype == CD_MTFACE) { - BLI_dynstr_appendf(ds, "%s %s var%d;\n", + BLI_dynstr_appendf(ds, "%s %s var%d%s;\n", GLEW_VERSION_3_0 ? "in" : "varying", GPU_DATATYPE_STR[input->type], - input->attribid); + input->attribid, + GLEW_VERSION_3_0 ? "[]" : ""); BLI_dynstr_appendf(ds, "uniform int fvar%d_offset;\n", input->attribid); } -- cgit v1.2.3