[PATCH] wined3d: Set a valid map pointer in adapter_gl_alloc_bo() if possible.
From: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- v2: Adjusted commit message, otherwise unmodified. This supersedes patch 227319. dlls/wined3d/adapter_gl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index cb0c34823aa..4e93e25452d 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -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; -- 2.30.2
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=108535 Your paranoid android. === debian11 (build log) === error: patch failed: dlls/wined3d/adapter_gl.c:4646 Task: Patch failed to apply === debian11 (build log) === error: patch failed: dlls/wined3d/adapter_gl.c:4646 Task: Patch failed to apply
participants (2)
-
Henri Verbeet -
Marvin