Mesa (master): mesa context: generate an error for uninstalled context functions

Jordan Justen jljusten at kemper.freedesktop.org
Tue Jul 24 18:54:20 UTC 2012


Module: Mesa
Branch: master
Commit: 01168df4d999f84105928d69fdd3eeed6baeeab4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=01168df4d999f84105928d69fdd3eeed6baeeab4

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Mon Jul 16 15:41:26 2012 -0700

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 at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/main/context.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

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;
 }
 




More information about the mesa-commit mailing list