Also, NIR doesn't (yet) have matrix SSA values so load_var/store_var
wouldn't really make sense on them.

On Fri, Oct 27, 2017 at 12:25 AM, Timothy Arceri <tarc...@itsqueeze.com> wrote:
> On second thoughts I'm splitting the matrix as well so I probably don't need
> this.
>
>
> On 27/10/17 14:58, Timothy Arceri wrote:
>>
>> For some reason when we convert the following from GLSL IR to NIR:
>>
>> out mat4 var;
>>
>> The derefence type ends up as vec4 so we don't currently end up
>> asserting here. However I hit this with a NIR array splitting pass
>> I'm working on.
>> ---
>>   src/compiler/nir/nir_validate.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/src/compiler/nir/nir_validate.c
>> b/src/compiler/nir/nir_validate.c
>> index 2322c8f786d..6ff17ee6a96 100644
>> --- a/src/compiler/nir/nir_validate.c
>> +++ b/src/compiler/nir/nir_validate.c
>> @@ -498,6 +498,7 @@ validate_intrinsic_instr(nir_intrinsic_instr *instr,
>> validate_state *state)
>>         const struct glsl_type *type =
>>            nir_deref_tail(&instr->variables[0]->deref)->type;
>>         validate_assert(state, glsl_type_is_vector_or_scalar(type) ||
>> +             glsl_type_is_matrix(type) ||
>>                (instr->variables[0]->var->data.mode == nir_var_uniform &&
>>                 glsl_get_base_type(type) == GLSL_TYPE_SUBROUTINE));
>>         validate_assert(state, instr->num_components ==
>> glsl_get_vector_elements(type));
>> @@ -507,6 +508,7 @@ validate_intrinsic_instr(nir_intrinsic_instr *instr,
>> validate_state *state)
>>         const struct glsl_type *type =
>>            nir_deref_tail(&instr->variables[0]->deref)->type;
>>         validate_assert(state, glsl_type_is_vector_or_scalar(type) ||
>> +             glsl_type_is_matrix(type) ||
>>                (instr->variables[0]->var->data.mode == nir_var_uniform &&
>>                 glsl_get_base_type(type) == GLSL_TYPE_SUBROUTINE));
>>         validate_assert(state, instr->num_components ==
>> glsl_get_vector_elements(type));
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to