diff options
author | Masanori Kakura <[email protected]> | 2016-12-28 22:21:02 +0900 |
---|---|---|
committer | Axel Davy <[email protected]> | 2017-01-12 20:33:11 +0100 |
commit | 9b5f5de9e9efd6a0c0f53806c0f4b5890c84f98b (patch) | |
tree | 2f7827d4d7f606b41adbc1540845c6695c10ca67 /src/gallium/state_trackers/nine/volumetexture9.c | |
parent | a5f0cdb36f9dd06866e62c7094939ccd62db7caa (diff) |
st/nine: Don't call u_box_union_* when dirty region is empty
When dirty region is empty, u_box_union_* incorrectly expands
the new region.
This fixes broken font rendering issue in WOLF RPG Editor v2.10 games.
Signed-off-by: Masanori Kakura <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/volumetexture9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/volumetexture9.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/volumetexture9.c b/src/gallium/state_trackers/nine/volumetexture9.c index 5c83fdb60ce..c836dd21023 100644 --- a/src/gallium/state_trackers/nine/volumetexture9.c +++ b/src/gallium/state_trackers/nine/volumetexture9.c @@ -222,9 +222,13 @@ NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This, This->dirty_box.height = This->base.base.info.height0; This->dirty_box.depth = This->base.base.info.depth0; } else { - struct pipe_box box; - d3dbox_to_pipe_box(&box, pDirtyBox); - u_box_union_3d(&This->dirty_box, &This->dirty_box, &box); + if (This->dirty_box.width == 0) { + d3dbox_to_pipe_box(&This->dirty_box, pDirtyBox); + } else { + 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); |