On Thursday, September 15, 2016 3:35:27 PM PDT Ilia Mirkin wrote: > On Thu, Sep 15, 2016 at 5:10 AM, Kenneth Graunke <kenn...@whitecape.org> > wrote: > > Fixes ESEXT-CTS.draw_elements_base_vertex_tests.AEP_shader_stages and > > ESEXT-CTS.texture_cube_map_array.texture_size_tesselation_con_sh. > > > > Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> > > --- > > src/compiler/glsl/ast_to_hir.cpp | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/src/compiler/glsl/ast_to_hir.cpp > > b/src/compiler/glsl/ast_to_hir.cpp > > index 0a23195..90cc924 100644 > > --- a/src/compiler/glsl/ast_to_hir.cpp > > +++ b/src/compiler/glsl/ast_to_hir.cpp > > @@ -5127,7 +5127,14 @@ ast_declarator_list::hir(exec_list *instructions, > > const glsl_type *const t = (earlier == NULL) > > ? var->type : earlier->type; > > > > - if (t->is_unsized_array()) > > + /* GL_OES_tessellation_shader allows omitting the array size > > + * for TCS inputs/outputs and TES inputs. Ignore this check. > > + */ > > + bool unsized_ok = state->stage == MESA_SHADER_TESS_CTRL || > > Are you sure that only inputs/outputs can make it in here? I couldn't > come to that conclusion from a quick scan of the code...
Whoops. No, other things can get here too. How about: const bool unsized_ok = (stage->state == MESA_SHADER_TESS_CTRL && (var->data.mode == ir_var_shader_in || var->data.mode == ir_var_shader_out)) || (stage->state == MESA_SHADER_TESS_EVAL && var->data.mode == ir_var_shader_in); > > + (state->stage == MESA_SHADER_TESS_EVAL && > > + var->data.mode == ir_var_shader_in); > > + > > + if (t->is_unsized_array() && !unsized_ok) > > /* Section 10.17 of the GLSL ES 1.00 specification states that > > * unsized array declarations have been removed from the > > language. > > * Arrays that are sized using an initializer are still > > explicitly > > -- > > 2.9.3
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev