Mesa (master): st/wgl: pass st_context_iface into stw_st_framebuffer_present_locked

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 7 22:55:38 UTC 2020


Module: Mesa
Branch: master
Commit: 947bb04fcc03c9c1b8a04a6b3cd7f86825e6f244
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=947bb04fcc03c9c1b8a04a6b3cd7f86825e6f244

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue May  5 21:59:22 2020 +0200

st/wgl: pass st_context_iface into stw_st_framebuffer_present_locked

We're going to need this to be able to resolve MSAA buffers.

Acked-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4926>

---

 src/gallium/state_trackers/wgl/stw_framebuffer.c | 2 +-
 src/gallium/state_trackers/wgl/stw_st.c          | 8 +++++---
 src/gallium/state_trackers/wgl/stw_st.h          | 3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c
index 15d46dbb61e..4078d95287b 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c
@@ -656,7 +656,7 @@ DrvSwapBuffers(HDC hdc)
       wait_swap_interval(fb);
    }
 
-   return stw_st_swap_framebuffer_locked(hdc, fb->stfb);
+   return stw_st_swap_framebuffer_locked(hdc, ctx->st, fb->stfb);
 }
 
 
diff --git a/src/gallium/state_trackers/wgl/stw_st.c b/src/gallium/state_trackers/wgl/stw_st.c
index 2f686a1d6ad..63f582a28b1 100644
--- a/src/gallium/state_trackers/wgl/stw_st.c
+++ b/src/gallium/state_trackers/wgl/stw_st.c
@@ -175,6 +175,7 @@ stw_st_framebuffer_validate(struct st_context_iface *stctx,
  */
 static bool
 stw_st_framebuffer_present_locked(HDC hdc,
+                                  struct st_context_iface *stctx,
                                   struct st_framebuffer_iface *stfb,
                                   enum st_attachment_type statt)
 {
@@ -212,7 +213,7 @@ stw_st_framebuffer_flush_front(struct st_context_iface *stctx,
 
    hDC = GetDC(stwfb->fb->hWnd);
 
-   ret = stw_st_framebuffer_present_locked(hDC, &stwfb->base, statt);
+   ret = stw_st_framebuffer_present_locked(hDC, stctx, &stwfb->base, statt);
 
    ReleaseDC(stwfb->fb->hWnd, hDC);
 
@@ -268,7 +269,8 @@ stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb)
  * Swap the buffers of the given framebuffer.
  */
 bool
-stw_st_swap_framebuffer_locked(HDC hdc, struct st_framebuffer_iface *stfb)
+stw_st_swap_framebuffer_locked(HDC hdc, struct st_context_iface *stctx,
+                               struct st_framebuffer_iface *stfb)
 {
    struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
    unsigned front = ST_ATTACHMENT_FRONT_LEFT, back = ST_ATTACHMENT_BACK_LEFT;
@@ -293,7 +295,7 @@ stw_st_swap_framebuffer_locked(HDC hdc, struct st_framebuffer_iface *stfb)
    stwfb->texture_mask = mask;
 
    front = ST_ATTACHMENT_FRONT_LEFT;
-   return stw_st_framebuffer_present_locked(hdc, &stwfb->base, front);
+   return stw_st_framebuffer_present_locked(hdc, stctx, &stwfb->base, front);
 }
 
 
diff --git a/src/gallium/state_trackers/wgl/stw_st.h b/src/gallium/state_trackers/wgl/stw_st.h
index 6bc218285a7..20d491fa609 100644
--- a/src/gallium/state_trackers/wgl/stw_st.h
+++ b/src/gallium/state_trackers/wgl/stw_st.h
@@ -47,7 +47,8 @@ void
 stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb);
 
 bool
-stw_st_swap_framebuffer_locked(HDC hdc, struct st_framebuffer_iface *stfb);
+stw_st_swap_framebuffer_locked(HDC hdc, struct st_context_iface *stctx,
+                               struct st_framebuffer_iface *stfb);
 
 struct pipe_resource *
 stw_get_framebuffer_resource(struct st_framebuffer_iface *stfb,



More information about the mesa-commit mailing list