From: Iago Toral Quiroga <[email protected]>
v2 (Sam):
- Use helper to get type size from nir_alu_type enum.
---
src/compiler/nir/nir_lower_tex.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
index 4999603..a58385a 100644
--- a/src/compiler/nir/nir_lower_tex.c
+++ b/src/compiler/nir/nir_lower_tex.c
@@ -226,7 +226,8 @@ get_zero_or_one(nir_builder *b, nir_alu_type type, uint8_t
swizzle_val)
v.u32[0] = v.u32[1] = v.u32[2] = v.u32[3] = 0;
} else {
assert(swizzle_val == 5);
- if (type == nir_type_float)
+ assert(nir_alu_type_get_type_size(type) < 64);
+ if (type == nir_type_float32)
v.f32[0] = v.f32[1] = v.f32[2] = v.f32[3] = 1.0;
else
v.u32[0] = v.u32[1] = v.u32[2] = v.u32[3] = 1;
--
2.5.0
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev