[Mesa-dev] [RFC PATCH 47/56] glsl: support separate vertex count for producer when linking

Timothy Arceri t_arceri at yahoo.com.au
Sat Sep 27 03:04:52 PDT 2014


On Sun, 2014-09-21 at 13:41 +1200, Chris Forbes wrote:
> @@ -592,7 +592,7 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var)
>        return false;
>  
>     const glsl_type *type = var->type;
> -   if (this->gs_input_vertices != 0) {
> +   if (this->num_vertices != 0) {

Ok with little understanding of tessellation shaders I sent out this
patch set as an alternative to this change in the hope on getting some
more of the arrays of arrays pieces in. But after seeing the next patch
in the series I'm not 100% sure if its still suitable. Anyway I've
already sent it out and don't have time to look over this again until a
few days time so thought I'd point you to it anyway.

http://lists.freedesktop.org/archives/mesa-dev/2014-September/068601.html


>        assert(type->is_array());
>        type = type->element_type();
>     }
> @@ -649,7 +649,7 @@ lower_packed_varyings_gs_splicer::visit_leave(ir_emit_vertex *ev)
>  
>  void
>  lower_packed_varyings(void *mem_ctx, unsigned locations_used,
> -                      ir_variable_mode mode, unsigned gs_input_vertices,
> +                      ir_variable_mode mode, unsigned num_vertices,
>                        gl_shader *shader)
>  {
>     exec_list *instructions = shader->ir;
> @@ -659,7 +659,7 @@ lower_packed_varyings(void *mem_ctx, unsigned locations_used,
>        = main_func->matching_signature(NULL, &void_parameters, false);
>     exec_list new_instructions;
>     lower_packed_varyings_visitor visitor(mem_ctx, locations_used, mode,
> -                                         gs_input_vertices, &new_instructions);
> +                                         num_vertices, &new_instructions);
>     visitor.run(instructions);
>     if (mode == ir_var_shader_out) {
>        if (shader->Stage == MESA_SHADER_GEOMETRY) {




More information about the mesa-dev mailing list