diff options
author | Dave Airlie <[email protected]> | 2016-10-10 03:20:36 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-10-19 10:17:48 +1000 |
commit | b0e11a153c4b8cd9bf29bdb8e26a776de241a5b4 (patch) | |
tree | 92b906dcddf195e9e52cd8a83239b2a6b793dbe8 /src/amd/common/ac_nir_to_llvm.c | |
parent | 6c3bd1cdb3c60a0140b57a2064e02f5869b0f9bc (diff) |
radv: start using defines for the user sgpr offsets
This adds some comments and adds defines for the user sgprs,
so that we can move them around easier later and not have
to change/revalidate every one of these.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_nir_to_llvm.c')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 56814ecf588..4b5f043d3af 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -334,9 +334,12 @@ static void create_function(struct nir_to_llvm_context *ctx, unsigned array_count = 0; unsigned sgpr_count = 0, user_sgpr_count; unsigned i; + + /* 1 for each descriptor set */ for (unsigned i = 0; i < 4; ++i) arg_types[arg_idx++] = const_array(ctx->i8, 1024 * 1024); + /* 1 for push constants and dynamic descriptors */ arg_types[arg_idx++] = const_array(ctx->i8, 1024 * 1024); array_count = arg_idx; @@ -351,7 +354,7 @@ static void create_function(struct nir_to_llvm_context *ctx, arg_types[arg_idx++] = LLVMVectorType(ctx->i32, 3); break; case MESA_SHADER_VERTEX: - arg_types[arg_idx++] = const_array(ctx->v16i8, 16); + arg_types[arg_idx++] = const_array(ctx->v16i8, 16); /* vertex buffers */ arg_types[arg_idx++] = ctx->i32; // base vertex arg_types[arg_idx++] = ctx->i32; // start instance user_sgpr_count = sgpr_count = arg_idx; @@ -361,7 +364,7 @@ static void create_function(struct nir_to_llvm_context *ctx, arg_types[arg_idx++] = ctx->i32; // instance id break; case MESA_SHADER_FRAGMENT: - arg_types[arg_idx++] = const_array(ctx->f32, 32); + arg_types[arg_idx++] = const_array(ctx->f32, 32); /* sample positions */ user_sgpr_count = arg_idx; arg_types[arg_idx++] = ctx->i32; /* prim mask */ sgpr_count = arg_idx; |