[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 4/6] wined3d: Always map the whole OpenGL buffer.
From: Zebediah Figura <zfigura () codeweavers ! com>
Date: 2021-11-30 23:55:20
Message-ID: 20211130235522.368456-4-zfigura () codeweavers ! com
[Download RAW message or body]
From: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
---
dlls/wined3d/context_gl.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 675c26ac6fe..700ccace2e5 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -2712,7 +2712,8 @@ map:
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
{
- map_ptr = GL_EXTCALL(glMapBufferRange(bo->binding, offset, size, \
wined3d_resource_gl_map_flags(bo, flags))); + if ((map_ptr = \
GL_EXTCALL(glMapBufferRange(bo->binding, 0, bo->size, \
wined3d_resource_gl_map_flags(bo, flags))))) + map_ptr += offset;
}
else
{
@@ -2757,11 +2758,12 @@ static void flush_bo_ranges(struct wined3d_context_gl \
*context_gl, const struct
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
{
+ /* The offset passed to glFlushMappedBufferRange() is relative to the
+ * mapped range, but we map the whole buffer anyway. */
for (i = 0; i < range_count; ++i)
{
- /* The offset passed to glFlushMappedBufferRange() is relative to
- * the mapped range, so don't add data->addr in this case. */
- GL_EXTCALL(glFlushMappedBufferRange(bo->binding, ranges[i].offset, \
ranges[i].size)); + GL_EXTCALL(glFlushMappedBufferRange(bo->binding,
+ bo->b.buffer_offset + (uintptr_t)data->addr + ranges[i].offset, \
ranges[i].size)); }
}
else if (gl_info->supported[APPLE_FLUSH_BUFFER_RANGE])
--
2.32.0
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic