summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBryan Cain <[email protected]>2013-02-15 09:46:50 -0600
committerPaul Berry <[email protected]>2013-08-01 20:20:45 -0700
commit2548092ad80156a407281a124f833a6a93fbf2f3 (patch)
treee839a3d1c14eb45dbfe1362f5a8f4ce9afeb0c74 /src/mesa
parent844bd71736dd59808e1ea4319800db042a7c4267 (diff)
glsl: support compilation of geometry shaders
This commit adds all of the parsing and semantics for GLSL 150 style geometry shaders. v2 (Paul Berry <[email protected]>): Add a few missing calls to get_pipeline_stage(). Fix some signed/unsigned comparison warnings. Fix handling of NULL consumer in assign_varying_locations(). v3 (Bryan Cain <[email protected]>): fix indexing order of 2D arrays. Also, allow interpolation qualifiers in geometry shaders. v4 (Paul Berry <[email protected]>): Eliminate get_pipeline_stage()--it is no longer needed thanks to 030ca23 (mesa: renumber shader indices according to their placement in pipeline). Remove 2D stuff. Move vertices_per_prim() to ir.h, so that it will be accessible from outside the linker. Remove inject_num_vertices_visitor. Rework for GLSL 1.50. Reviewed-by: Ian Romanick <[email protected]> v5 (Paul Berry <[email protected]>): Split out do_set_program_inouts() argument refactoring to a separate patch. Move geom_array_resizing_visitor to later in the series. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 91c3abf683e..c78fe855f6c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1852,7 +1852,7 @@ struct gl_program
GLuint Id;
GLubyte *String; /**< Null-terminated program text */
GLint RefCount;
- GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB */
+ GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_GEOMETRY_PROGRAM_NV */
GLenum Format; /**< String encoding format */
struct prog_instruction *Instructions;
@@ -1919,6 +1919,7 @@ struct gl_geometry_program
{
struct gl_program Base; /**< base class */
+ GLint VerticesIn;
GLint VerticesOut;
GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
@@ -2321,6 +2322,7 @@ struct gl_shader_program
/** Geometry shader state - copied into gl_geometry_program at link time */
struct {
+ GLint VerticesIn;
GLint VerticesOut;
GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */