radv: remove unnecessary verification code around ring_offsets_idx
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 10 Jul 2018 14:13:39 +0000 (16:13 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 12 Jul 2018 09:08:42 +0000 (11:08 +0200)
I don't want to waste CPU cycles for nothing.

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_private.h

index 09b4b364b4f57fceb914a21e5da25b3d48d87f83..41435d0649e28fc80966870f9c41994d31f532de 100644 (file)
@@ -310,8 +310,6 @@ radv_reset_cmd_buffer(struct radv_cmd_buffer *cmd_buffer)
 
        cmd_buffer->record_result = VK_SUCCESS;
 
-       cmd_buffer->ring_offsets_idx = -1;
-
        for (unsigned i = 0; i < VK_PIPELINE_BIND_POINT_RANGE_SIZE; i++) {
                cmd_buffer->descriptors[i].dirty = 0;
                cmd_buffer->descriptors[i].valid = 0;
@@ -2699,15 +2697,6 @@ void radv_CmdBindPipeline(
 
                if (radv_pipeline_has_tess(pipeline))
                        cmd_buffer->tess_rings_needed = true;
-
-               if (radv_pipeline_has_gs(pipeline)) {
-                       struct radv_userdata_info *loc = radv_lookup_user_sgpr(cmd_buffer->state.pipeline, MESA_SHADER_GEOMETRY,
-                                                                            AC_UD_SCRATCH_RING_OFFSETS);
-                       if (cmd_buffer->ring_offsets_idx == -1)
-                               cmd_buffer->ring_offsets_idx = loc->sgpr_idx;
-                       else if (loc->sgpr_idx != -1)
-                               assert(loc->sgpr_idx == cmd_buffer->ring_offsets_idx);
-               }
                break;
        default:
                assert(!"invalid bind point");
@@ -2895,12 +2884,6 @@ void radv_CmdExecuteCommands(
                if (secondary->sample_positions_needed)
                        primary->sample_positions_needed = true;
 
-               if (secondary->ring_offsets_idx != -1) {
-                       if (primary->ring_offsets_idx == -1)
-                               primary->ring_offsets_idx = secondary->ring_offsets_idx;
-                       else
-                               assert(secondary->ring_offsets_idx == primary->ring_offsets_idx);
-               }
                primary->device->ws->cs_execute_secondary(primary->cs, secondary->cs);
 
 
index 488d579e50af3ba98a4cabfe31c7811b7067ff29..338cb07b3e1e2f0bd9ccde45389a603dc5d8cd87 100644 (file)
@@ -1040,7 +1040,6 @@ struct radv_cmd_buffer {
 
        VkResult record_result;
 
-       int ring_offsets_idx; /* just used for verification */
        uint32_t gfx9_fence_offset;
        struct radeon_winsys_bo *gfx9_fence_bo;
        uint32_t gfx9_fence_idx;