[Mesa-dev] [PATCH] mesa context: generate an error for uninstalled context functions

Kenneth Graunke kenneth at whitecape.org
Mon Jul 16 23:42:33 PDT 2012


On 07/16/2012 05:44 PM, Jordan Justen wrote:
> On Mon, Jul 16, 2012 at 4:47 PM, Jordan Justen
> <jordan.l.justen at intel.com> wrote:
>> 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>
>> Cc: Ian Romanick <idr at freedesktop.org>
>> ---
>>  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 d5ccce0..b3b935b 100644
>> --- a/src/mesa/main/context.c
>> +++ b/src/mesa/main/context.c
>> @@ -844,7 +844,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(NULL, GL_INVALID_OPERATION,
>> +               "unsupported function called "
>> +               "(unsupported extension or deprecated function?)");
> 
> Whoops.  NULL should be ctx in the _mesa_error call...
> 
> -Jordan

With that change, this is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

though obviously I'd wait for Ian and others to comment...




More information about the mesa-dev mailing list