diff options
author | Eric Anholt <[email protected]> | 2012-10-09 15:16:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-10-15 11:53:23 -0700 |
commit | 422566e1c7bb4b14fdc133a963bd9787cd98f369 (patch) | |
tree | 4c4f4706557bf9ff38e5067243f0533172613a1c /src/mesa/main | |
parent | cff1b1df4b7046359b9bf1c4072a241e8ecf1947 (diff) |
mesa: Remove support for parsing NV vertex programs.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/arbprogram.c | 34 | ||||
-rw-r--r-- | src/mesa/main/getstring.c | 1 | ||||
-rw-r--r-- | src/mesa/main/nvprogram.c | 25 |
3 files changed, 5 insertions, 55 deletions
diff --git a/src/mesa/main/arbprogram.c b/src/mesa/main/arbprogram.c index ae91fd5a323..4af9fe4d317 100644 --- a/src/mesa/main/arbprogram.c +++ b/src/mesa/main/arbprogram.c @@ -38,7 +38,6 @@ #include "main/arbprogram.h" #include "program/arbprogparse.h" #include "program/nvfragparse.h" -#include "program/nvvertparse.h" #include "program/program.h" @@ -77,9 +76,7 @@ _mesa_BindProgram(GLenum target, GLuint id) ASSERT_OUTSIDE_BEGIN_END(ctx); /* Error-check target and get curProg */ - if ((target == GL_VERTEX_PROGRAM_ARB) && /* == GL_VERTEX_PROGRAM_NV */ - (ctx->Extensions.NV_vertex_program || - ctx->Extensions.ARB_vertex_program)) { + if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) { curProg = &ctx->VertexProgram.Current->Base; } else if ((target == GL_FRAGMENT_PROGRAM_NV @@ -321,8 +318,7 @@ get_env_param_pointer(struct gl_context *ctx, const char *func, return GL_TRUE; } else if (target == GL_VERTEX_PROGRAM_ARB && - (ctx->Extensions.ARB_vertex_program || - ctx->Extensions.NV_vertex_program)) { + ctx->Extensions.ARB_vertex_program) { if (index >= ctx->Const.VertexProgram.MaxEnvParams) { _mesa_error(ctx, GL_INVALID_VALUE, "%s(index)", func); return GL_FALSE; @@ -356,28 +352,12 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, return; } - /* The first couple cases are complicated. The same enum value is used for - * ARB and NV vertex programs. If the target is a vertex program, parse it - * using the ARB grammar if the string starts with "!!ARB" or if - * NV_vertex_program is not supported. - */ - if (target == GL_VERTEX_PROGRAM_ARB - && ctx->Extensions.ARB_vertex_program - && ((strncmp(string, "!!ARB", 5) == 0) - || !ctx->Extensions.NV_vertex_program)) { + if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) { struct gl_vertex_program *prog = ctx->VertexProgram.Current; _mesa_parse_arb_vertex_program(ctx, target, string, len, prog); base = & prog->Base; } - else if ((target == GL_VERTEX_PROGRAM_ARB - || target == GL_VERTEX_STATE_PROGRAM_NV) - && ctx->Extensions.NV_vertex_program) { - struct gl_vertex_program *prog = ctx->VertexProgram.Current; - _mesa_parse_nv_vertex_program(ctx, target, string, len, prog); - - base = & prog->Base; - } else if (target == GL_FRAGMENT_PROGRAM_ARB && ctx->Extensions.ARB_fragment_program) { struct gl_fragment_program *prog = ctx->FragmentProgram.Current; @@ -410,8 +390,6 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, /** * Set a program env parameter register. * \note Called from the GL API dispatcher. - * Note, this function is also used by the GL_NV_vertex_program extension - * (alias to ProgramParameterdNV) */ void GLAPIENTRY _mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index, @@ -425,8 +403,6 @@ _mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index, /** * Set a program env parameter register. * \note Called from the GL API dispatcher. - * Note, this function is also used by the GL_NV_vertex_program extension - * (alias to ProgramParameterdvNV) */ void GLAPIENTRY _mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index, @@ -441,8 +417,6 @@ _mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index, /** * Set a program env parameter register. * \note Called from the GL API dispatcher. - * Note, this function is also used by the GL_NV_vertex_program extension - * (alias to ProgramParameterfNV) */ void GLAPIENTRY _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index, @@ -466,8 +440,6 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index, /** * Set a program env parameter register. * \note Called from the GL API dispatcher. - * Note, this function is also used by the GL_NV_vertex_program extension - * (alias to ProgramParameterfvNV) */ void GLAPIENTRY _mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index, diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 54e518d2b49..57c7b339b50 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -139,7 +139,6 @@ _mesa_GetString( GLenum name ) if (ctx->API == API_OPENGL && (ctx->Extensions.NV_fragment_program || ctx->Extensions.ARB_fragment_program || - ctx->Extensions.NV_vertex_program || ctx->Extensions.ARB_vertex_program)) { return (const GLubyte *) ctx->Program.ErrorString; } diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c index fc5749afc8a..b91c712e08f 100644 --- a/src/mesa/main/nvprogram.c +++ b/src/mesa/main/nvprogram.c @@ -29,7 +29,7 @@ */ /* - * Regarding GL_NV_fragment/vertex_program, GL_NV_vertex_program1_1, etc: + * Regarding GL_NV_fragment_program: * * Portions of this software may use or implement intellectual * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims @@ -46,7 +46,6 @@ #include "main/nvprogram.h" #include "program/arbprogparse.h" #include "program/nvfragparse.h" -#include "program/nvvertparse.h" #include "program/program.h" #include "program/prog_instruction.h" #include "program/prog_parameter.h" @@ -624,27 +623,7 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, return; } - if ((target == GL_VERTEX_PROGRAM_NV || - target == GL_VERTEX_STATE_PROGRAM_NV) - && ctx->Extensions.NV_vertex_program) { - struct gl_vertex_program *vprog = gl_vertex_program(prog); - if (!vprog || prog == &_mesa_DummyProgram) { - vprog = gl_vertex_program(ctx->Driver.NewProgram(ctx, target, id)); - if (!vprog) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); - return; - } - _mesa_HashInsert(ctx->Shared->Programs, id, vprog); - } - - if (ctx->Extensions.ARB_vertex_program - && (strncmp((char *) program, "!!ARB", 5) == 0)) { - _mesa_parse_arb_vertex_program(ctx, target, program, len, vprog); - } else { - _mesa_parse_nv_vertex_program(ctx, target, program, len, vprog); - } - } - else if (target == GL_FRAGMENT_PROGRAM_NV + if (target == GL_FRAGMENT_PROGRAM_NV && ctx->Extensions.NV_fragment_program) { struct gl_fragment_program *fprog = gl_fragment_program(prog); if (!fprog || prog == &_mesa_DummyProgram) { |