mesa: use GL_GEOMETRY_PROGRAM_NV instead of MESA_GEOMETRY_PROGRAM
There's no reason to use our own definition. Tessellation will use the NV definitions too. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -88,7 +88,7 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MESA_GEOMETRY_PROGRAM: {
|
case GL_GEOMETRY_PROGRAM_NV: {
|
||||||
struct brw_geometry_program *prog = CALLOC_STRUCT(brw_geometry_program);
|
struct brw_geometry_program *prog = CALLOC_STRUCT(brw_geometry_program);
|
||||||
if (prog) {
|
if (prog) {
|
||||||
prog->id = get_new_program_id(brw->intelScreen);
|
prog->id = get_new_program_id(brw->intelScreen);
|
||||||
|
@@ -135,12 +135,6 @@ typedef void *GLeglImageOES;
|
|||||||
#define GL_SHADER_PROGRAM_MESA 0x9999
|
#define GL_SHADER_PROGRAM_MESA 0x9999
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Internal token for geometry programs.
|
|
||||||
* Use the value for GL_GEOMETRY_PROGRAM_NV for now.
|
|
||||||
*/
|
|
||||||
#define MESA_GEOMETRY_PROGRAM 0x8c26
|
|
||||||
|
|
||||||
/* Several fields of struct gl_config can take these as values. Since
|
/* Several fields of struct gl_config can take these as values. Since
|
||||||
* GLX header files may not be available everywhere they need to be used,
|
* GLX header files may not be available everywhere they need to be used,
|
||||||
* redefine them here.
|
* redefine them here.
|
||||||
|
@@ -225,7 +225,7 @@ update_program(struct gl_context *ctx)
|
|||||||
if (ctx->GeometryProgram._Current != prevGP) {
|
if (ctx->GeometryProgram._Current != prevGP) {
|
||||||
new_state |= _NEW_PROGRAM;
|
new_state |= _NEW_PROGRAM;
|
||||||
if (ctx->Driver.BindProgram) {
|
if (ctx->Driver.BindProgram) {
|
||||||
ctx->Driver.BindProgram(ctx, MESA_GEOMETRY_PROGRAM,
|
ctx->Driver.BindProgram(ctx, GL_GEOMETRY_PROGRAM_NV,
|
||||||
(struct gl_program *) ctx->GeometryProgram._Current);
|
(struct gl_program *) ctx->GeometryProgram._Current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -864,7 +864,7 @@ _mesa_fprint_program_opt(FILE *f,
|
|||||||
else
|
else
|
||||||
fprintf(f, "# Fragment Program/Shader %u\n", prog->Id);
|
fprintf(f, "# Fragment Program/Shader %u\n", prog->Id);
|
||||||
break;
|
break;
|
||||||
case MESA_GEOMETRY_PROGRAM:
|
case GL_GEOMETRY_PROGRAM_NV:
|
||||||
fprintf(f, "# Geometry Shader\n");
|
fprintf(f, "# Geometry Shader\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -328,7 +328,7 @@ _mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id)
|
|||||||
CALLOC_STRUCT(gl_fragment_program),
|
CALLOC_STRUCT(gl_fragment_program),
|
||||||
target, id );
|
target, id );
|
||||||
break;
|
break;
|
||||||
case MESA_GEOMETRY_PROGRAM:
|
case GL_GEOMETRY_PROGRAM_NV:
|
||||||
prog = _mesa_init_geometry_program(ctx,
|
prog = _mesa_init_geometry_program(ctx,
|
||||||
CALLOC_STRUCT(gl_geometry_program),
|
CALLOC_STRUCT(gl_geometry_program),
|
||||||
target, id);
|
target, id);
|
||||||
@@ -414,8 +414,8 @@ _mesa_reference_program_(struct gl_context *ctx,
|
|||||||
else if ((*ptr)->Target == GL_FRAGMENT_PROGRAM_ARB)
|
else if ((*ptr)->Target == GL_FRAGMENT_PROGRAM_ARB)
|
||||||
assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB ||
|
assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB ||
|
||||||
prog->Target == GL_FRAGMENT_PROGRAM_NV);
|
prog->Target == GL_FRAGMENT_PROGRAM_NV);
|
||||||
else if ((*ptr)->Target == MESA_GEOMETRY_PROGRAM)
|
else if ((*ptr)->Target == GL_GEOMETRY_PROGRAM_NV)
|
||||||
assert(prog->Target == MESA_GEOMETRY_PROGRAM);
|
assert(prog->Target == GL_GEOMETRY_PROGRAM_NV);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -427,7 +427,7 @@ _mesa_reference_program_(struct gl_context *ctx,
|
|||||||
printf("Program %p ID=%u Target=%s Refcount-- to %d\n",
|
printf("Program %p ID=%u Target=%s Refcount-- to %d\n",
|
||||||
*ptr, (*ptr)->Id,
|
*ptr, (*ptr)->Id,
|
||||||
((*ptr)->Target == GL_VERTEX_PROGRAM_ARB ? "VP" :
|
((*ptr)->Target == GL_VERTEX_PROGRAM_ARB ? "VP" :
|
||||||
((*ptr)->Target == MESA_GEOMETRY_PROGRAM ? "GP" : "FP")),
|
((*ptr)->Target == GL_GEOMETRY_PROGRAM_NV ? "GP" : "FP")),
|
||||||
(*ptr)->RefCount - 1);
|
(*ptr)->RefCount - 1);
|
||||||
#endif
|
#endif
|
||||||
assert((*ptr)->RefCount > 0);
|
assert((*ptr)->RefCount > 0);
|
||||||
@@ -452,7 +452,7 @@ _mesa_reference_program_(struct gl_context *ctx,
|
|||||||
printf("Program %p ID=%u Target=%s Refcount++ to %d\n",
|
printf("Program %p ID=%u Target=%s Refcount++ to %d\n",
|
||||||
prog, prog->Id,
|
prog, prog->Id,
|
||||||
(prog->Target == GL_VERTEX_PROGRAM_ARB ? "VP" :
|
(prog->Target == GL_VERTEX_PROGRAM_ARB ? "VP" :
|
||||||
(prog->Target == MESA_GEOMETRY_PROGRAM ? "GP" : "FP")),
|
(prog->Target == GL_GEOMETRY_PROGRAM_NV ? "GP" : "FP")),
|
||||||
prog->RefCount);
|
prog->RefCount);
|
||||||
#endif
|
#endif
|
||||||
/*mtx_unlock(&prog->Mutex);*/
|
/*mtx_unlock(&prog->Mutex);*/
|
||||||
@@ -542,7 +542,7 @@ _mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog)
|
|||||||
fpc->PixelCenterInteger = fp->PixelCenterInteger;
|
fpc->PixelCenterInteger = fp->PixelCenterInteger;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MESA_GEOMETRY_PROGRAM:
|
case GL_GEOMETRY_PROGRAM_NV:
|
||||||
{
|
{
|
||||||
const struct gl_geometry_program *gp = gl_geometry_program_const(prog);
|
const struct gl_geometry_program *gp = gl_geometry_program_const(prog);
|
||||||
struct gl_geometry_program *gpc = gl_geometry_program(clone);
|
struct gl_geometry_program *gpc = gl_geometry_program(clone);
|
||||||
|
@@ -189,7 +189,7 @@ update_gp( struct st_context *st )
|
|||||||
}
|
}
|
||||||
|
|
||||||
stgp = st_geometry_program(st->ctx->GeometryProgram._Current);
|
stgp = st_geometry_program(st->ctx->GeometryProgram._Current);
|
||||||
assert(stgp->Base.Base.Target == MESA_GEOMETRY_PROGRAM);
|
assert(stgp->Base.Base.Target == GL_GEOMETRY_PROGRAM_NV);
|
||||||
|
|
||||||
memset(&key, 0, sizeof(key));
|
memset(&key, 0, sizeof(key));
|
||||||
key.st = st;
|
key.st = st;
|
||||||
|
@@ -65,7 +65,7 @@ st_bind_program(struct gl_context *ctx, GLenum target, struct gl_program *prog)
|
|||||||
case GL_FRAGMENT_PROGRAM_ARB:
|
case GL_FRAGMENT_PROGRAM_ARB:
|
||||||
st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
|
st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
|
||||||
break;
|
break;
|
||||||
case MESA_GEOMETRY_PROGRAM:
|
case GL_GEOMETRY_PROGRAM_NV:
|
||||||
st->dirty.st |= ST_NEW_GEOMETRY_PROGRAM;
|
st->dirty.st |= ST_NEW_GEOMETRY_PROGRAM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ st_new_program(struct gl_context *ctx, GLenum target, GLuint id)
|
|||||||
return _mesa_init_fragment_program(ctx, &prog->Base, target, id);
|
return _mesa_init_fragment_program(ctx, &prog->Base, target, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
case MESA_GEOMETRY_PROGRAM: {
|
case GL_GEOMETRY_PROGRAM_NV: {
|
||||||
struct st_geometry_program *prog = ST_CALLOC_STRUCT(st_geometry_program);
|
struct st_geometry_program *prog = ST_CALLOC_STRUCT(st_geometry_program);
|
||||||
return _mesa_init_geometry_program(ctx, &prog->Base, target, id);
|
return _mesa_init_geometry_program(ctx, &prog->Base, target, id);
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
|
|||||||
free_glsl_to_tgsi_visitor(stvp->glsl_to_tgsi);
|
free_glsl_to_tgsi_visitor(stvp->glsl_to_tgsi);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MESA_GEOMETRY_PROGRAM:
|
case GL_GEOMETRY_PROGRAM_NV:
|
||||||
{
|
{
|
||||||
struct st_geometry_program *stgp =
|
struct st_geometry_program *stgp =
|
||||||
(struct st_geometry_program *) prog;
|
(struct st_geometry_program *) prog;
|
||||||
@@ -198,7 +198,7 @@ st_program_string_notify( struct gl_context *ctx,
|
|||||||
if (st->fp == stfp)
|
if (st->fp == stfp)
|
||||||
st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
|
st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
|
||||||
}
|
}
|
||||||
else if (target == MESA_GEOMETRY_PROGRAM) {
|
else if (target == GL_GEOMETRY_PROGRAM_NV) {
|
||||||
struct st_geometry_program *stgp = (struct st_geometry_program *) prog;
|
struct st_geometry_program *stgp = (struct st_geometry_program *) prog;
|
||||||
|
|
||||||
st_release_gp_variants(st, stgp);
|
st_release_gp_variants(st, stgp);
|
||||||
|
@@ -1217,7 +1217,7 @@ destroy_program_variants(struct st_context *st, struct gl_program *program)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MESA_GEOMETRY_PROGRAM:
|
case GL_GEOMETRY_PROGRAM_NV:
|
||||||
{
|
{
|
||||||
struct st_geometry_program *stgp =
|
struct st_geometry_program *stgp =
|
||||||
(struct st_geometry_program *) program;
|
(struct st_geometry_program *) program;
|
||||||
|
Reference in New Issue
Block a user