summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2014-09-28 17:17:22 +0200
committerEmil Velikov <[email protected]>2014-10-03 01:27:34 +0100
commited440234d4111322ff8d23fa137db9944bcc5a72 (patch)
treeedf16173ba2d290a43369183e09bb5fbbbf78220 /src
parentd95520d2972b9b26192f1fc733e51af8dfad8e1d (diff)
st/xa: Fix regression in xa_yuv_planar_blit()
Commit "st/xa: scissor to help tilers" broke xa_yuv_planar_blit() and vmwgfx textured video. Fix this by implementing scissors also in the yuv draw path. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Cc: Rob Clark <[email protected]> Cc: "10.2 10.3" <[email protected]> (cherry picked from commit 46537f1d03ba6de83be70ac574f633bb4342a327)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xa/xa_renderer.c11
-rw-r--r--src/gallium/state_trackers/xa/xa_yuv.c1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xa/xa_renderer.c b/src/gallium/state_trackers/xa/xa_renderer.c
index 121d8ed3b9b..780b24777af 100644
--- a/src/gallium/state_trackers/xa/xa_renderer.c
+++ b/src/gallium/state_trackers/xa/xa_renderer.c
@@ -530,11 +530,22 @@ renderer_draw_yuv(struct xa_context *r,
src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h, srf);
+ if (!r->scissor_valid) {
+ r->scissor.minx = 0;
+ r->scissor.miny = 0;
+ r->scissor.maxx = r->dst->tex->width0;
+ r->scissor.maxy = r->dst->tex->height0;
+ }
+
+ r->pipe->set_scissor_states(r->pipe, 0, 1, &r->scissor);
+
cso_set_vertex_elements(r->cso, num_attribs, r->velems);
util_draw_user_vertex_buffer(r->cso, r->buffer, PIPE_PRIM_QUADS,
4, /* verts */
num_attribs); /* attribs/vert */
r->buffer_size = 0;
+
+ xa_scissor_reset(r);
}
void
diff --git a/src/gallium/state_trackers/xa/xa_yuv.c b/src/gallium/state_trackers/xa/xa_yuv.c
index 43f56ff0515..15196392ac7 100644
--- a/src/gallium/state_trackers/xa/xa_yuv.c
+++ b/src/gallium/state_trackers/xa/xa_yuv.c
@@ -146,6 +146,7 @@ xa_yuv_planar_blit(struct xa_context *r,
int w = box->x2 - box->x1;
int h = box->y2 - box->y1;
+ xa_scissor_update(r, x, y, box->x2, box->y2);
renderer_draw_yuv(r,
(float)src_x + scale_x * (x - dst_x),
(float)src_y + scale_y * (y - dst_y),