mesa/main: account for RTT samples when updating framebuffer
authorItalo Nicola <italonicola@collabora.com>
Fri, 14 May 2021 11:25:42 +0000 (11:25 +0000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 1 Aug 2023 21:22:28 +0000 (21:22 +0000)
commit4d1a07c1a0ba6d308bed3ebbf77f24bb2ed03afc
tree430dbb0886ddae6ad1b4ddfbaa76dbe43640d988
parentba72946fa3799200a21ed35d55ff4017fa07db67
mesa/main: account for RTT samples when updating framebuffer

For EXT_multisampled_render_to_texture, we store the number of samples
in Attachment->NumSamples instead of Renderbuffer->NumSamples. This
meant that the previous code ignored that the framebuffer was
multisampled. Because of this, pipe_rasterizer_state::multisample is set
incorrectly, leading to visual artifacts on drivers that support MS-RTT
extension, such as panfrost.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10747>
src/mesa/main/framebuffer.c