mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
wgl: Support a single-buffered winsys framebuffer
Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
This commit is contained in:
parent
f733215c12
commit
b6a2972455
2 changed files with 10 additions and 2 deletions
|
|
@ -169,8 +169,9 @@ stw_st_framebuffer_validate_locked(struct st_context *st,
|
|||
* drawing. A fake front texture is needed to handle that scenario.
|
||||
* For MSAA, we just need to make sure that the back buffer also
|
||||
* exists, so we can blt to it during flush_frontbuffer. */
|
||||
if (mask & ST_ATTACHMENT_FRONT_LEFT_MASK &&
|
||||
stwfb->fb->winsys_framebuffer) {
|
||||
if ((mask & ST_ATTACHMENT_FRONT_LEFT_MASK) &&
|
||||
stwfb->fb->winsys_framebuffer &&
|
||||
(stwfb->stvis.buffer_mask & ST_ATTACHMENT_BACK_LEFT_MASK)) {
|
||||
if (stwfb->stvis.samples <= 1)
|
||||
stwfb->needs_fake_front = true;
|
||||
else
|
||||
|
|
@ -488,6 +489,9 @@ stw_st_framebuffer_flush_front(struct st_context *st,
|
|||
/* fake front texture is now invalid */
|
||||
p_atomic_inc(&stwfb->base.stamp);
|
||||
need_swap_textures = true;
|
||||
} else if (stwfb->fb->winsys_framebuffer &&
|
||||
stwfb->fb->winsys_framebuffer->flush_frontbuffer) {
|
||||
stwfb->fb->winsys_framebuffer->flush_frontbuffer(stwfb->fb->winsys_framebuffer, pipe);
|
||||
}
|
||||
|
||||
if (need_swap_textures) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ struct stw_winsys_framebuffer
|
|||
struct pipe_resource *
|
||||
(*get_resource)(struct stw_winsys_framebuffer *fb,
|
||||
enum st_attachment_type statt);
|
||||
|
||||
void
|
||||
(*flush_frontbuffer)(struct stw_winsys_framebuffer *fb,
|
||||
struct pipe_context *context);
|
||||
};
|
||||
|
||||
struct stw_winsys
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue