From: Marek Olšák Date: Sat, 14 Dec 2019 05:56:50 +0000 (-0500) Subject: radeonsi/gfx10: fix ngg_get_ordered_id X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43f05e0421344df0bc7ad2c37146e0ea3b2c1786;p=mesa.git radeonsi/gfx10: fix ngg_get_ordered_id This could have caused issues with NGG streamout. Reviewed-by: Pierre-Eric Pelloux-Prayer Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c index 6239b1ba466..419a4021943 100644 --- a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c +++ b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c @@ -60,7 +60,7 @@ static LLVMValueRef ngg_get_prim_cnt(struct si_shader_context *ctx) static LLVMValueRef ngg_get_ordered_id(struct si_shader_context *ctx) { - return si_unpack_param(ctx, ctx->gs_tg_info, 0, 11); + return si_unpack_param(ctx, ctx->gs_tg_info, 0, 12); } static LLVMValueRef ngg_get_query_buf(struct si_shader_context *ctx) diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index ed46d8efe4b..a9b40f41b4c 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -181,7 +181,7 @@ struct si_shader_context { struct ac_arg es2gs_offset; /* HW GS */ /* On gfx10: - * - bits 0..10: ordered_wave_id + * - bits 0..11: ordered_wave_id * - bits 12..20: number of vertices in group * - bits 22..30: number of primitives in group */