For those (few, I'm sure) of us who are exceedingly lazy, what [glsl
ir] code ends up getting generated as a result of this?

int temp;
if (zero == 0) temp = gl_SampleMaskIn[0]
else leave temp undefined?

On Mon, Apr 4, 2016 at 5:08 AM, Kenneth Graunke <[email protected]> wrote:
> Some system values, such as gl_SampleMaskIn[], may be arrays.
> lower_variable_index_to_cond_assign() did not handle this case and would
> hit an unreachable() assert.
>
> For now, lower when EmitNoIndirectInput is set.  We could potentially
> add another flag for system values, but I'm not sure how useful that
> would be.
>
> Fixes Piglit's new samplemaskin-indirect test.  Also fixes many ES31-CTS
> tests when OES_sample_variables is enabled.
>
> Cc: [email protected]
> Signed-off-by: Kenneth Graunke <[email protected]>
> ---
>  src/compiler/glsl/lower_variable_index_to_cond_assign.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp 
> b/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp
> index 278d545..2391089 100644
> --- a/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp
> +++ b/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp
> @@ -385,6 +385,7 @@ public:
>        case ir_var_const_in:
>           return this->lower_temps;
>
> +      case ir_var_system_value:
>        case ir_var_shader_in:
>           /* The input array size is unknown at compiler time for non-patch
>            * inputs in TCS and TES. The arrays are sized to
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to