radv: remove radv_userdata_info::indirect field
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 25 Jan 2019 08:21:31 +0000 (09:21 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 28 Jan 2019 15:30:33 +0000 (16:30 +0100)
Always false.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_nir_to_llvm.c
src/amd/vulkan/radv_shader.h

index 2b17fbb339c765cc0c686556e04b5a9bdba21156..aae9029084143a2e1e58debfb060ce1d54ce2841 100644 (file)
@@ -589,7 +589,6 @@ radv_emit_userdata_address(struct radv_cmd_buffer *cmd_buffer,
                return;
 
        assert(loc->num_sgprs == 1);
-       assert(!loc->indirect);
 
        radv_emit_shader_pointer(cmd_buffer->device, cmd_buffer->cs,
                                 base_reg + loc->sgpr_idx * 4, va, false);
@@ -4158,7 +4157,6 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer,
                }
 
                if (loc->sgpr_idx != -1) {
-                       assert(!loc->indirect);
                        assert(loc->num_sgprs == 3);
 
                        radeon_set_sh_reg_seq(cs, R_00B900_COMPUTE_USER_DATA_0 +
index 91cbce42d6aa756d403c34ce99d487af58d4f313..31cbcd996a4e2c9fa673eedf102838d9e7e7041a 100644 (file)
@@ -553,11 +553,10 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module,
 
 static void
 set_loc(struct radv_userdata_info *ud_info, uint8_t *sgpr_idx,
-       uint8_t num_sgprs, bool indirect)
+       uint8_t num_sgprs)
 {
        ud_info->sgpr_idx = *sgpr_idx;
        ud_info->num_sgprs = num_sgprs;
-       ud_info->indirect = indirect;
        *sgpr_idx += num_sgprs;
 }
 
@@ -569,7 +568,7 @@ set_loc_shader(struct radv_shader_context *ctx, int idx, uint8_t *sgpr_idx,
                &ctx->shader_info->user_sgprs_locs.shader_data[idx];
        assert(ud_info);
 
-       set_loc(ud_info, sgpr_idx, num_sgprs, false);
+       set_loc(ud_info, sgpr_idx, num_sgprs);
 }
 
 static void
@@ -581,18 +580,16 @@ set_loc_shader_ptr(struct radv_shader_context *ctx, int idx, uint8_t *sgpr_idx)
 }
 
 static void
-set_loc_desc(struct radv_shader_context *ctx, int idx,  uint8_t *sgpr_idx,
-            bool indirect)
+set_loc_desc(struct radv_shader_context *ctx, int idx, uint8_t *sgpr_idx)
 {
        struct radv_userdata_locations *locs =
                &ctx->shader_info->user_sgprs_locs;
        struct radv_userdata_info *ud_info = &locs->descriptor_sets[idx];
        assert(ud_info);
 
-       set_loc(ud_info, sgpr_idx, 1, indirect);
+       set_loc(ud_info, sgpr_idx, 1);
 
-       if (!indirect)
-               locs->descriptor_sets_enabled |= 1 << idx;
+       locs->descriptor_sets_enabled |= 1 << idx;
 }
 
 struct user_sgpr_info {
@@ -851,7 +848,7 @@ set_global_input_locs(struct radv_shader_context *ctx, gl_shader_stage stage,
                for (unsigned i = 0; i < num_sets; ++i) {
                        if ((ctx->shader_info->info.desc_set_used_mask & (1 << i)) &&
                            ctx->options->layout->set[i].layout->shader_stages & stage_mask) {
-                               set_loc_desc(ctx, i, user_sgpr_idx, false);
+                               set_loc_desc(ctx, i, user_sgpr_idx);
                        } else
                                ctx->descriptor_sets[i] = NULL;
                }
index a1d38b3ce127b578bcb2922b474d5fe54f698d93..3652a811e80491a8e2f3c746fd91bb6f9b92b108 100644 (file)
@@ -213,7 +213,6 @@ struct radv_shader_info {
 struct radv_userdata_info {
        int8_t sgpr_idx;
        uint8_t num_sgprs;
-       bool indirect;
 };
 
 struct radv_userdata_locations {