diff options
author | Timur Kristóf <[email protected]> | 2019-10-03 19:32:48 +0200 |
---|---|---|
committer | Timur Kristóf <[email protected]> | 2019-10-10 09:57:53 +0200 |
commit | d729d8f1dcc26f39e4b57a093f80a75f8a6f02e7 (patch) | |
tree | e251fa4aff51d3e7133aa03e60aa00e8cf6627e2 /src | |
parent | a89153d03815dfe56d5521276eaad8cd9087ee0d (diff) |
aco: Add extra assertion for number of FS input VGPRs.
Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/compiler/aco_instruction_selection_setup.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index c72d5c23834..973b9c70780 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -30,6 +30,7 @@ #include "vulkan/radv_descriptor_set.h" #include "sid.h" #include "ac_exp_param.h" +#include "ac_shader_util.h" #include "util/u_math.h" @@ -1053,6 +1054,12 @@ void add_startpgm(struct isel_context *ctx) ctx->program->info->num_user_sgprs = user_sgpr_info.num_sgpr; ctx->program->info->num_input_vgprs = args.num_vgprs_used; + if (ctx->stage == fragment_fs) { + /* Verify that we have a correct assumption about input VGPR count */ + ASSERTED unsigned input_vgpr_cnt = ac_get_fs_input_vgpr_cnt(ctx->program->config, nullptr, nullptr); + assert(input_vgpr_cnt == ctx->program->info->num_input_vgprs); + } + aco_ptr<Pseudo_instruction> startpgm{create_instruction<Pseudo_instruction>(aco_opcode::p_startpgm, Format::PSEUDO, 0, args.count + 1)}; for (unsigned i = 0; i < args.count; i++) { if (args.assign[i]) { |