From 43f05e0421344df0bc7ad2c37146e0ea3b2c1786 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 14 Dec 2019 00:56:50 -0500 Subject: [PATCH] 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: --- src/gallium/drivers/radeonsi/gfx10_shader_ngg.c | 2 +- src/gallium/drivers/radeonsi/si_shader_internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 */ -- 2.30.2