From 93da673904d4c520d3fbd2210e53777bf1598ac6 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 1 Mar 2006 23:11:14 +0000 Subject: Fix glGet with enums which are used not only in NV_vertex_program, but other extensions too (ARB_vertex_program, ARB_fragment_program, NV_fragment_program), if no support for NV_vertex_program is present. While here, fix return value if enum is used which is not supported by the exposed extensions (GL_INVALID_ENUM instead of GL_INVALID_VALUE). Fix some compile-time #ifs depending on NV_vertex/fragment_program which should also be dependant on ARB_vertex/fragment_program. See bug #6070 --- src/mesa/shader/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/shader/program.c') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 4e8dacea7e3..a899618d148 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -107,14 +107,14 @@ _mesa_init_program(GLcontext *ctx) void _mesa_free_program_data(GLcontext *ctx) { -#if FEATURE_NV_vertex_program +#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program if (ctx->VertexProgram.Current) { ctx->VertexProgram.Current->Base.RefCount--; if (ctx->VertexProgram.Current->Base.RefCount <= 0) ctx->Driver.DeleteProgram(ctx, &(ctx->VertexProgram.Current->Base)); } #endif -#if FEATURE_NV_fragment_program +#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program if (ctx->FragmentProgram.Current) { ctx->FragmentProgram.Current->Base.RefCount--; if (ctx->FragmentProgram.Current->Base.RefCount <= 0) -- cgit v1.2.3