mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 21:50:34 +01:00
tu: Support multisample image clears
We may need shader workarounds for some formats, but for now this seems to work at least as well as the gmem path for clearing multisample attachments. And soon we'll start calling this even on the gmem path, since we leave the final decision of whether to use sysmem or not up till the end, so we can't have it assert or otherwise working tests would assert. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3713>
This commit is contained in:
parent
a5fb515301
commit
ab3db20cb5
1 changed files with 6 additions and 1 deletions
|
|
@ -268,7 +268,12 @@ void tu_blit(struct tu_cmd_buffer *cmdbuf, struct tu_cs *cs,
|
|||
/* unsupported format cleared as UINT32 */
|
||||
if (blt->dst.fmt == VK_FORMAT_E5B9G9R9_UFLOAT_PACK32)
|
||||
blt->dst.fmt = VK_FORMAT_R32_UINT;
|
||||
assert(blt->dst.samples == 1); /* TODO */
|
||||
/* TODO: multisample image clearing also seems not to work with certain
|
||||
* formats. The blob uses a shader-based clear in these cases.
|
||||
*/
|
||||
blt->dst.x *= blt->dst.samples;
|
||||
blt->dst.width *= blt->dst.samples;
|
||||
blt->dst.samples = 1;
|
||||
blt->src = blt->dst;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue