mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 16:24:09 +00:00
wined3d: Set a valid map pointer in adapter_gl_alloc_bo() if possible.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
83fc1807f9
commit
5dd3b178ce
|
@ -4646,6 +4646,18 @@ static bool adapter_gl_alloc_bo(struct wined3d_device *device, struct wined3d_re
|
|||
return false;
|
||||
}
|
||||
|
||||
if (bo_gl->memory)
|
||||
{
|
||||
struct wined3d_allocator_chunk_gl *chunk = wined3d_allocator_chunk_gl(bo_gl->memory->chunk);
|
||||
|
||||
wined3d_allocator_chunk_gl_lock(chunk);
|
||||
|
||||
if ((bo_gl->b.map_ptr = chunk->c.map_ptr))
|
||||
++chunk->c.map_count;
|
||||
|
||||
wined3d_allocator_chunk_gl_unlock(chunk);
|
||||
}
|
||||
|
||||
addr->buffer_object = &bo_gl->b;
|
||||
addr->addr = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue