[Mesa-dev] [PATCH] i965/fs: Don't mix integer/float immediates in i2b handling.

Paul Berry stereotype441 at gmail.com
Fri Jan 11 15:01:10 PST 2013


On 11 January 2013 14:19, Kenneth Graunke <kenneth at whitecape.org> wrote:

> The simulator gets very angry about our i2b code:
>
> cmp.ne(16)      g3<1>D          g2<0,1,0>D      0F
>
> We can't mix integer DWord and float types.  The only reason to use 0F
> here was to share code with f2b.  Split it and use 0D instead.
>

Seems reasonable.

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> ---
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index 815e421..fd07864 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -506,9 +506,11 @@ fs_visitor::visit(ir_expression *ir)
>        break;
>
>     case ir_unop_f2b:
> -   case ir_unop_i2b:
>        emit(CMP(this->result, op[0], fs_reg(0.0f), BRW_CONDITIONAL_NZ));
>        break;
> +   case ir_unop_i2b:
> +      emit(CMP(this->result, op[0], fs_reg(0), BRW_CONDITIONAL_NZ));
> +      break;
>
>     case ir_unop_trunc:
>        emit(RNDZ(this->result, op[0]));
> --
> 1.8.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130111/9b285467/attachment.html>


More information about the mesa-dev mailing list