[Mesa-dev] [PATCH] i965/fs: Fix saturate for nir_opcode_bcsel.

Jason Ekstrand jason at jlekstrand.net
Tue Feb 3 07:10:20 PST 2015


Hrm... I thought bcsel worked on integers.  You shouldn't be able to sat it
anyway... This seems strange.

As a side-note, this is one of the downsides to typeless that we should
figure out how to solve.  Not 100% sure how at the moment.
On Feb 3, 2015 2:35 AM, "Kenneth Graunke" <kenneth at whitecape.org> wrote:

> Caught by lit_sat.shader_test.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 153a1be..3c611af 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -1084,6 +1084,7 @@ fs_visitor::nir_emit_alu(nir_alu_instr *instr)
>        emit(CMP(reg_null_d, op[0], fs_reg(0), BRW_CONDITIONAL_NZ));
>        inst = emit(SEL(result, op[1], op[2]));
>        inst->predicate = BRW_PREDICATE_NORMAL;
> +      inst->saturate = instr->dest.saturate;
>        break;
>
>     default:
> --
> 2.2.2
>
> _______________________________________________
> 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/20150203/f2b673fe/attachment.html>


More information about the mesa-dev mailing list