On 11/20/2014 05:19 PM, Kenneth Graunke wrote:
> On Thursday, November 20, 2014 11:14:49 AM Ian Romanick wrote:
>> From: Ian Romanick <ian.d.roman...@intel.com>
>>
>> GL 3-ish versions of the spec are less clear that an error should be
>> generated here, so Ken (and I during review) just missed it in 1afe335.
>>
>> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com>
>> Cc: Kenneth Graunke <kenn...@whitecape.org>
>> ---
>>  src/mesa/main/api_validate.c | 10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
>> index bf4fa3e..006fca4 100644
>> --- a/src/mesa/main/api_validate.c
>> +++ b/src/mesa/main/api_validate.c
>> @@ -79,8 +79,16 @@ check_valid_to_render(struct gl_context *ctx, const char 
>> *function)
>>        break;
>>  
>>     case API_OPENGL_CORE:
>> -      if (ctx->Array.VAO == ctx->Array.DefaultVAO)
>> +      /* Section 10.4 (Drawing Commands Using Vertex Arrays) of the OpenGL 
>> 4.5
>> +       * Core Profile spec says:
>> +       *
>> +       *     "An INVALID_OPERATION error is generated if no vertex array
>> +       *     object is bound (see section 10.3.1)."
>> +       */
>> +      if (ctx->Array.VAO == ctx->Array.DefaultVAO) {
>> +         _mesa_error(ctx, GL_INVALID_OPERATION, "%s(no VAO bound)", 
>> function);
>>           return GL_FALSE;
>> +      }
>>        /* fallthrough */
>>     case API_OPENGL_COMPAT:
>>        {
> 
> This seems okay - we were already prohibiting drawing, you're just adding a 
> GL error.
> I thought we already did that, but I can't find any code to do so.
> 
> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
> 
> That said, I don't think we ever resolved whether prohibiting drawing is 
> correct,
> given that we support ARB_ES3_compatibility, and ES3 allows this.

OpenGL 4.5 includes GL_ARB_ES3_compatibility as a required feature, and
it explicitly calls out the error.  So I think we're okay?

Also... the brw_state_flags patch I was taking about yesterday is patch
7 in this series. :)


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to