mesa context: generate an error for uninstalled context functions
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 16 Jul 2012 22:41:26 +0000 (15:41 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 24 Jul 2012 18:50:35 +0000 (11:50 -0700)
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>
src/mesa/main/context.c

index 1546c88..41550f9 100644 (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;
 }