From 01168df4d999f84105928d69fdd3eeed6baeeab4 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 16 Jul 2012 15:41:26 -0700 Subject: [PATCH] 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 Reviewed-by: Kenneth Graunke Reviewed-by: Ian Romanick --- src/mesa/main/context.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 1546c88..41550f9 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -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; } -- 2.7.4