radv: when loading regs no need to add buffer
authorDave Airlie <airlied@redhat.com>
Mon, 6 Nov 2017 02:17:09 +0000 (02:17 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 6 Nov 2017 21:44:49 +0000 (21:44 +0000)
The function that calls us has just added the buffer to the
list already, no need to try and add it again.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c

index 4400ddab16bbee46379ae408da5bcb534beb5af6..8f6b8682af681070ffe5d7858015fb6448ea7217 100644 (file)
@@ -1340,7 +1340,6 @@ radv_load_depth_clear_regs(struct radv_cmd_buffer *cmd_buffer,
        if (!image->surface.htile_size)
                return;
 
-       cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, image->bo, 8);
 
        radeon_emit(cmd_buffer->cs, PKT3(PKT3_COPY_DATA, 4, 0));
        radeon_emit(cmd_buffer->cs, COPY_DATA_SRC_SEL(COPY_DATA_MEM) |
@@ -1424,7 +1423,6 @@ radv_load_color_clear_regs(struct radv_cmd_buffer *cmd_buffer,
                return;
 
        uint32_t reg = R_028C8C_CB_COLOR0_CLEAR_WORD0 + idx * 0x3c;
-       cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, image->bo, 8);
 
        radeon_emit(cmd_buffer->cs, PKT3(PKT3_COPY_DATA, 4, cmd_buffer->state.predicating));
        radeon_emit(cmd_buffer->cs, COPY_DATA_SRC_SEL(COPY_DATA_MEM) |