On 12/09/2015 04:07 AM, Timothy Arceri wrote: > On Wed, 2015-12-09 at 16:06 +1000, Dave Airlie wrote: >> From: Dave Airlie <airl...@redhat.com> >> >> Signed-off-by: Dave Airlie <airl...@redhat.com> >> --- >> src/glsl/lower_packed_varyings.cpp | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/glsl/lower_packed_varyings.cpp >> b/src/glsl/lower_packed_varyings.cpp >> index 037c27d..ec9af62 100644 >> --- a/src/glsl/lower_packed_varyings.cpp >> +++ b/src/glsl/lower_packed_varyings.cpp >> @@ -472,7 +472,7 @@ >> lower_packed_varyings_visitor::lower_rvalue(ir_rvalue *rvalue, >> char right_swizzle_name[4] = { 0, 0, 0, 0 }; >> >> left_components = 4 - fine_location % 4; >> - if (rvalue->type->is_double()) { >> + if (rvalue->type->is_dual_slot_double()) { > > The subject line says what the change is but there is no explanation on > why it was made. Can you add more detail to the comment? > > To me the existing code *seems* correct as all doubles take up twice > the amount of components, why would we only divide by 2 when its a dual > slot double?
Yeah... it seems like after this change it might try to pack a double in the W component of a vec3. >> /* We might actually end up with 0 left components! */ >> left_components /= 2; >> } > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev