mesa context: generate an error for uninstalled context functions

For 'non-legacy' contexts we will want to generate an error
if an uninstalled function is called.

The effect of this change will be that we can avoid installing
legacy functions, and they will then generate an error as
needed for deprecated functions in GL >= 3.1.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Jordan Justen
2012-07-16 15:41:26 -07:00
parent 1f9239ec8d
commit 01168df4d9

View File

@@ -842,7 +842,10 @@ update_default_objects(struct gl_context *ctx)
static int
generic_nop(void)
{
_mesa_warning(NULL, "User called no-op dispatch function (an unsupported extension function?)");
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
"unsupported function called "
"(unsupported extension or deprecated function?)");
return 0;
}