[Mesa-dev] [PATCH 3/4] panfrost/midgard: Handle i2b constant
Ilia Mirkin
imirkin at alum.mit.edu
Tue Mar 26 12:59:28 UTC 2019
Just an observation...
f2b(0x80000000) == false
i2b(0x80000000) == true
I haven't read surrounding code, but if the handling of f2b and i2b is
entirely identical, you'll run into trouble.
Cheers,
-ilia
On Tue, Mar 26, 2019 at 12:59 AM Alyssa Rosenzweig <alyssa at rosenzweig.io> wrote:
>
> Fixes
> dEQP-GLES2.functional.shaders.conversions.scalar_to_scalar.int_to_bool_fragment
>
> Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
> ---
> src/gallium/drivers/panfrost/midgard/midgard_compile.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
> index d6ed0008596..3dd21d0390d 100644
> --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
> +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
> @@ -1174,7 +1174,7 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
> }
>
> ins.alu.src2 = vector_alu_srco_unsigned(blank_alu_src_xxxx);
> - } else if (instr->op == nir_op_f2b32) {
> + } else if (instr->op == nir_op_f2b32 || instr->op == nir_op_i2b32) {
> ins.ssa_args.inline_constant = false;
> ins.ssa_args.src1 = SSA_FIXED_REGISTER(REGISTER_CONSTANT);
> ins.has_constants = true;
> --
> 2.20.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list