aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/buffer9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-12-13 01:10:15 +0100
committerAxel Davy <[email protected]>2016-12-20 23:44:23 +0100
commitddb6f1d2d138109b5716baf4d77683d5bf6cffc8 (patch)
treee348184bc1bb507957465a2ba97d8a2a00654c0c /src/gallium/state_trackers/nine/buffer9.c
parent4f344db8b0fdb08cdcba00d714309f27e073edf8 (diff)
st/nine: SYSTEMMEM ignores DISCARD.
Tests show SYSTEMMEM should ignore DISCARD. Prevents game bugs with following patches reimplementing DISCARD. Halo is affected. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/buffer9.c')
-rw-r--r--src/gallium/state_trackers/nine/buffer9.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/buffer9.c b/src/gallium/state_trackers/nine/buffer9.c
index 726408aed89..e497222434b 100644
--- a/src/gallium/state_trackers/nine/buffer9.c
+++ b/src/gallium/state_trackers/nine/buffer9.c
@@ -225,7 +225,11 @@ NineBuffer9_Lock( struct NineBuffer9 *This,
* D3DERR_WASSTILLDRAWING if the resource is in use, except for DYNAMIC.
* Our tests: some apps do use both DISCARD and NOOVERWRITE at the same
* time. On windows it seems to return different pointer, thus indicating
- * DISCARD is taken into account. */
+ * DISCARD is taken into account.
+ * Our tests: SYSTEMMEM doesn't DISCARD */
+
+ if (This->base.pool == D3DPOOL_SYSTEMMEM)
+ Flags &= ~D3DLOCK_DISCARD;
if (Flags & D3DLOCK_DISCARD)
usage = PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;