[Mesa-dev] [PATCH] glsl/lower_instructions: fix regression in dldexp_to_arith

Ilia Mirkin imirkin at alum.mit.edu
Thu Jan 21 02:09:18 PST 2016


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Thu, Jan 21, 2016 at 4:46 AM, Iago Toral Quiroga <itoral at igalia.com> wrote:
> The commit b4e198f47f842 changed the offset and bits parameters of the
> bitfield insert operation from scalars to vectors. However, the lowering
> of ldexp on doubles operates on each vector component and emits scalar
> code (since it has to deal with the lower and upper 32-bit chunks of
> each double component), so it needs its bits and offset parameters to
> be scalars.
>
> Fixes fp64 regression (crash) in:
> spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test
> ---
>  src/glsl/lower_instructions.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/glsl/lower_instructions.cpp b/src/glsl/lower_instructions.cpp
> index d140be3..7c2d4d7 100644
> --- a/src/glsl/lower_instructions.cpp
> +++ b/src/glsl/lower_instructions.cpp
> @@ -470,8 +470,8 @@ lower_instructions_visitor::dldexp_to_arith(ir_expression *ir)
>
>     ir_constant *sign_mask = new(ir) ir_constant(0x80000000u);
>
> -   ir_constant *exp_shift = new(ir) ir_constant(20, vec_elem);
> -   ir_constant *exp_width = new(ir) ir_constant(11, vec_elem);
> +   ir_constant *exp_shift = new(ir) ir_constant(20u);
> +   ir_constant *exp_width = new(ir) ir_constant(11u);
>     ir_constant *exp_bias = new(ir) ir_constant(1022, vec_elem);
>
>     /* Temporary variables */
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list