diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-10-02 15:16:59 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-10-02 15:16:59 +0000 |
commit | 9ca83924848070d02a5ac2f0aa4e20444eec2183 (patch) | |
tree | c1379d31e2aab19bc05270a833fdd25783627641 /src/mesa/shader/nvprogram.c | |
parent | 07dead7a51f1c35f3b6185ffba2afc09e24f6cdb (diff) |
fix LoadProgramNV regression when I had fixed the RefCount bug
Diffstat (limited to 'src/mesa/shader/nvprogram.c')
-rw-r--r-- | src/mesa/shader/nvprogram.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index 070451452a..4db78a8cc7 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -160,12 +160,12 @@ _mesa_RequestResidentProgramsNV(GLsizei n, const GLuint *ids) } prog = (struct program *) _mesa_HashLookup(ctx->Shared->Programs, ids[i]); - if (!prog) { _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(id)"); return; } + /* XXX this is really a hardware thing we should hook out */ prog->Resident = GL_TRUE; } } @@ -529,7 +529,7 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, target == GL_VERTEX_STATE_PROGRAM_NV) && ctx->Extensions.NV_vertex_program) { struct vertex_program *vprog = (struct vertex_program *) prog; - if (!vprog) { + if (!vprog || prog == &_mesa_DummyProgram) { vprog = (struct vertex_program *) ctx->Driver.NewProgram(ctx, target, id); if (!vprog) { @@ -543,7 +543,7 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, else if (target == GL_FRAGMENT_PROGRAM_NV && ctx->Extensions.NV_fragment_program) { struct fragment_program *fprog = (struct fragment_program *) prog; - if (!fprog) { + if (!fprog || prog == &_mesa_DummyProgram) { fprog = (struct fragment_program *) ctx->Driver.NewProgram(ctx, target, id); if (!fprog) { @@ -776,7 +776,7 @@ _mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name, } if (len <= 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV"); + _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(len)"); return; } @@ -790,7 +790,7 @@ _mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name, return; } - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV"); + _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(name)"); } |