radv/gfx10: fix ngg_get_ordered_id
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 17 Dec 2019 09:01:50 +0000 (10:01 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 17 Dec 2019 12:34:18 +0000 (12:34 +0000)
Ported from RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3133>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3133>

src/amd/vulkan/radv_nir_to_llvm.c
src/amd/vulkan/radv_shader_args.h

index 9637271b1b6e997cf591b7a0bef1ec4e2e7972bc..581513e3859a80870ce8210fe27ea6c783cfdb95 100644 (file)
@@ -2285,7 +2285,7 @@ static LLVMValueRef ngg_get_ordered_id(struct radv_shader_context *ctx)
 {
        return ac_build_bfe(&ctx->ac, ac_get_arg(&ctx->ac, ctx->args->gs_tg_info),
                            ctx->ac.i32_0,
-                           LLVMConstInt(ctx->ac.i32, 11, false),
+                           LLVMConstInt(ctx->ac.i32, 12, false),
                            false);
 }
 
index 0f57058bd6e70f9265e6953df9dbd702ae081a8e..3c7aceb638588b3a1dc72029acbeda8ce530b619 100644 (file)
@@ -50,7 +50,7 @@ struct radv_shader_args {
 
        /* 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
         */