summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/texture9.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine/texture9.c')
-rw-r--r--src/gallium/state_trackers/nine/texture9.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/texture9.c b/src/gallium/state_trackers/nine/texture9.c
index bf054cc3059..78ca4add4ae 100644
--- a/src/gallium/state_trackers/nine/texture9.c
+++ b/src/gallium/state_trackers/nine/texture9.c
@@ -330,9 +330,13 @@ NineTexture9_AddDirtyRect( struct NineTexture9 *This,
u_box_origin_2d(This->base.base.info.width0,
This->base.base.info.height0, &This->dirty_rect);
} else {
- struct pipe_box box;
- rect_to_pipe_box_clamp(&box, pDirtyRect);
- u_box_union_2d(&This->dirty_rect, &This->dirty_rect, &box);
+ if (This->dirty_rect.width == 0) {
+ rect_to_pipe_box_clamp(&This->dirty_rect, pDirtyRect);
+ } else {
+ struct pipe_box box;
+ rect_to_pipe_box_clamp(&box, pDirtyRect);
+ u_box_union_2d(&This->dirty_rect, &This->dirty_rect, &box);
+ }
(void) u_box_clip_2d(&This->dirty_rect, &This->dirty_rect,
This->base.base.info.width0,
This->base.base.info.height0);