mesa: Remove support for GL_VERTEX_STATE_PROGRAMs and their execution.
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -476,7 +476,6 @@ _mesa_create_exec_table(struct gl_context *ctx)
|
|||||||
if (ctx->API == API_OPENGL) {
|
if (ctx->API == API_OPENGL) {
|
||||||
SET_BindProgramNV(exec, _mesa_BindProgram);
|
SET_BindProgramNV(exec, _mesa_BindProgram);
|
||||||
SET_DeleteProgramsNV(exec, _mesa_DeletePrograms);
|
SET_DeleteProgramsNV(exec, _mesa_DeletePrograms);
|
||||||
SET_ExecuteProgramNV(exec, _mesa_ExecuteProgramNV);
|
|
||||||
SET_GenProgramsNV(exec, _mesa_GenPrograms);
|
SET_GenProgramsNV(exec, _mesa_GenPrograms);
|
||||||
SET_AreProgramsResidentNV(exec, _mesa_AreProgramsResidentNV);
|
SET_AreProgramsResidentNV(exec, _mesa_AreProgramsResidentNV);
|
||||||
SET_RequestResidentProgramsNV(exec, _mesa_RequestResidentProgramsNV);
|
SET_RequestResidentProgramsNV(exec, _mesa_RequestResidentProgramsNV);
|
||||||
|
@@ -179,7 +179,6 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids)
|
|||||||
/* Unbind program if necessary */
|
/* Unbind program if necessary */
|
||||||
switch (prog->Target) {
|
switch (prog->Target) {
|
||||||
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
|
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
|
||||||
case GL_VERTEX_STATE_PROGRAM_NV:
|
|
||||||
if (ctx->VertexProgram.Current &&
|
if (ctx->VertexProgram.Current &&
|
||||||
ctx->VertexProgram.Current->Base.Id == ids[i]) {
|
ctx->VertexProgram.Current->Base.Id == ids[i]) {
|
||||||
/* unbind this currently bound program */
|
/* unbind this currently bound program */
|
||||||
|
@@ -321,7 +321,6 @@ typedef enum
|
|||||||
OPCODE_WINDOW_POS_ARB,
|
OPCODE_WINDOW_POS_ARB,
|
||||||
/* GL_NV_vertex_program */
|
/* GL_NV_vertex_program */
|
||||||
OPCODE_BIND_PROGRAM_NV,
|
OPCODE_BIND_PROGRAM_NV,
|
||||||
OPCODE_EXECUTE_PROGRAM_NV,
|
|
||||||
OPCODE_REQUEST_RESIDENT_PROGRAMS_NV,
|
OPCODE_REQUEST_RESIDENT_PROGRAMS_NV,
|
||||||
OPCODE_LOAD_PROGRAM_NV,
|
OPCODE_LOAD_PROGRAM_NV,
|
||||||
/* GL_NV_fragment_program */
|
/* GL_NV_fragment_program */
|
||||||
@@ -4941,27 +4940,6 @@ save_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void GLAPIENTRY
|
|
||||||
save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
|
|
||||||
{
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
Node *n;
|
|
||||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
|
||||||
n = alloc_instruction(ctx, OPCODE_EXECUTE_PROGRAM_NV, 6);
|
|
||||||
if (n) {
|
|
||||||
n[1].e = target;
|
|
||||||
n[2].ui = id;
|
|
||||||
n[3].f = params[0];
|
|
||||||
n[4].f = params[1];
|
|
||||||
n[5].f = params[2];
|
|
||||||
n[6].f = params[3];
|
|
||||||
}
|
|
||||||
if (ctx->ExecuteFlag) {
|
|
||||||
CALL_ExecuteProgramNV(ctx->Exec, (target, id, params));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void GLAPIENTRY
|
static void GLAPIENTRY
|
||||||
save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
|
save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
|
||||||
const GLubyte * program)
|
const GLubyte * program)
|
||||||
@@ -8332,16 +8310,6 @@ execute_list(struct gl_context *ctx, GLuint list)
|
|||||||
case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */
|
case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */
|
||||||
CALL_BindProgramNV(ctx->Exec, (n[1].e, n[2].ui));
|
CALL_BindProgramNV(ctx->Exec, (n[1].e, n[2].ui));
|
||||||
break;
|
break;
|
||||||
case OPCODE_EXECUTE_PROGRAM_NV:
|
|
||||||
{
|
|
||||||
GLfloat v[4];
|
|
||||||
v[0] = n[3].f;
|
|
||||||
v[1] = n[4].f;
|
|
||||||
v[2] = n[5].f;
|
|
||||||
v[3] = n[6].f;
|
|
||||||
CALL_ExecuteProgramNV(ctx->Exec, (n[1].e, n[2].ui, v));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
|
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
|
||||||
CALL_RequestResidentProgramsNV(ctx->Exec, (n[1].ui,
|
CALL_RequestResidentProgramsNV(ctx->Exec, (n[1].ui,
|
||||||
(GLuint *) n[2].data));
|
(GLuint *) n[2].data));
|
||||||
@@ -10191,7 +10159,6 @@ _mesa_create_save_table(const struct gl_context *ctx)
|
|||||||
*/
|
*/
|
||||||
SET_BindProgramNV(table, save_BindProgramNV);
|
SET_BindProgramNV(table, save_BindProgramNV);
|
||||||
SET_DeleteProgramsNV(table, _mesa_DeletePrograms);
|
SET_DeleteProgramsNV(table, _mesa_DeletePrograms);
|
||||||
SET_ExecuteProgramNV(table, save_ExecuteProgramNV);
|
|
||||||
SET_GenProgramsNV(table, _mesa_GenPrograms);
|
SET_GenProgramsNV(table, _mesa_GenPrograms);
|
||||||
SET_AreProgramsResidentNV(table, _mesa_AreProgramsResidentNV);
|
SET_AreProgramsResidentNV(table, _mesa_AreProgramsResidentNV);
|
||||||
SET_RequestResidentProgramsNV(table, save_RequestResidentProgramsNV);
|
SET_RequestResidentProgramsNV(table, save_RequestResidentProgramsNV);
|
||||||
|
@@ -51,36 +51,6 @@
|
|||||||
#include "program/prog_parameter.h"
|
#include "program/prog_parameter.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute a vertex state program.
|
|
||||||
* \note Called from the GL API dispatcher.
|
|
||||||
*/
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
|
|
||||||
{
|
|
||||||
struct gl_vertex_program *vprog;
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
|
||||||
|
|
||||||
if (target != GL_VERTEX_STATE_PROGRAM_NV) {
|
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM, "glExecuteProgramNV");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
|
|
||||||
|
|
||||||
vprog = gl_vertex_program(_mesa_lookup_program(ctx, id));
|
|
||||||
|
|
||||||
if (!vprog || vprog->Base.Target != GL_VERTEX_STATE_PROGRAM_NV) {
|
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glExecuteProgramNV");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_mesa_problem(ctx, "glExecuteProgramNV() not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a set of programs is resident in hardware.
|
* Determine if a set of programs is resident in hardware.
|
||||||
* \note Not compiled into display lists.
|
* \note Not compiled into display lists.
|
||||||
|
@@ -34,9 +34,6 @@
|
|||||||
struct gl_context;
|
struct gl_context;
|
||||||
struct gl_program;
|
struct gl_program;
|
||||||
|
|
||||||
extern void GLAPIENTRY
|
|
||||||
_mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params);
|
|
||||||
|
|
||||||
extern GLboolean GLAPIENTRY
|
extern GLboolean GLAPIENTRY
|
||||||
_mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences);
|
_mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences);
|
||||||
|
|
||||||
|
@@ -311,7 +311,6 @@ _mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id)
|
|||||||
struct gl_program *prog;
|
struct gl_program *prog;
|
||||||
switch (target) {
|
switch (target) {
|
||||||
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
|
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
|
||||||
case GL_VERTEX_STATE_PROGRAM_NV:
|
|
||||||
prog = _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),
|
prog = _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),
|
||||||
target, id );
|
target, id );
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user