[Mesa-dev] [PATCH 10/18] glsl: Delete bogus ir_set_program_inouts assert.

Timothy Arceri timothy.arceri at collabora.com
Tue Aug 2 01:05:21 UTC 2016


On Mon, 2016-08-01 at 10:29 -0700, Kenneth Graunke wrote:
> This assertion is bogus.  Varying structs, and arrays of structs, are
> allowed by GLSL, and we can see them here.  While we currently don't
> have any partial-variable support for those, simply returning false
> and marking the entire thing as used is certainly legitimate.
> 
> I believe this is often swept under the rug by varying packing,
> but that's disabled in certain tessellation situations.

It would probably be good to update the comment above the assert to
mention the structs not being packed for tess, or add a todo for
support.

With that Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com> 

> 
> Hit by 20 dEQP-GLES31.functional.tessellation.user_defined_io.*
> tests.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/compiler/glsl/ir_set_program_inouts.cpp | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp
> b/src/compiler/glsl/ir_set_program_inouts.cpp
> index 7c61994..aad3a8b 100644
> --- a/src/compiler/glsl/ir_set_program_inouts.cpp
> +++ b/src/compiler/glsl/ir_set_program_inouts.cpp
> @@ -265,10 +265,9 @@
> ir_set_program_inouts_visitor::try_mark_partial_variable(ir_variable
> *var,
>          (type->is_array() &&
>           (type->fields.array->is_numeric() ||
>            type->fields.array->is_boolean())))) {
> -      assert(!"Unexpected indexing in ir_set_program_inouts");
>  
> -      /* For safety in release builds, in case we ever encounter
> unexpected
> -       * indexing, give up and let the caller mark the whole
> variable as used.
> +      /* If we don't know how to handle this case, give up and let
> the
> +       * caller mark the whole variable as used.
>         */
>        return false;
>     }


More information about the mesa-dev mailing list