summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-07-21 14:59:01 +1000
committerDave Airlie <[email protected]>2015-07-23 17:25:39 +1000
commit44ea8b9b8edc5f59da546683fe64129a1c1be449 (patch)
treee1b95f727dc580f04077be6d50a0273bb29a1b22 /src
parent7dd429e8f74302d44af00d051e59911439152369 (diff)
mesa/mtypes: add gl_subroutine_function and uniform storage to shader (v2)
This adds the necessary storage for subroutine info to gl_shader. v2: add comments, rename one member Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/mtypes.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c5673e268db..a252bf46606 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2414,6 +2414,15 @@ struct gl_ati_fragment_shader_state
struct ati_fragment_shader *Current;
};
+/**
+ * Shader subroutine function definition
+ */
+struct gl_subroutine_function
+{
+ char *name;
+ int num_compat_types;
+ const struct glsl_type **types;
+};
/**
* A GLSL vertex or fragment shader object.
@@ -2600,6 +2609,25 @@ struct gl_shader
*/
unsigned LocalSize[3];
} Comp;
+
+ /**
+ * Number of types for subroutine uniforms.
+ */
+ GLuint NumSubroutineUniformTypes;
+
+ /**
+ * Subroutine uniform remap table
+ * based on the program level uniform remap table.
+ */
+ GLuint NumSubroutineUniformRemapTable;
+ struct gl_uniform_storage **SubroutineUniformRemapTable;
+
+ /**
+ * Num of subroutine functions for this stage
+ * and storage for them.
+ */
+ GLuint NumSubroutineFunctions;
+ struct gl_subroutine_function *SubroutineFunctions;
};