[Mesa-dev] [WIP 0/2] packed varyings problem

Tapani Pälli tapani.palli at intel.com
Thu Sep 10 21:28:57 PDT 2015


I guess there are no strong opinions on this (?) If not I'll just fix 
the part building stage_ref mask in patch 2 and resend the patches.

On 09/04/2015 12:39 PM, Tapani Pälli wrote:
> Hi;
>
> Here's a solution to a problem with lower_packed_varyings pass. I
> wanted to ask if this seems OK approach for everyone or should I try
> to think of some alternative way of solving this, not sure how though.
> If this is OK, I will do some cleanups and send these again.
>
> Problem is that shader might have for example following varyings:
>
> out float r,g,b
>
> lower_packed_varyings will optimize this as a single variable:
>
> vec3 packed:b,g,r
>
> Now later on application might start asking about variables r, g and
> b and their properties. These changes make 'shadow copies' of r, g and
> b so that we can return correct answers easily without having to figure
> out information from packed:b,g,r, not sure if that's even possible.
>
> Any ideas appreciated, thanks;
>
> Tapani Pälli (2):
>    mesa: add packed_varyings list to gl_shader
>    glsl: add shadow variables to program resource list
>
>   src/glsl/linker.cpp                | 55 +++++++++++++++++++++++++++++++++++---
>   src/glsl/lower_packed_varyings.cpp | 16 ++++++++---
>   src/mesa/main/mtypes.h             |  1 +
>   3 files changed, 64 insertions(+), 8 deletions(-)
>


More information about the mesa-dev mailing list