radeonsi/gfx10: fix ngg_get_ordered_id
authorMarek Olšák <marek.olsak@amd.com>
Sat, 14 Dec 2019 05:56:50 +0000 (00:56 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Dec 2019 20:06:07 +0000 (20:06 +0000)
This could have caused issues with NGG streamout.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095>

src/gallium/drivers/radeonsi/gfx10_shader_ngg.c
src/gallium/drivers/radeonsi/si_shader_internal.h

index 6239b1ba466db69f5999b0c18c39730e468d1018..419a4021943b24afc348846cd17c1afef89c86ed 100644 (file)
@@ -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)
index ed46d8efe4b4c8dffc4d3525bd250bf997568241..a9b40f41b4cd726df5dc85d56deb32c68552eff9 100644 (file)
@@ -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
         */