mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-23 20:10:36 +01:00
pvr: Fix incorrect subpass merging optimisation
The subpass merging optimisation check for when subpasses are using
tile buffers was in the incorrect location.
The current check is in a function called from two places but only
the first of these should have been doing the optimisation check.
This was incorrectly affecting the number of renders that subpass
merging could avoid.
Partial fix for:
dEQP-VK.renderpass.*.attachment_allocation.input_output.71
Fixes: 10b6a0d567 ("pvr: Add support for generating render pass hw setup data.")
Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40002>
This commit is contained in:
parent
0ea39c6305
commit
0640ac7e3b
1 changed files with 7 additions and 10 deletions
|
|
@ -1759,16 +1759,6 @@ pvr_is_subpass_space_available(const struct pvr_device_info *dev_info,
|
|||
&sp_dsts->color[i]);
|
||||
if (result != VK_SUCCESS)
|
||||
goto err_free_alloc;
|
||||
|
||||
/* Avoid merging subpasses which result in tile buffers having to be
|
||||
* used. The benefit of merging must be weighed against the cost of
|
||||
* writing/reading to tile buffers.
|
||||
*/
|
||||
if (ctx->hw_render &&
|
||||
sp_dsts->color[i].type != USC_MRT_RESOURCE_TYPE_OUTPUT_REG) {
|
||||
result = vk_error(NULL, VK_ERROR_TOO_MANY_OBJECTS);
|
||||
goto err_free_alloc;
|
||||
}
|
||||
} else {
|
||||
sp_dsts->color[i].type = USC_MRT_RESOURCE_TYPE_INVALID;
|
||||
}
|
||||
|
|
@ -1915,6 +1905,13 @@ pvr_can_combine_with_render(const struct pvr_device_info *dev_info,
|
|||
if (result != VK_SUCCESS)
|
||||
return false;
|
||||
|
||||
/* Avoid merging subpasses which result in tile buffers having to be
|
||||
* used. The benefit of merging must be weighed against the cost of
|
||||
* writing/reading to tile buffers.
|
||||
*/
|
||||
if (ctx->hw_render && new_alloc->tile_buffers_count > 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue