[Mesa-dev] [PATCH 1/2] glsl: Fix incorrect pattern matching in ir_set_program_inouts

Kenneth Graunke kenneth at whitecape.org
Tue Aug 13 10:32:03 PDT 2013


On 08/09/2013 10:27 AM, Paul Berry wrote:
> In commit 8fc41df (glsl: Modify ir_set_program_inouts to handle
> geometry shaders), when attempting to pattern match the "foo" part of
> expressions such as:
>
>     foo[i][j]
>     foo[i]
>
> I incorrectly called as_dereference_variable() on the subexpression
> foo[i] instead of foo.  As a result, the pattern never matched, so
> ir_set_program_inouts would fall back on marking the entire variable
> as used, rather than just the portion indexed by the array.
>
> This didn't result in incorrect behaviour, but it could have resulted
> in inefficiency by causing the back-end to allocate resources for
> unused parts of an input or output array.

Patch 1 is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>



More information about the mesa-dev mailing list