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(-)

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to