ac/nir: Assert GS input index is constant
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 20 Aug 2019 10:43:33 +0000 (12:43 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Fri, 23 Aug 2019 09:05:31 +0000 (11:05 +0200)
If it's not we silently ignore indir_index which is definitely a bug.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_nir_to_llvm.c

index e6795bac97a6f594dbcac904c83658f769ed02b4..0878017f60d754a488a46c72882d8cedfe91178c 100644 (file)
@@ -2067,6 +2067,7 @@ static LLVMValueRef visit_load_var(struct ac_nir_context *ctx,
                        unsigned const_index, vertex_index;
                        get_deref_offset(ctx, deref, false, &vertex_index, NULL,
                                         &const_index, &indir_index);
+                       assert(indir_index == NULL);
 
                        return ctx->abi->load_inputs(ctx->abi, var->data.location,
                                                     var->data.driver_location,