[Mesa-dev] [PATCH 27/71] st/nine: fix failing wine test device.c test_lockrect_invalid()
Axel Davy
axel.davy at ens.fr
Sun Aug 16 08:27:51 PDT 2015
From: Patrick Rudolph <siro at das-labor.org>
Mimic WindowsXp behaviour and allow negative values in the rectangle passed.
Add comment to point out behaviour used.
Reviewed-by: Axel Davy <axel.davy at ens.fr>
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
src/gallium/state_trackers/nine/surface9.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index eb941ce..d20e62a 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);
}
--
2.1.0
More information about the mesa-dev
mailing list