[Mesa-dev] [PATCH] mesa: add GL_OES_gpu_shader5 and GL_EXT_gpu_shader5 support

Ilia Mirkin imirkin at alum.mit.edu
Fri Feb 26 14:32:53 UTC 2016


On Fri, Feb 26, 2016 at 6:55 AM, Samuel Iglesias Gonsálvez
<siglesias at igalia.com> wrote:
> On Fri, Feb 19, 2016 at 07:10:24PM -0500, Ilia Mirkin wrote:
>> The two extensions are identical, and are largely taking bits of already
>> existing desktop functionality. We continue to do a poor job of
>> supporting the 'precise' keyword, just like we do on desktop.
>>
>> This passes the relevant dEQP tests that I could find.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> ---
>>  docs/GL3.txt                             |  2 +-
>>  src/compiler/glsl/ast_array_index.cpp    | 20 +++++--
>>  src/compiler/glsl/builtin_functions.cpp  | 99 +++++++++++++++++++-------------
>>  src/compiler/glsl/glcpp/glcpp-parse.y    |  4 ++
>>  src/compiler/glsl/glsl_lexer.ll          |  2 +-
>>  src/compiler/glsl/glsl_parser_extras.cpp |  2 +
>>  src/compiler/glsl/glsl_parser_extras.h   |  4 ++
>>  src/mesa/main/extensions_table.h         |  2 +
>>  8 files changed, 88 insertions(+), 47 deletions(-)
>>
>> diff --git a/docs/GL3.txt b/docs/GL3.txt
>> index 2e528d4..e7d40de 100644
>> --- a/docs/GL3.txt
>> +++ b/docs/GL3.txt
>> @@ -245,7 +245,7 @@ GLES3.2, GLSL ES 3.2
>>    GL_OES_draw_buffers_indexed                          not started
>>    GL_OES_draw_elements_base_vertex                     DONE (all drivers)
>>    GL_OES_geometry_shader                               started (Marta)
>> -  GL_OES_gpu_shader5                                   not started (based on parts of GL_ARB_gpu_shader5, which is done for some drivers)
>> +  GL_OES_gpu_shader5                                   DONE (all drivers that support GL_ARB_gpu_shader5)
>>    GL_OES_primitive_bounding box                        not started
>>    GL_OES_sample_shading                                DONE (nvc0, r600, radeonsi)
>>    GL_OES_sample_variables                              DONE (nvc0, r600, radeonsi)
>> diff --git a/src/compiler/glsl/ast_array_index.cpp b/src/compiler/glsl/ast_array_index.cpp
>> index f5baeb9..af5e89e 100644
>> --- a/src/compiler/glsl/ast_array_index.cpp
>> +++ b/src/compiler/glsl/ast_array_index.cpp
>> @@ -236,13 +236,22 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
>>              _mesa_glsl_error(&loc, state, "unsized array index must be constant");
>>           }
>>        } else if (array->type->without_array()->is_interface()
>> -                 && (array->variable_referenced()->data.mode == ir_var_uniform ||
>> -                     array->variable_referenced()->data.mode == ir_var_shader_storage)
>> -                 && !state->is_version(400, 0) && !state->ARB_gpu_shader5_enable) {
>> +                 && ((array->variable_referenced()->data.mode == ir_var_uniform
>> +                      && !state->is_version(400, 320)
>> +                      && !state->ARB_gpu_shader5_enable
>> +                      && !state->EXT_gpu_shader5_enable
>> +                      && !state->OES_gpu_shader5_enable) ||
>> +                     (array->variable_referenced()->data.mode == ir_var_shader_storage
>> +                      && !state->is_version(400, 0)
>> +                      && !state->ARB_gpu_shader5_enable))) {
>>        /* Page 50 in section 4.3.9 of the OpenGL ES 3.10 spec says:
>>         *
>>         *     "All indices used to index a uniform or shader storage block
>>         *     array must be constant integral expressions."
>> +          *
>> +          * But OES_gpu_shader5 (and ESSL 3.20) relax this to allow indexing
>> +          * on uniform blocks but not shader storage blocks.
>> +          *
>
> Indention here.

This file is a sad mix of tabs and spaces. Should I use tabs instead
like the other lines do? Fix the other lines?

>
> Other than that,
>
> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

Thanks!

  -ilia


More information about the mesa-dev mailing list