summaryrefslogtreecommitdiff
path: root/src/gallium/frontends/glx/xlib/xm_st.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/frontends/glx/xlib/xm_st.c')
-rw-r--r--src/gallium/frontends/glx/xlib/xm_st.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gallium/frontends/glx/xlib/xm_st.c b/src/gallium/frontends/glx/xlib/xm_st.c
index 04068a62656..b14f9acc90e 100644
--- a/src/gallium/frontends/glx/xlib/xm_st.c
+++ b/src/gallium/frontends/glx/xlib/xm_st.c
@@ -60,7 +60,8 @@ xmesa_st_framebuffer(struct st_framebuffer_iface *stfbi)
static bool
xmesa_st_framebuffer_display(struct st_framebuffer_iface *stfbi,
struct st_context_iface *stctx,
- enum st_attachment_type statt)
+ enum st_attachment_type statt,
+ struct pipe_box *box)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
struct pipe_resource *ptex = xstfb->textures[statt];
@@ -77,7 +78,7 @@ xmesa_st_framebuffer_display(struct st_framebuffer_iface *stfbi,
pres = xstfb->display_resource;
}
- xstfb->screen->flush_frontbuffer(xstfb->screen, pctx, pres, 0, 0, &xstfb->buffer->ws, NULL);
+ xstfb->screen->flush_frontbuffer(xstfb->screen, pctx, pres, 0, 0, &xstfb->buffer->ws, box);
return true;
}
@@ -267,7 +268,7 @@ xmesa_st_framebuffer_flush_front(struct st_context_iface *stctx,
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
bool ret;
- ret = xmesa_st_framebuffer_display(stfbi, stctx, statt);
+ ret = xmesa_st_framebuffer_display(stfbi, stctx, statt, NULL);
if (ret && xmesa_strict_invalidate)
xmesa_check_buffer_size(xstfb->buffer);
@@ -349,7 +350,7 @@ xmesa_swap_st_framebuffer(struct st_framebuffer_iface *stfbi)
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
bool ret;
- ret = xmesa_st_framebuffer_display(stfbi, NULL, ST_ATTACHMENT_BACK_LEFT);
+ ret = xmesa_st_framebuffer_display(stfbi, NULL, ST_ATTACHMENT_BACK_LEFT, NULL);
if (ret) {
struct pipe_resource **front, **back, *tmp;
@@ -379,8 +380,15 @@ xmesa_copy_st_framebuffer(struct st_framebuffer_iface *stfbi,
int x, int y, int w, int h)
{
xmesa_st_framebuffer_copy_textures(stfbi, src, dst, x, y, w, h);
- if (dst == ST_ATTACHMENT_FRONT_LEFT)
- xmesa_st_framebuffer_display(stfbi, NULL, dst);
+ if (dst == ST_ATTACHMENT_FRONT_LEFT) {
+ struct pipe_box box = {};
+
+ box.x = x;
+ box.y = y;
+ box.width = w;
+ box.height = h;
+ xmesa_st_framebuffer_display(stfbi, NULL, src, &box);
+ }
}