diff options
author | Vinson Lee <vlee@freedesktop.org> | 2021-03-28 20:34:41 -0700 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2021-03-31 21:04:50 -0700 |
commit | ddab9965897eb23fec7e27bc92d406db5440723c (patch) | |
tree | 5d0fe085cbff579f072c70b3369e676e34b6eb8a | |
parent | 3d1022382cc529c92c89fc6cb0f34df371220363 (diff) |
Remove leftover dead code.
Fix defect reported by Coverity Scan.
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return;.
Fixes: bdf93f4e3b3 ("v3dv/cmd_buffer: return early for draw commands if there is nothing to draw")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9890>
-rw-r--r-- | src/broadcom/vulkan/v3dv_cmd_buffer.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c index 4b5b7b552f9..2bbd57023a8 100644 --- a/src/broadcom/vulkan/v3dv_cmd_buffer.c +++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c @@ -4484,16 +4484,13 @@ v3dv_CmdDrawIndirect(VkCommandBuffer commandBuffer, uint32_t drawCount, uint32_t stride) { + /* drawCount is the number of draws to execute, and can be zero. */ if (drawCount == 0) return; V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer); V3DV_FROM_HANDLE(v3dv_buffer, buffer, _buffer); - /* drawCount is the number of draws to execute, and can be zero. */ - if (drawCount == 0) - return; - cmd_buffer_emit_pre_draw(cmd_buffer); struct v3dv_job *job = cmd_buffer->state.job; @@ -4522,16 +4519,13 @@ v3dv_CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, uint32_t drawCount, uint32_t stride) { + /* drawCount is the number of draws to execute, and can be zero. */ if (drawCount == 0) return; V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer); V3DV_FROM_HANDLE(v3dv_buffer, buffer, _buffer); - /* drawCount is the number of draws to execute, and can be zero. */ - if (drawCount == 0) - return; - cmd_buffer_emit_pre_draw(cmd_buffer); struct v3dv_job *job = cmd_buffer->state.job; |