[Mesa-dev] [PATCH] mesa: increase size of TFB info Outputs array

Christoph Bumiller e0425955 at student.tuwien.ac.at
Tue Jan 17 08:50:51 PST 2012


On 01/12/2012 10:53 PM, Christoph Bumiller wrote:
> The nvc0 gallium driver is advertising 128 MAX_INTERLEAVED_COMPS
> which made it always assert in the linker when TFB was used.
> 

Going to push this soon if no one minds ... though maybe I should just
change the limit in the driver to 64, this struct uses up quite a lot of
space with this large array.

But then, if people cared about memory usage the whole transform
feedback info would be allocated dynamically wouldn't it ...


> The new size corresponds to the maximum number of possible unique
> outputs when varying packing is used.
> 
> NOTE: This is a candidate for the 8.0 branch.
> ---
>  src/mesa/main/mtypes.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 9fdabf9..f677461 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -1846,7 +1846,7 @@ struct gl_transform_feedback_info {
>         * offset is in the y and z components of the output register.
>         */
>        unsigned ComponentOffset;
> -   } Outputs[MAX_PROGRAM_OUTPUTS];
> +   } Outputs[MAX_PROGRAM_OUTPUTS * 4];
>  
>     /** Transform feedback varyings used for the linking of this shader program.
>      *



More information about the mesa-dev mailing list