[Mesa-dev] [WIP 0/2] packed varyings problem
Tapani Pälli
tapani.palli at intel.com
Fri Sep 4 02:39:45 PDT 2015
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(-)
--
2.4.3
More information about the mesa-dev
mailing list