mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 23:40:12 +01:00
tc: set resolve on renderpass info if blit terminates the renderpass
this avoids a scenario where invalidate happens after a non-winsys blit for a renderpass and the driver skips storing framebuffer contents because the invalidate flag is set cc: mesa-stable Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30750>
This commit is contained in:
parent
38f4501a5c
commit
2fa52bf6e5
1 changed files with 16 additions and 4 deletions
|
|
@ -4527,10 +4527,22 @@ tc_blit(struct pipe_context *_pipe, const struct pipe_blit_info *info)
|
|||
tc_set_resource_batch_usage(tc, info->src.resource);
|
||||
tc_set_resource_reference(&blit->info.src.resource, info->src.resource);
|
||||
memcpy(&blit->info, info, sizeof(*info));
|
||||
if (tc->options.parse_renderpass_info) {
|
||||
tc->renderpass_info_recording->has_resolve = info->src.resource->nr_samples > 1 &&
|
||||
info->dst.resource->nr_samples <= 1 &&
|
||||
tc->fb_resolve == info->dst.resource;
|
||||
|
||||
/* filter out untracked non-resolves */
|
||||
if (!tc->options.parse_renderpass_info ||
|
||||
info->src.resource->nr_samples <= 1 ||
|
||||
info->dst.resource->nr_samples > 1)
|
||||
return;
|
||||
|
||||
if (tc->fb_resolve == info->dst.resource) {
|
||||
tc->renderpass_info_recording->has_resolve = true;
|
||||
} else {
|
||||
for (unsigned i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
|
||||
if (tc->fb_resources[i] == info->src.resource) {
|
||||
tc->renderpass_info_recording->has_resolve = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue