From 3322fbaf3b5e305ce00c1d08c26965bb98e0cef0 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 14 Oct 2010 13:28:42 -0700 Subject: glsl: Slightly change the semantic of _LinkedShaders Previously _LinkedShaders was a compact array of the linked shaders for each shader stage. Now it is arranged such that each slot, indexed by the MESA_SHADER_* defines, refers to a specific shader stage. As a result, some slots will be NULL. This makes things a little more complex in the linker, but it simplifies things in other places. As a side effect _NumLinkedShaders is removed. NOTE: This may be a candidate for the 7.9 branch. If there are other patches that get backported to 7.9 that use _LinkedShader, this patch should be cherry picked also. --- src/mesa/main/mtypes.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/mtypes.h') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6702032679..13aa66fc1e 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2117,11 +2117,12 @@ struct gl_shader_program /** * Per-stage shaders resulting from the first stage of linking. + * + * Set of linked shaders for this program. The array is accessed using the + * \c MESA_SHADER_* defines. Entries for non-existent stages will be + * \c NULL. */ - /*@{*/ - GLuint _NumLinkedShaders; - struct gl_shader *_LinkedShaders[2]; - /*@}*/ + struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES]; }; -- cgit v1.2.3