[Mesa-dev] [PATCH v3 07/14] glsl: move stream layout max validation

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Nov 16 08:17:14 PST 2015



On 14/11/15 14:58, Timothy Arceri wrote:
> On Sun, 2015-11-15 at 00:42 +1100, Timothy Arceri wrote:
>> From: Timothy Arceri <timothy.arceri at collabora.com>
>>
>> This validation is moved later so we can validate the
>> max value when compile time constant support is added in a
>> later patch.
>> ---
>>  src/glsl/ast_to_hir.cpp | 22 ++++++++++++++++++++--
>>  src/glsl/ast_type.cpp   | 14 --------------
>>  2 files changed, 20 insertions(+), 16 deletions(-)
>>
>> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
>> index 53faacf..dedc39f 100644
>> --- a/src/glsl/ast_to_hir.cpp
>> +++ b/src/glsl/ast_to_hir.cpp
>> @@ -2522,8 +2522,24 @@ process_qualifier_constant(struct
>> _mesa_glsl_parse_state *state,
>>  }
>>  
>>  static bool
>> +validate_stream_qualifier(YYLTYPE *loc, struct _mesa_glsl_parse_state
>> *state,
>> +                          unsigned stream)
>> +{
>> +   if (stream >= state->ctx->Const.MaxVertexStreams) {
>> +      _mesa_glsl_error(loc, state,
>> +                       "invalid stream specified %d is larger than "
>> +                       "MAX_VERTEX_STREAMS - 1 (%d).",
>> +                       stream, state->ctx->Const.MaxVertexStreams - 1);
>> +      return false;
>> +   }
>> +
>> +   return true;
>> +}
>> +
>> +static void
>>  validate_binding_qualifier(struct _mesa_glsl_parse_state *state,
>>                             YYLTYPE *loc,
>> +                           ir_variable *var,
> 
> This and changeing the function to not return bool are meant to be in the next
> patch. I've fixed this up locally.
> 

OK, with those changes and assuming no piglit regressions, patches 1-7 are:

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

Sam

> _______________________________________________
> 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