st/nine: Implement Managed vertex/index buffers
authorAxel Davy <axel.davy@ens.fr>
Sat, 6 Feb 2016 12:39:58 +0000 (13:39 +0100)
committerAxel Davy <axel.davy@ens.fr>
Fri, 12 Feb 2016 22:26:36 +0000 (23:26 +0100)
commitcc0114f30b587a10766ec212afb3ad356099ef23
tree0a1c7bb8e508d73a04977e85af25c2a6eaa9cd68
parent77d6c11f8fa87ba1070028cb036807dc8a115633
st/nine: Implement Managed vertex/index buffers

We were implementing those the same way than
the default pool, which is sub-optimal.

The buffer is supposed to return pointer to
a ram copy when user locks, and automatically
update the vram copy when needed.

v2: Rename NineBuffer9_Validate to NineBuffer9_Upload
Rename validate_buffers to update_managed_buffers
Initialize NineBuffer9 managed fields after the resource
is allocated. In case of allocation failure, when the dtor
is executed, This->base.pool is then rightfully set.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/buffer9.c
src/gallium/state_trackers/nine/buffer9.h
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/device9.h
src/gallium/state_trackers/nine/nine_state.c