nir: do not needlessly rely on optimizations

We're going to do this rewrite once we get to nir_opt_algebraic anyway,
so let's save a little bit of needless work here.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24004>
This commit is contained in:
Erik Faye-Lund 2023-06-05 15:11:32 +02:00
parent 6d42711043
commit b0bbd9c0d3
2 changed files with 2 additions and 4 deletions

View file

@ -72,8 +72,7 @@ implicit_downsampled_coord(nir_builder *b,
{
return nir_fadd(b,
value,
nir_fdiv(b,
nir_imm_float(b, 1.0f),
nir_frcp(b,
nir_fmul(b,
nir_imm_float(b, div_scale),
max_value)));

View file

@ -192,8 +192,7 @@ implicit_downsampled_coord(nir_builder *b,
{
return nir_fadd(b,
value,
nir_fdiv(b,
nir_imm_float(b, 1.0f),
nir_frcp(b,
nir_fmul(b,
nir_imm_float(b, div_scale),
max_value)));