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 <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23393>
This commit is contained in:
Erik Faye-Lund 2023-05-23 12:23:51 +02:00 committed by Marge Bot
parent 817be4b860
commit 57260a836a
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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