v3dv: set render area for partial clears to match clear rect

While this was already being achieved by the scissort rect set on the
pipeline, we still want to limit the render area to we reduce the tile
coverage of the pass as much as possible and avoid unnecessar
tile load and store operations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-04-03 14:21:29 +02:00 committed by Marge Bot
parent ad64add4f5
commit f7059e4603
1 changed files with 3 additions and 2 deletions

View File

@ -551,8 +551,9 @@ emit_color_clear_rect(struct v3dv_cmd_buffer *cmd_buffer,
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
.renderPass = pipeline->pass,
.framebuffer = fb,
.renderArea = { .offset = { 0, 0 },
.extent = { fb_info.width, fb_info.height } },
.renderArea = {
.offset = { rect->rect.offset.x, rect->rect.offset.y },
.extent = { rect->rect.extent.width, rect->rect.extent.height } },
.clearValueCount = 0,
};