summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2015-04-20 19:26:55 +0200
committerAxel Davy <[email protected]>2015-08-21 22:21:46 +0200
commit9ba3f83592730e98cb5be0fbc88f1e40ff5471a8 (patch)
tree2e368d07afa87577c9d5732cb9d87e98f20c9edf
parentbb1c2c2aa3b15ee1fdf8b8085cc1ca9f8ef04ed9 (diff)
st/nine: Allow lock coordinates outside range
This fixes wine test device.c test_lockrect_invalid() Mimic WindowsXp behaviour and allow negative values in the rectangle passed. Add comment to point out behaviour used. Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
-rw-r--r--src/gallium/state_trackers/nine/surface9.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index eb941ce8a4f..d20e62a897f 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -363,13 +363,9 @@ NineSurface9_LockRect( struct NineSurface9 *This,
usage |= PIPE_TRANSFER_DONTBLOCK;
if (pRect) {
+ /* Windows XP accepts invalid locking rectangles, Windows 7 rejects
+ * them. Use Windows XP behaviour for now. */
rect_to_pipe_box(&box, pRect);
- if (u_box_clip_2d(&box, &box, This->desc.Width,
- This->desc.Height) < 0) {
- DBG("pRect clipped by Width=%u Height=%u\n",
- This->desc.Width, This->desc.Height);
- return D3DERR_INVALIDCALL;
- }
} else {
u_box_origin_2d(This->desc.Width, This->desc.Height, &box);
}