[Mesa-stable] [PATCH 22/22 v2] radeonsi: NaN should pass kill_if
Marek Olšák
maraeo at gmail.com
Tue Sep 25 00:21:46 UTC 2018
Looks good to me.
Marek
On Mon, Sep 24, 2018 at 2:29 AM, Axel Davy <davyaxel0 at gmail.com> wrote:
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105333
> Fixes: https://github.com/iXit/Mesa-3D/issues/314
>
> For this application, NaN is passed to KILL_IF and is expected to
> pass.
>
> v2: Explain in the code why UGE is used.
>
> Signed-off-by: Axel Davy <davyaxel0 at gmail.com>
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>
> CC: <mesa-stable at lists.freedesktop.org>
> ---
> src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
> index f54d025aec0..a768b449047 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
> @@ -60,7 +60,8 @@ static void kil_emit(const struct lp_build_tgsi_action *action,
>
> for (i = 0; i < TGSI_NUM_CHANNELS; i++) {
> LLVMValueRef value = lp_build_emit_fetch(bld_base, inst, 0, i);
> - conds[i] = LLVMBuildFCmp(builder, LLVMRealOGE, value,
> + /* UGE because NaN shouldn't get killed */
> + conds[i] = LLVMBuildFCmp(builder, LLVMRealUGE, value,
> ctx->ac.f32_0, "");
> }
>
> --
> 2.18.0
>
> _______________________________________________
> mesa-stable mailing list
> mesa-stable at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
More information about the mesa-stable
mailing list