From c20df7e22e6af3e58c79b8413e2cf41aee2b6220 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 7 Jun 2023 11:25:49 +1000 Subject: [PATCH] gallivm/nir: fix shuffleup tests. So the shuffleup tests did a shuffle up with const 5, we'd use invocation id (0..8) shuffle it down by 5, get (-5..3), then call llvmshufflevector with that which is totally illegal. There might be a nicer way to fix this, but I can't see it straight away, just bail on the fast path. Fixes: dEQP-VK.subgroups.shuffle.compute.subgroupshuffleup* Cc: mesa-stable Reviewed-by: Mike Blumenkrantz Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 8 +------- src/gallium/frontends/lavapipe/ci/lvp-fails.txt | 2 -- src/virtio/ci/venus-fails.txt | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index 10c74a8..a936681 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -2318,13 +2318,7 @@ static void emit_shuffle(struct lp_build_nir_context *bld_base, LLVMValueRef src uint32_t index_bit_size = nir_src_bit_size(instr->src[1]); struct lp_build_context *int_bld = get_int_bld(bld_base, true, bit_size); - bool index_is_constant_data = LLVMIsAConstantAggregateZero(index) || LLVMIsAConstantDataSequential(index) || LLVMIsAUndefValue(index); - - if (index_is_constant_data) { - /* freeze `src` in case inactive invocations contain poison */ - src = LLVMBuildFreeze(builder, src, ""); - result[0] = LLVMBuildShuffleVector(builder, src, LLVMGetUndef(LLVMTypeOf(src)), index, ""); - } else if (util_get_cpu_caps()->has_avx2 && bit_size == 32 && index_bit_size == 32 && int_bld->type.length == 8) { + if (util_get_cpu_caps()->has_avx2 && bit_size == 32 && index_bit_size == 32 && int_bld->type.length == 8) { /* freeze `src` in case inactive invocations contain poison */ src = LLVMBuildFreeze(builder, src, ""); result[0] = lp_build_intrinsic_binary(builder, "llvm.x86.avx2.permd", int_bld->vec_type, src, index); diff --git a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt index d2a869a..5e970d8 100644 --- a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt +++ b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt @@ -5,5 +5,3 @@ dEQP-VK.rasterization.provoking_vertex.transform_feedback.per_pipeline.triangle_ # New CTS failures in 1.3.5.0 dEQP-VK.api.info.format_properties.g10x6_b10x6r10x6_2plane_420_unorm_3pack16,Fail -# since Debian 12 CI uprev -dEQP-VK.subgroups.shuffle.compute.subgroupshuffleup_double_constant,Crash diff --git a/src/virtio/ci/venus-fails.txt b/src/virtio/ci/venus-fails.txt index be9f5c6..133cbcc 100644 --- a/src/virtio/ci/venus-fails.txt +++ b/src/virtio/ci/venus-fails.txt @@ -14,5 +14,3 @@ dEQP-VK.pipeline.extended_dynamic_state.between_pipelines.enable_raster,Fail dEQP-VK.pipeline.extended_dynamic_state.cmd_buffer_start.enable_raster,Fail dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.enable_raster,Fail dEQP-VK.memory_model.message_passing.ext.u64.noncoherent.atomic_atomic.atomicwrite.device.payload_local.physbuffer.guard_local.image.comp,Fail -# since Debian 12 uprev -dEQP-VK.subgroups.shuffle.graphics.subgroupshuffleup_i64vec4_constant,Crash -- 2.7.4