diff options
author | Eric Anholt <[email protected]> | 2013-06-12 17:21:44 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-08-01 20:23:43 -0700 |
commit | 010a6a8fd343537101e7ac5e8dfcf9b07fc841fb (patch) | |
tree | fe1aeaecbac4ad1c965e24a3ed43be652b6433cb /src/mesa | |
parent | 624b7bac76c3f70a3a110d114a3c1c327d3dad5f (diff) |
glsl: Export the compiler's GS layout qualifiers to the gl_shader.
Next step is to validate them at link time.
v2 (Paul Berry <[email protected]>): Don't attempt to export the
layout qualifiers in the event of a compile error, since some of them
are set up by ast_to_hir(), and ast_to_hir() isn't guaranteed to have
run in the event of a compile error.
Reviewed-by: Kenneth Graunke <[email protected]>
v3 (Paul Berry <[email protected]>): Use PRIM_UNKNOWN to
represent "not set in this shader".
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 83de3dda893..49b31adc87a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2171,6 +2171,24 @@ struct gl_shader /** Shaders containing built-in functions that are used for linking. */ struct gl_shader *builtins_to_link[16]; unsigned num_builtins_to_link; + + /** + * Geometry shader state from GLSL 1.50 layout qualifiers. + */ + struct { + GLint VerticesOut; + /** + * GL_POINTS, GL_LINES, GL_LINES_ADJACENCY, GL_TRIANGLES, or + * GL_TRIANGLES_ADJACENCY, or PRIM_UNKNOWN if it's not set in this + * shader. + */ + GLenum InputType; + /** + * GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP, or PRIM_UNKNOWN if + * it's not set in this shader. + */ + GLenum OutputType; + } Geom; }; |