[Mesa-dev] [PATCH 12/14] mesa/vbo: add KHR_no_error support to vbo_exec_DrawArrays*()

Timothy Arceri tarceri at itsqueeze.com
Thu Apr 13 23:52:41 UTC 2017


On 14/04/17 05:34, Nicolai Hähnle wrote:
> On second thought, there are a bunch of things that I think need to be
> answered here:
>
> On 13.04.2017 01:42, Timothy Arceri wrote:
>> ---
>>  src/mesa/vbo/vbo_exec_array.c | 41
>> +++++++++++++++++++++++++++++++----------
>>  1 file changed, 31 insertions(+), 10 deletions(-)
>>
>> diff --git a/src/mesa/vbo/vbo_exec_array.c
>> b/src/mesa/vbo/vbo_exec_array.c
>> index 9452c65..6e3cd5a 100644
>> --- a/src/mesa/vbo/vbo_exec_array.c
>> +++ b/src/mesa/vbo/vbo_exec_array.c
>> @@ -616,22 +616,27 @@ vbo_exec_EvalMesh2(GLenum mode, GLint i1, GLint
>> i2, GLint j1, GLint j2)
>>   */
>>  static void GLAPIENTRY
>>  vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
>>  {
>>     GET_CURRENT_CONTEXT(ctx);
>>
>>     if (MESA_VERBOSE & VERBOSE_DRAW)
>>        _mesa_debug(ctx, "glDrawArrays(%s, %d, %d)\n",
>>                    _mesa_enum_to_string(mode), start, count);
>>
>> -   if (!_mesa_validate_DrawArrays(ctx, mode, count))
>> -      return;
>> +   if (_mesa_is_no_error_enabled(ctx)) {
>> +      if (ctx->NewState)
>> +         _mesa_update_state(ctx);
>
> Why the call(s) to _mesa_update_state? The validate functions don't do
> that.

They call check_valid_to_render() which calls _mesa_valid_to_render() 
which calls _mesa_update_state()

>
> Conversely, all the validate functions call FLUSH_CURRENT, which the
> no_error path now doesn't do anymore -- that seems wrong.

I just double checked and the only DrawArray* validation function that 
calls this is _mesa_validate_DrawArraysIndirect() the others don't. I'll 
fix this for the one that does. Thanks.

>
> Nicolai
>



More information about the mesa-dev mailing list