projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb1c2c2
)
st/nine: Allow lock coordinates outside range
author
Patrick Rudolph
<siro@das-labor.org>
Mon, 20 Apr 2015 17:26:55 +0000
(19:26 +0200)
committer
Axel Davy
<axel.davy@ens.fr>
Fri, 21 Aug 2015 20:21:46 +0000
(22:21 +0200)
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 <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
src/gallium/state_trackers/nine/surface9.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/nine/surface9.c
b/src/gallium/state_trackers/nine/surface9.c
index eb941ce8a4f362c4a589313e39a24c599b2610fd..d20e62a897f96a0dc5853a3ff3c7df23936b860b 100644
(file)
--- 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);
}