[Mesa-dev] [PATCH 1/9] mesa/es3.1: Allow binding GL_DRAW_INDIRECT_BUFFER with gles 3.1

Ian Romanick idr at freedesktop.org
Mon May 11 12:02:07 PDT 2015


On 05/11/2015 08:23 AM, Ilia Mirkin wrote:
> On Mon, May 11, 2015 at 9:03 AM, Marta Lofstedt
> <marta.lofstedt at linux.intel.com> wrote:
>> From: Marta Lofstedt <marta.lofstedt at intel.com>
>>
>> Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
>> ---
>>  src/mesa/main/bufferobj.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
>> index 66dee68..07f82cd 100644
>> --- a/src/mesa/main/bufferobj.c
>> +++ b/src/mesa/main/bufferobj.c
>> @@ -91,8 +91,9 @@ get_buffer_target(struct gl_context *ctx, GLenum target)
>>     case GL_COPY_WRITE_BUFFER:
>>        return &ctx->CopyWriteBuffer;
>>     case GL_DRAW_INDIRECT_BUFFER:
>> -      if (ctx->API == API_OPENGL_CORE &&
>> -          ctx->Extensions.ARB_draw_indirect) {
>> +      if ((ctx->API == API_OPENGL_CORE &&
>> +           ctx->Extensions.ARB_draw_indirect) ||
>> +           _mesa_is_gles31(ctx)) {
> 
> Similar to my comment on the other patch (and if this occurs in the
> other patches, I'd have the same comment there again). I think it's
> confusing, the way you're mixing things. Also it'll lead to backend
> drivers potentially receiving things they're not ready for. IMHO this
> should become
> 
> if ((ctx->API == API_OPENGL_CORE || _mesa_is_gles31(ctx)) &&
> ctx->Extensions.ARB_draw_indirect)

Before these patches were sent out for review, they were written in this
way.  I had suggested changing it to the current method.
GL_ARB_draw_indirect isn't an ES extension, so checking that case seemed
weird to me.

> Cheers,
> 
>   -ilia
> 
>>           return &ctx->DrawIndirectBuffer;
>>        }
>>        break;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list