diff options
author | Samuel Pitoiset <[email protected]> | 2019-02-05 20:22:00 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-02-12 17:25:52 +0100 |
commit | 8364ffe82349aee3aab79d0a62f1788752d1325c (patch) | |
tree | 65c4352e083644afaa2622ee4646bc8761decf85 | |
parent | 5f9379ca35be681fa12425d66b8b8bcf2b17481c (diff) |
radv: keep track of the number of remaining user SGPRs
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_nir_to_llvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index dbeae2aafde..29300aeab9f 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -588,6 +588,7 @@ set_loc_desc(struct radv_shader_context *ctx, int idx, uint8_t *sgpr_idx) struct user_sgpr_info { bool need_ring_offsets; bool indirect_all_descriptor_sets; + uint8_t remaining_sgprs; }; static bool needs_view_index_sgpr(struct radv_shader_context *ctx, @@ -701,6 +702,9 @@ static void allocate_user_sgprs(struct radv_shader_context *ctx, if (remaining_sgprs < num_desc_set) { user_sgpr_info->indirect_all_descriptor_sets = true; + user_sgpr_info->remaining_sgprs = remaining_sgprs - 1; + } else { + user_sgpr_info->remaining_sgprs = remaining_sgprs - num_desc_set; } } |