mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-26 17:50:37 +01:00
v3dv: account for multisampling when computing subpass granularity
The granularity is defined by the tile size, which is also determined by multisampling. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13775>
This commit is contained in:
parent
0cb58f80d2
commit
4b3931ee6c
1 changed files with 7 additions and 0 deletions
|
|
@ -302,6 +302,7 @@ subpass_get_granularity(struct v3dv_device *device,
|
|||
struct v3dv_subpass *subpass = &pass->subpasses[subpass_idx];
|
||||
const uint32_t color_attachment_count = subpass->color_count;
|
||||
|
||||
bool msaa = false;
|
||||
uint32_t max_internal_bpp = 0;
|
||||
for (uint32_t i = 0; i < color_attachment_count; i++) {
|
||||
uint32_t attachment_idx = subpass->color_attachments[i].attachment;
|
||||
|
|
@ -315,6 +316,9 @@ subpass_get_granularity(struct v3dv_device *device,
|
|||
(format->rt_type, &internal_type, &internal_bpp);
|
||||
|
||||
max_internal_bpp = MAX2(max_internal_bpp, internal_bpp);
|
||||
|
||||
if (desc->samples > VK_SAMPLE_COUNT_1_BIT)
|
||||
msaa = true;
|
||||
}
|
||||
|
||||
uint32_t idx = 0;
|
||||
|
|
@ -323,6 +327,9 @@ subpass_get_granularity(struct v3dv_device *device,
|
|||
else if (color_attachment_count > 1)
|
||||
idx += 1;
|
||||
|
||||
if (msaa)
|
||||
idx += 2;
|
||||
|
||||
idx += max_internal_bpp;
|
||||
|
||||
assert(idx < ARRAY_SIZE(tile_sizes));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue