Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/device.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index f163e77fcf1..b4948fa50ac 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1175,6 +1175,18 @@ bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct win bo->b.map_ptr = NULL; bo->b.client_map_count = 0;
+ if (memory) + { + struct wined3d_allocator_chunk_gl *chunk = wined3d_allocator_chunk_gl(memory->chunk); + + wined3d_allocator_chunk_gl_lock(chunk); + + if ((bo->b.map_ptr = chunk->c.map_ptr)) + ++chunk->c.map_count; + + wined3d_allocator_chunk_gl_unlock(chunk); + } + return true; }