Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/texture.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 48202c2142c..d4c7082912b 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2695,6 +2695,8 @@ static void wined3d_texture_gl_download_data_slow_path(struct wined3d_texture_gl
if (temporary_mem) { + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); mem = temporary_mem; } else if (bo) @@ -2705,6 +2707,8 @@ static void wined3d_texture_gl_download_data_slow_path(struct wined3d_texture_gl } else { + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); mem = data->addr; }
@@ -2918,6 +2922,11 @@ static void wined3d_texture_gl_download_data(struct wined3d_context *context, checkGLcall("glBindBuffer"); offset += dst_bo->buffer_offset; } + else + { + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); + }
if (src_texture->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED) {
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/surface.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 060ac84b8b7..9a5b4cbff72 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -475,6 +475,11 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i checkGLcall("glBindBuffer"); offset += data.buffer_object->buffer_offset; } + else + { + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); + }
level = sub_resource_idx % texture->level_count; wined3d_texture_get_pitch(texture, level, &row_pitch, &slice_pitch);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/texture.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index d4c7082912b..26c35fd84dc 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -947,6 +947,9 @@ static void wined3d_texture_gl_allocate_mutable_storage(struct wined3d_texture_g TRACE("texture_gl %p, layer %u, level %u, target %#x, width %u, height %u.\n", texture_gl, layer, level, target, width, height);
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); + if (target == GL_TEXTURE_3D || target == GL_TEXTURE_2D_ARRAY) { depth = wined3d_texture_get_level_depth(&texture_gl->t, level);
On Tue, 30 Nov 2021 at 01:29, Zebediah Figura zfigura@codeweavers.com wrote:
@@ -947,6 +947,9 @@ static void wined3d_texture_gl_allocate_mutable_storage(struct wined3d_texture_g TRACE("texture_gl %p, layer %u, level %u, target %#x, width %u, height %u.\n", texture_gl, layer, level, target, width, height);
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("glBindBuffer");
Sure, but I don't think this needs to be inside the loop.
Also, "GL_PIXEL_UNPACK_BINDING" isn't a thing. There's GL_PIXEL_UNPACK_BUFFER_BINDING, but in that case it would probably have been best to use that in patches 1/4 and 2/4 as well.
On 11/30/21 11:10, Henri Verbeet wrote:
On Tue, 30 Nov 2021 at 01:29, Zebediah Figura zfigura@codeweavers.com wrote:
@@ -947,6 +947,9 @@ static void wined3d_texture_gl_allocate_mutable_storage(struct wined3d_texture_g TRACE("texture_gl %p, layer %u, level %u, target %#x, width %u, height %u.\n", texture_gl, layer, level, target, width, height);
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("glBindBuffer");
Sure, but I don't think this needs to be inside the loop.
Also, "GL_PIXEL_UNPACK_BINDING" isn't a thing. There's GL_PIXEL_UNPACK_BUFFER_BINDING, but in that case it would probably have been best to use that in patches 1/4 and 2/4 as well.
Nope, that was just a temporary bout of aphasia...
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/glsl_shader.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 4e51402f1cf..327e73796c8 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12956,6 +12956,9 @@ static void glsl_blitter_upload_palette(struct wined3d_glsl_blitter *blitter, gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); + if (palette) { gl_info->gl_ops.gl.p_glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, 256, 0, GL_BGRA,