[Mesa-dev] [PATCH 17/23] mesa/mtypes: add gl_subroutine_function and uniform storage to shader

Dave Airlie airlied at gmail.com
Thu Apr 23 18:42:53 PDT 2015


From: Dave Airlie <airlied at redhat.com>

This adds the necessary storage for subroutine info to gl_shader.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/mtypes.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4c63684..78a155f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2364,6 +2364,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.
@@ -2508,6 +2517,12 @@ struct gl_shader
        */
       unsigned LocalSize[3];
    } Comp;
+
+   GLuint NumSubroutineUniformTypes;
+   GLuint NumSubroutineUniforms;
+   struct gl_uniform_storage **SubroutineUniformRemapTable;
+   GLuint NumSubroutineFunctions;
+   struct gl_subroutine_function *SubroutineFunctions;
 };
 
 
-- 
2.1.0



More information about the mesa-dev mailing list