From acd6616eab8099f1d8f6692fdab26d64967767c1 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 8 Dec 2020 12:40:31 +0100 Subject: [PATCH] nir/lower_tex: Handle sized tex destination types Reviewed-by: Jason Ekstrand Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_lower_tex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index f5708a62680..ce4ab666e9c 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -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;