summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 11:59:12 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit92f77e9c01085c6babe6ce80dfe4e0e7abab61a1 (patch)
treeecea28bd6506ea75c1e980ea688f684a97822226 /src/mesa/main
parent9045ddcfe4ed2ecc6220db69dc33d6049956b99b (diff)
i965/mesa/st: eliminate gl_geometry_program
We now get all the gs metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/mtypes.h22
-rw-r--r--src/mesa/main/state.c10
3 files changed, 9 insertions, 25 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 5f00365cd0d..757dbfc6613 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1299,7 +1299,7 @@ _mesa_free_context_data( struct gl_context *ctx )
_mesa_reference_program(ctx, &ctx->TessCtrlProgram._Current, NULL);
_mesa_reference_program(ctx, &ctx->TessEvalProgram._Current, NULL);
- _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->GeometryProgram._Current, NULL);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c0984f122b4..65f73f4cc37 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1998,22 +1998,6 @@ struct gl_vertex_program
};
-/** Geometry program object */
-struct gl_geometry_program
-{
- struct gl_program Base; /**< base class */
-
- GLint VerticesIn;
- GLint VerticesOut;
- GLint Invocations;
- GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
- GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
- GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
- bool UsesEndPrimitive;
- bool UsesStreams;
-};
-
-
/** Fragment program object */
struct gl_fragment_program
{
@@ -2134,7 +2118,7 @@ struct gl_geometry_program_state
/** Currently enabled and valid program (including internal programs
* and compiled shader programs).
*/
- struct gl_geometry_program *_Current;
+ struct gl_program *_Current;
};
/**
@@ -2770,7 +2754,7 @@ struct gl_shader_program
} TessEval;
/**
- * Geometry shader state - copied into gl_geometry_program by
+ * Geometry shader state - copied into gl_program by
* _mesa_copy_linked_program_data().
*/
struct {
@@ -2778,7 +2762,7 @@ struct gl_shader_program
/**
* True if gl_ClipDistance is written to. Copied into
- * gl_geometry_program by _mesa_copy_linked_program_data().
+ * gl_program by _mesa_copy_linked_program_data().
*/
GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or
0 if not present. */
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 10194a9f5ca..407ff385482 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -109,7 +109,7 @@ update_program(struct gl_context *ctx)
ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
- const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
+ const struct gl_program *prevGP = ctx->GeometryProgram._Current;
const struct gl_program *prevTCP = ctx->TessCtrlProgram._Current;
const struct gl_program *prevTEP = ctx->TessEvalProgram._Current;
const struct gl_compute_program *prevCP = ctx->ComputeProgram._Current;
@@ -186,11 +186,11 @@ update_program(struct gl_context *ctx)
if (gsProg && gsProg->LinkStatus
&& gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]) {
/* Use GLSL geometry shader */
- _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current,
- gl_geometry_program(gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program));
+ _mesa_reference_program(ctx, &ctx->GeometryProgram._Current,
+ gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program);
} else {
/* No geometry program */
- _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->GeometryProgram._Current, NULL);
}
if (tesProg && tesProg->LinkStatus
@@ -266,7 +266,7 @@ update_program(struct gl_context *ctx)
new_state |= _NEW_PROGRAM;
if (ctx->Driver.BindProgram) {
ctx->Driver.BindProgram(ctx, GL_GEOMETRY_PROGRAM_NV,
- (struct gl_program *) ctx->GeometryProgram._Current);
+ ctx->GeometryProgram._Current);
}
}