ac/nir: handle nir_intrinsic_load_first_vertex like base_vertex
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Apr 2018 14:58:24 +0000 (16:58 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Apr 2018 15:07:38 +0000 (17:07 +0200)
This fixes a ton of CTS crashes.

Fixes: c366f422f0 ("nir: Offset vertex_id by first_vertex instead of base_vertex")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index f00091e825651065b729e5a0a82f3af96ff79554..ba7f353a9ab367290db906fdfa35e0ff57d98b2c 100644 (file)
@@ -2815,10 +2815,10 @@ static void visit_intrinsic(struct ac_nir_context *ctx,
                result = ac_build_gather_values(&ctx->ac, values, 3);
                break;
        }
-       case nir_intrinsic_load_base_vertex: {
+       case nir_intrinsic_load_base_vertex:
+       case nir_intrinsic_load_first_vertex:
                result = ctx->abi->load_base_vertex(ctx->abi);
                break;
-       }
        case nir_intrinsic_load_local_group_size:
                result = ctx->abi->load_local_group_size(ctx->abi);
                break;