Mesa (gallium-array-textures): st/wgl: fix interface changes bugs

Roland Scheidegger sroland at kemper.freedesktop.org
Thu Jun 17 03:29:25 PDT 2010


Module: Mesa
Branch: gallium-array-textures
Commit: 5691db960ca3d525ce7d6c32d9c7a28f5e907f3b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5691db960ca3d525ce7d6c32d9c7a28f5e907f3b

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Thu Jun 17 11:29:03 2010 +0100

st/wgl: fix interface changes bugs

---

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

diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c
index ad9b234..733222a 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c
@@ -535,7 +535,7 @@ stw_framebuffer_present_locked(HDC hdc,
       data.magic2 = 0;
       data.AdapterLuid = stw_dev->AdapterLuid;
       data.rect = fb->client_rect;
-      data.pPrivateData = (void *)stw_surf;
+      data.pPrivateData = (void *)res;
 
       stw_notify_current_locked(fb);
       stw_framebuffer_release(fb);
diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.h b/src/gallium/state_trackers/wgl/stw_framebuffer.h
index 65d075e..6604e54 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.h
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.h
@@ -143,7 +143,7 @@ stw_framebuffer_from_hdc(
 BOOL
 stw_framebuffer_present_locked(HDC hdc,
                                struct stw_framebuffer *fb,
-                               struct pipe_context *res);
+                               struct pipe_resource *res);
 
 void
 stw_framebuffer_update(
diff --git a/src/gallium/state_trackers/wgl/stw_st.c b/src/gallium/state_trackers/wgl/stw_st.c
index 77bf304..40ea2f4 100644
--- a/src/gallium/state_trackers/wgl/stw_st.c
+++ b/src/gallium/state_trackers/wgl/stw_st.c
@@ -161,6 +161,9 @@ get_present_surface_locked(struct st_framebuffer_iface *stfb,
                            enum st_attachment_type statt)
 {
    struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
+#if 0
+   /* since we don't really have to get a surface for this we
+      no longer need a cache? */
    struct pipe_resource *ptex;
    struct pipe_resource *pres, **cache;
 
@@ -189,7 +192,10 @@ get_present_surface_locked(struct st_framebuffer_iface *stfb,
    if (pres != *cache)
       pipe_resource_reference(&pres, *cache);
 
-   return psurf;
+   return pres;
+#else
+   return stwfb->textures[statt];
+#endif
 }
 
 /**
@@ -203,7 +209,7 @@ stw_st_framebuffer_present_locked(struct st_framebuffer_iface *stfb,
    struct pipe_resource *pres;
 
    pres = get_present_surface_locked(&stwfb->base, statt);
-   if (psurf) {
+   if (pres) {
       stw_framebuffer_present_locked(stwfb->fb->hDC, stwfb->fb, pres);
       pipe_resource_reference(&pres, NULL);
    }



More information about the mesa-commit mailing list