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 <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23484>
This commit is contained in:
Dave Airlie
2023-06-07 11:25:49 +10:00
committed by Marge Bot
parent 976dd26004
commit c20df7e22e
3 changed files with 1 additions and 11 deletions
@@ -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);
@@ -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
-2
View File
@@ -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