summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/cubetexture9.c4
-rw-r--r--src/gallium/state_trackers/nine/texture9.c3
-rw-r--r--src/gallium/state_trackers/nine/volumetexture9.c9
3 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/cubetexture9.c b/src/gallium/state_trackers/nine/cubetexture9.c
index 98fe887072c..edea1f28a8d 100644
--- a/src/gallium/state_trackers/nine/cubetexture9.c
+++ b/src/gallium/state_trackers/nine/cubetexture9.c
@@ -276,6 +276,10 @@ NineCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This,
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,
+ This->base.base.info.height0);
}
return D3D_OK;
}
diff --git a/src/gallium/state_trackers/nine/texture9.c b/src/gallium/state_trackers/nine/texture9.c
index 5b5fd551a80..c1d1343b273 100644
--- a/src/gallium/state_trackers/nine/texture9.c
+++ b/src/gallium/state_trackers/nine/texture9.c
@@ -310,6 +310,9 @@ NineTexture9_AddDirtyRect( struct NineTexture9 *This,
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);
}
return D3D_OK;
}
diff --git a/src/gallium/state_trackers/nine/volumetexture9.c b/src/gallium/state_trackers/nine/volumetexture9.c
index b5661731764..8f1de13ce5f 100644
--- a/src/gallium/state_trackers/nine/volumetexture9.c
+++ b/src/gallium/state_trackers/nine/volumetexture9.c
@@ -223,6 +223,15 @@ NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This,
struct pipe_box box;
d3dbox_to_pipe_box(&box, pDirtyBox);
u_box_union_3d(&This->dirty_box, &This->dirty_box, &box);
+ This->dirty_box.x = MAX2(This->dirty_box.x, 0);
+ This->dirty_box.y = MAX2(This->dirty_box.y, 0);
+ This->dirty_box.z = MAX2(This->dirty_box.z, 0);
+ This->dirty_box.width = MIN2(This->dirty_box.width,
+ This->base.base.info.width0 - This->dirty_box.x);
+ This->dirty_box.height = MIN2(This->dirty_box.height,
+ This->base.base.info.height0 - This->dirty_box.y);
+ This->dirty_box.depth = MIN2(This->dirty_box.depth,
+ This->base.base.info.depth0 - This->dirty_box.z);
}
return D3D_OK;
}