mesa: change ctx->Driver.ProgramStringNotify() to return GLboolean

GL_TRUE indicates that the driver accepts the program.
GL_FALSE indicates the program can't be compiled/translated by the
driver for some reason (too many resources used, etc).

Propogate this result up to the GL API: set GL_INVALID_OPERATION
error if glProgramString() was called.  Set shader program link
status to GL_FALSE if glLinkProgram() was called.

At this point, drivers still don't do any program checking and
always return GL_TRUE.
This commit is contained in:
Brian Paul
2010-02-04 16:49:35 -07:00
parent 0f763c5b00
commit 4ac9c80e5b
14 changed files with 86 additions and 32 deletions

View File

@@ -1205,7 +1205,7 @@ i915IsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
return GL_TRUE;
}
static void
static GLboolean
i915ProgramStringNotify(GLcontext * ctx,
GLenum target, struct gl_program *prog)
{
@@ -1223,7 +1223,10 @@ i915ProgramStringNotify(GLcontext * ctx,
}
}
_tnl_program_string(ctx, target, prog);
(void) _tnl_program_string(ctx, target, prog);
/* XXX check if program is legal, within limits */
return GL_TRUE;
}
void