nir/lower_tex: Handle sized tex destination types

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>
This commit is contained in:
Connor Abbott 2020-12-08 12:40:31 +01:00
parent 65f7b93435
commit acd6616eab

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 (type == nir_type_float)
if (nir_alu_type_get_base_type(type) == nir_type_float)
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;