summaryrefslogtreecommitdiff
path: root/src/mesa/program/program.c
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2016-10-19 12:30:09 +1100
committerTimothy Arceri <timothy.arceri@collabora.com>2016-10-26 14:29:36 +1100
commit81faead818a0b2fde131df019f5dfb0baef49273 (patch)
tree66610c70a8ed5a963ce927729e8a56115142783d /src/mesa/program/program.c
parent0ab51f8e164b33c5e3bc6836d0574080ef9d1dd8 (diff)
mesa/i965/i915/r200: eliminate gl_vertex_program
Here we move the only field in gl_vertex_program to the ARB program fields in gl_program. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/mesa/program/program.c')
-rw-r--r--src/mesa/program/program.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 28af5b5f21b..a72e6a11dbd 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -87,8 +87,8 @@ _mesa_init_program(struct gl_context *ctx)
ctx->VertexProgram.PointSizeEnabled =
(ctx->API == API_OPENGLES2) ? GL_TRUE : GL_FALSE;
ctx->VertexProgram.TwoSideEnabled = GL_FALSE;
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
- ctx->Shared->DefaultVertexProgram);
+ _mesa_reference_program(ctx, &ctx->VertexProgram.Current,
+ ctx->Shared->DefaultVertexProgram);
assert(ctx->VertexProgram.Current);
ctx->VertexProgram.Cache = _mesa_new_program_cache();
@@ -112,7 +112,7 @@ _mesa_init_program(struct gl_context *ctx)
void
_mesa_free_program_data(struct gl_context *ctx)
{
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL);
+ _mesa_reference_program(ctx, &ctx->VertexProgram.Current, NULL);
_mesa_delete_program_cache(ctx, ctx->VertexProgram.Cache);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
_mesa_delete_shader_cache(ctx, ctx->FragmentProgram.Cache);
@@ -137,8 +137,8 @@ _mesa_free_program_data(struct gl_context *ctx)
void
_mesa_update_default_objects_program(struct gl_context *ctx)
{
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
- ctx->Shared->DefaultVertexProgram);
+ _mesa_reference_program(ctx, &ctx->VertexProgram.Current,
+ ctx->Shared->DefaultVertexProgram);
assert(ctx->VertexProgram.Current);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
@@ -215,14 +215,11 @@ struct gl_program *
_mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id)
{
switch (target) {
- case GL_VERTEX_PROGRAM_ARB: { /* == GL_VERTEX_PROGRAM_NV */
- struct gl_vertex_program *prog = CALLOC_STRUCT(gl_vertex_program);
- return _mesa_init_gl_program(&prog->Base, target, id);
- }
case GL_FRAGMENT_PROGRAM_ARB: {
struct gl_fragment_program *prog = CALLOC_STRUCT(gl_fragment_program);
return _mesa_init_gl_program(&prog->Base, target, id);
}
+ case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
case GL_GEOMETRY_PROGRAM_NV:
case GL_TESS_CONTROL_PROGRAM_NV:
case GL_TESS_EVALUATION_PROGRAM_NV: {