[Mesa-dev] [PATCH v3] compiler/glsl: allow sequence op as a const expr in gles 1.0
Lars Hamre
chemecse at gmail.com
Wed Mar 23 17:13:10 UTC 2016
Thanks! Will do in the future.
Regards,
Lars
On Wed, Mar 23, 2016 at 1:08 PM, Eduardo Lima Mitev <elima at igalia.com>
wrote:
> Hi Lars,
>
> I suppose you need help pushing your patch upstream. I will do it.
>
> As a note for the future, once you get a formal Review-by to a patch, it
> is not necessary to send a new version only to add the tag. You can instead
> ask directly someone with committing rights to merge it for you.
>
> cheers,
> Eduardo
>
>
> On 03/23/2016 03:14 PM, Lars Hamre wrote:
>
>> v3: Added reviewed-by tag
>> v2: Fixed regression pointed out by Eduardo Lima Mitev
>>
>> Allow the sequence operator to be a constant expression in GLSL ES
>> versions prior
>> to GLSL ES 3.0
>>
>> Fixes the following piglit test:
>>
>> /all/spec/glsl-es-1.0/compiler/array-sized-by-sequence-in-parenthesis.vert
>>
>> This is similar to the logic from process_initializer() which performs the
>> same check for constant variable initialization with sequence operators.
>>
>> Signed-off-by: Lars Hamre <chemecse at gmail.com>
>> Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
>>
>> ---
>> src/compiler/glsl/ast_to_hir.cpp | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/compiler/glsl/ast_to_hir.cpp
>> b/src/compiler/glsl/ast_to_hir.cpp
>> index 5262bd8..35def8e 100644
>> --- a/src/compiler/glsl/ast_to_hir.cpp
>> +++ b/src/compiler/glsl/ast_to_hir.cpp
>> @@ -2125,7 +2125,9 @@ process_array_size(exec_node *node,
>> }
>>
>> ir_constant *const size = ir->constant_expression_value();
>> - if (size == NULL || array_size->has_sequence_subexpression()) {
>> + if (size == NULL ||
>> + (state->is_version(120, 300) &&
>> + array_size->has_sequence_subexpression())) {
>> _mesa_glsl_error(& loc, state, "array size must be a "
>> "constant valued expression");
>> return 0;
>> --
>> 2.5.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160323/65da0e3e/attachment-0001.html>
More information about the mesa-dev
mailing list