[Mesa-dev] [PATCH 8/8] glsl: only divide left components when it is a dual slot double.
Timothy Arceri
t_arceri at yahoo.com.au
Wed Dec 9 04:07:29 PST 2015
On Wed, 2015-12-09 at 16:06 +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Signed-off-by: Dave Airlie <airlied at 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?
> /* We might actually end up with 0 left components! */
> left_components /= 2;
> }
More information about the mesa-dev
mailing list