diff options
Diffstat (limited to 'src/gallium/state_trackers/nine/cubetexture9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/cubetexture9.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/cubetexture9.c b/src/gallium/state_trackers/nine/cubetexture9.c index 977a345552b..65251ad2b7e 100644 --- a/src/gallium/state_trackers/nine/cubetexture9.c +++ b/src/gallium/state_trackers/nine/cubetexture9.c @@ -285,10 +285,14 @@ NineCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This, This->base.base.info.height0, &This->dirty_rect[FaceType]); } else { - struct pipe_box box; - rect_to_pipe_box_clamp(&box, pDirtyRect); - u_box_union_2d(&This->dirty_rect[FaceType], &This->dirty_rect[FaceType], - &box); + if (This->dirty_rect[FaceType].width == 0) { + rect_to_pipe_box_clamp(&This->dirty_rect[FaceType], pDirtyRect); + } else { + struct pipe_box box; + rect_to_pipe_box_clamp(&box, pDirtyRect); + u_box_union_2d(&This->dirty_rect[FaceType], &This->dirty_rect[FaceType], + &box); + } (void) u_box_clip_2d(&This->dirty_rect[FaceType], &This->dirty_rect[FaceType], This->base.base.info.width0, |