From 57260a836a1ffb4fc8b8e524a947a7302c7e0517 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 23 May 2023 12:23:51 +0200 Subject: [PATCH] d3d12, dozen: make sure we pass float to fge This doesn't matter much in practice, because the integer an float representations of zero are the same. But it's easier to understand what's going on if the correct type is used, so let's clean this up. Reviewed-by: Rhys Perry Part-of: --- src/gallium/drivers/d3d12/d3d12_gs_variant.cpp | 4 ++-- src/microsoft/vulkan/dzn_nir.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp b/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp index 92d4930..8a3f164 100644 --- a/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp +++ b/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp @@ -47,9 +47,9 @@ nir_cull_face(nir_builder *b, nir_variable *vertices, bool ccw) nir_fsub(b, v2, v0)), nir_imm_vec4(b, 0.0, 0.0, -1.0, 0.0)); if (ccw) - return nir_fge(b, nir_imm_int(b, 0), dir); + return nir_fge(b, nir_imm_float(b, 0.0f), dir); else - return nir_flt(b, nir_imm_int(b, 0), dir); + return nir_flt(b, nir_imm_float(b, 0.0f), dir); } static void diff --git a/src/microsoft/vulkan/dzn_nir.c b/src/microsoft/vulkan/dzn_nir.c index fdca6da..2ab19c6 100644 --- a/src/microsoft/vulkan/dzn_nir.c +++ b/src/microsoft/vulkan/dzn_nir.c @@ -791,9 +791,9 @@ cull_face(nir_builder *b, nir_variable *vertices, bool ccw) nir_fsub(b, v2, v0)), nir_imm_vec4(b, 0.0, 0.0, -1.0, 0.0)); if (ccw) - return nir_fge(b, nir_imm_int(b, 0), dir); + return nir_fge(b, nir_imm_float(b, 0.0f), dir); else - return nir_flt(b, nir_imm_int(b, 0), dir); + return nir_flt(b, nir_imm_float(b, 0.0f), dir); } static void -- 2.7.4