Zebediah Figura : wined3d: Allow OpenGL pixel unpack buffer objects to be suballocated from a larger buffer.
Alexandre Julliard
julliard at winehq.org
Mon Nov 22 16:05:16 CST 2021
Module: wine
Branch: master
Commit: 9c9b5768205ec39b588af2be711b60aa2b023516
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9c9b5768205ec39b588af2be711b60aa2b023516
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Fri Nov 19 17:23:47 2021 -0600
wined3d: Allow OpenGL pixel unpack buffer objects to be suballocated from a larger buffer.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/texture.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index d164819a10a..072092e73be 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2553,14 +2553,17 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context,
}
else
{
+ const uint8_t *offset = bo.addr;
+
if (bo.buffer_object)
{
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, wined3d_bo_gl(bo.buffer_object)->id));
checkGLcall("glBindBuffer");
+ offset += bo.buffer_object->buffer_offset;
}
wined3d_texture_gl_upload_bo(src_format, target, level, src_row_pitch, src_slice_pitch, dst_x,
- dst_y, dst_z, update_w, update_h, update_d, bo.addr, srgb, dst_texture, gl_info);
+ dst_y, dst_z, update_w, update_h, update_d, offset, srgb, dst_texture, gl_info);
if (bo.buffer_object)
{
More information about the wine-cvs
mailing list