[Bf-blender-cvs] [e922903] master: Use MAX_CUSTOMDATA_LAYER_NAME for size of GPUInput.attribname array

Nicholas Bishop noreply at git.blender.org
Thu Feb 5 11:23:31 CET 2015


Commit: e922903ae84e6d64e7664b9cb6b3eb8be341f24d
Author: Nicholas Bishop
Date:   Thu Feb 5 11:20:24 2015 +0100
Branches: master
https://developer.blender.org/rBe922903ae84e6d64e7664b9cb6b3eb8be341f24d

Use MAX_CUSTOMDATA_LAYER_NAME for size of GPUInput.attribname array

Before this was hardcoded to 32, which I think was incorrect because
this is used to store a customdata layer name.

Reviewers: psy-fi, campbellbarton, sergey

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1040

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

M	source/blender/gpu/intern/gpu_codegen.h

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

diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index c76341a..a6da5e0 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -149,7 +149,7 @@ typedef struct GPUInput {
 	GPUNodeLink *link;
 	bool dynamictex;		/* dynamic? */
 	CustomDataType attribtype;	/* attribute type */
-	char attribname[32];	/* attribute name */
+	char attribname[MAX_CUSTOMDATA_LAYER_NAME];	/* attribute name */
 	int attribfirst;		/* this is the first one that is bound */
 	GPUBuiltin builtin;		/* builtin uniform */
 	GPUOpenGLBuiltin oglbuiltin; /* opengl built in varying */




More information about the Bf-blender-cvs mailing list