diff options
author | Axel Davy <[email protected]> | 2016-02-24 23:44:40 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-02-29 18:55:58 +0100 |
commit | 35c858c42c818d5bf5b4bfee03a342df52acface (patch) | |
tree | 3c06ab112c903b1e0b90f73bfda79ca74f0b8697 /src/gallium | |
parent | 8a8affdfdace486f4e416e66e2dd0ed122505a90 (diff) |
st/nine: Handle READONLY for buffer MANAGED pool
READONLY won't trigger an upload.
Cc: "11.2" <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/nine/buffer9.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/nine/buffer9.c b/src/gallium/state_trackers/nine/buffer9.c index e066fc59f45..8efb4cefb1f 100644 --- a/src/gallium/state_trackers/nine/buffer9.c +++ b/src/gallium/state_trackers/nine/buffer9.c @@ -174,13 +174,16 @@ NineBuffer9_Lock( struct NineBuffer9 *This, u_box_1d(OffsetToLock, SizeToLock, &box); if (This->base.pool == D3DPOOL_MANAGED) { - if (!This->managed.dirty) { - assert(LIST_IS_EMPTY(&This->managed.list)); - list_add(&This->managed.list, &This->base.base.device->update_buffers); - This->managed.dirty = TRUE; - This->managed.dirty_box = box; - } else { - u_box_union_2d(&This->managed.dirty_box, &This->managed.dirty_box, &box); + /* READONLY doesn't dirty the buffer */ + if (!(Flags & D3DLOCK_READONLY)) { + if (!This->managed.dirty) { + assert(LIST_IS_EMPTY(&This->managed.list)); + list_add(&This->managed.list, &This->base.base.device->update_buffers); + This->managed.dirty = TRUE; + This->managed.dirty_box = box; + } else { + u_box_union_2d(&This->managed.dirty_box, &This->managed.dirty_box, &box); + } } *ppbData = (char *)This->managed.data + OffsetToLock; DBG("returning pointer %p\n", *ppbData); |