radeonsi: fix incorrect ordered_wave_id initilization for compute-based culling

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
This commit is contained in:
Marek Olšák 2020-03-20 17:32:11 -04:00 committed by Marge Bot
parent d89b19cfe1
commit 3381f2fa06
1 changed files with 2 additions and 1 deletions

View File

@ -485,10 +485,11 @@ void si_build_prim_discard_compute_shader(struct si_shader_context *ctx)
}
}
LLVMValueRef ordered_wave_id = ac_get_arg(&ctx->ac, param_ordered_wave_id);
LLVMValueRef ordered_wave_id = NULL;
/* Extract the ordered wave ID. */
if (VERTEX_COUNTER_GDS_MODE == 2) {
ordered_wave_id = ac_get_arg(&ctx->ac, param_ordered_wave_id);
ordered_wave_id = LLVMBuildLShr(builder, ordered_wave_id,
LLVMConstInt(ctx->ac.i32, 6, 0), "");
ordered_wave_id = LLVMBuildAnd(builder, ordered_wave_id,