From bc4412144452db243c85c0d27821bea9922aa81e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 16 Aug 2023 14:45:19 -0400 Subject: [PATCH] ac: document ac_shader_args::gs_vtx_offset Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/common/ac_shader_args.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_shader_args.h b/src/amd/common/ac_shader_args.h index df96e90..5882e85 100644 --- a/src/amd/common/ac_shader_args.h +++ b/src/amd/common/ac_shader_args.h @@ -102,7 +102,22 @@ struct ac_shader_args { struct ac_arg gs2vs_offset; /* legacy GS */ struct ac_arg gs_wave_id; /* legacy GS */ struct ac_arg gs_attr_offset; /* gfx11+: attribute ring offset in 512B increments */ - struct ac_arg gs_vtx_offset[6]; /* GFX6-8: [0-5], GFX9+: [0-2] packed */ + + /* GS vertex indices/offsets: + * + * GFX6-8: [0-5] 6x uint32, multiplied by VGT_ESGS_RING_ITEMSIZE by hw + * GFX9-11 non-passthrough: [0-2] 6x packed uint16, multiplied by VGT_ESGS_RING_ITEMSIZE by hw + * + * GFX10-11 passthrough: [0] 1x uint32 with the following bitfields matching the prim export: + * [0:8] vertex index 0 + * [9] edgeflag 0 + * [10:18] vertex index 1 + * [19] edgeflag 1 + * [20:28] vertex index 2 + * [29] edgeflag 2 + * [31] 0 (valid prim) + */ + struct ac_arg gs_vtx_offset[6]; struct ac_arg gs_prim_id; struct ac_arg gs_invocation_id; -- 2.7.4