diff options
author | Roland Scheidegger <[email protected]> | 2010-05-17 21:33:53 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-17 21:33:53 +0200 |
commit | 685bb6941681f89f71a9169594d87c8e314b94d0 (patch) | |
tree | 6fae118297312d8420b3fd9a1fb84315dbd93af7 | |
parent | a127e4709dcafa409dde25061481c130064a1c42 (diff) |
st/glx: adapt to interface changes
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_api.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_st.c | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index f3b0617f76b..a6f808bc964 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -342,6 +342,7 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil) const unsigned tex_usage = PIPE_BIND_DEPTH_STENCIL; const unsigned geom_flags = (PIPE_TEXTURE_GEOM_NON_SQUARE | PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO); + const unsigned sample_count = 0; enum pipe_format formats[8], fmt; int count, i; @@ -365,7 +366,8 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil) fmt = PIPE_FORMAT_NONE; for (i = 0; i < count; i++) { if (xmdpy->screen->is_format_supported(xmdpy->screen, formats[i], - target, tex_usage, geom_flags)) { + target, sample_count, + tex_usage, geom_flags)) { fmt = formats[i]; break; } diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c index 1c678b4f760..c62eb8bfbd1 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.c +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c @@ -96,7 +96,7 @@ xmesa_st_framebuffer_copy_textures(struct st_framebuffer_iface *stfbi, struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi); struct pipe_resource *src_ptex = xstfb->textures[src_statt]; struct pipe_resource *dst_ptex = xstfb->textures[dst_statt]; - struct pipe_surface *src, *dst; + struct pipe_subresource subsrc, subdst; struct pipe_context *pipe; if (!src_ptex || !dst_ptex) @@ -110,16 +110,14 @@ xmesa_st_framebuffer_copy_textures(struct st_framebuffer_iface *stfbi, xstfb->display->pipe = pipe; } - src = xstfb->screen->get_tex_surface(xstfb->screen, - src_ptex, 0, 0, 0, PIPE_BIND_BLIT_SOURCE); - dst = xstfb->screen->get_tex_surface(xstfb->screen, - dst_ptex, 0, 0, 0, PIPE_BIND_BLIT_DESTINATION); + subsrc.face = 0; + subsrc.level = 0; + subdst.face = 0; + subdst.level = 0; - if (src && dst) - pipe->surface_copy(pipe, dst, x, y, src, x, y, width, height); - - pipe_surface_reference(&src, NULL); - pipe_surface_reference(&dst, NULL); + if (src_ptex && dst_ptex) + pipe->resource_copy_region(pipe, dst_ptex, subdst, x, y, 0, + src_ptex, subsrc, x, y, 0, width, height); } /** |