nir/lower_tex: Assume that nir_tex_instr::dest_type is sized

This reverts the code back to the form it was before, but with an
explicitly sized float32 instead of float, now that all producers are
switched over.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>
This commit is contained in:
Connor Abbott 2020-12-08 13:50:14 +01:00
parent 708c47e663
commit 6ca1ab3bb4

View file

@ -732,7 +732,7 @@ get_zero_or_one(nir_builder *b, nir_alu_type type, uint8_t swizzle_val)
v[0].u32 = v[1].u32 = v[2].u32 = v[3].u32 = 0;
} else {
assert(swizzle_val == 5);
if (nir_alu_type_get_base_type(type) == nir_type_float)
if (type == nir_type_float32)
v[0].f32 = v[1].f32 = v[2].f32 = v[3].f32 = 1.0;
else
v[0].u32 = v[1].u32 = v[2].u32 = v[3].u32 = 1;