From ee1ab0a687bd7f2e49fe157de58f59f351d69cd9 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Wed, 26 Jul 2023 23:07:54 +0200 Subject: [PATCH] llvmpipe: Zero extend vectors in widen_to_simd_width Extending using the first element vould extend the exec_mask (-1, 0, 0, 0) to (-1, 0, 0, 0, -1, -1, -1, -1). Fixes: 573b8f2 ("gallivm: Implement vulkan textures") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9435 Reviewed-by: Dave Airlie Reviewed-by: Roland Scheidegger Part-of: (cherry picked from commit 0a07431e9a298991c84b07d2b0e44b051d88a065) --- .pick_status.json | 2 +- src/gallium/auxiliary/gallivm/lp_bld_jit_sample.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 19a43e95dea..effb720b8ea 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -22694,7 +22694,7 @@ "description": "llvmpipe: Zero extend vectors in widen_to_simd_width", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "573b8f23c295d57507de7a36a9177f5e9a6ee1cd", "notes": null diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_jit_sample.c index 0eb2d07129d..b82e00350c6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_jit_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_sample.c @@ -101,7 +101,7 @@ widen_to_simd_width(struct gallivm_state *gallivm, LLVMValueRef value) if (i < element_count) elements[i] = LLVMBuildExtractElement(builder, value, lp_build_const_int32(gallivm, i), ""); else - elements[i] = elements[0]; + elements[i] = LLVMConstNull(element_type); } LLVMTypeRef result_type = LLVMVectorType(element_type, lp_native_vector_width / 32);