st/wgl: pass st_context_iface into stw_st_framebuffer_present_locked
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 5 May 2020 19:59:22 +0000 (21:59 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 7 May 2020 22:38:03 +0000 (22:38 +0000)
We're going to need this to be able to resolve MSAA buffers.

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

src/gallium/state_trackers/wgl/stw_framebuffer.c
src/gallium/state_trackers/wgl/stw_st.c
src/gallium/state_trackers/wgl/stw_st.h

index 15d46dbb61eec5ae2498bbad5df2f52dd39118a9..4078d95287b8acca8a525412011a0fdef2ffb701 100644 (file)
@@ -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);
 }
 
 
index 2f686a1d6adb0a7f55596da0fced1d867739f3df..63f582a28b1e362386b457fa75bfea43d27cb0c5 100644 (file)
@@ -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);
 }
 
 
index 6bc218285a7bf3a2c0516501546caa57e10976f0..20d491fa609af0597aeeca4a4c71ca611c52f278 100644 (file)
@@ -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,