[PATCH v2 0/3] MR450: wined3d: Do not pause transform feedback after every draw call.
test_index_buffer_offset() occasionally fails (on some machines and/or Mesa versions) due to a bug in radeonsi. Although the bug has since been fixed upstream, I ended up writing these patches for it, and since they reduce GL calls I'm inclined to believe they're a good idea regardless. The relevant Mesa bug is <https://gitlab.freedesktop.org/mesa/mesa/-/issues/6138>. -- v2: wined3d: Do not pause transform feedback after every draw call. wined3d: Pause transform feedback in wined3d_context_gl_draw_textured_quad(). wined3d: Pause transform feedback in wined3d_context_gl_draw_shaded_quad(). https://gitlab.winehq.org/wine/wine/-/merge_requests/450
From: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/wined3d/context_gl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 0d80aa8596f..a2d06039caa 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -5944,6 +5944,8 @@ void wined3d_context_gl_draw_shaded_quad(struct wined3d_context_gl *context_gl, apply_texture_blit_state(gl_info, &texture_gl->texture_rgb, info.bind_target, level, filter); gl_info->gl_ops.gl.p_glTexParameteri(info.bind_target, GL_TEXTURE_MAX_LEVEL, level); + wined3d_context_gl_pause_transform_feedback(context_gl, FALSE); + wined3d_context_gl_get_rt_size(context_gl, &dst_size); w = dst_size.cx; h = dst_size.cy; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/450
From: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/wined3d/context_gl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index a2d06039caa..7e00aa40d4c 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -6029,6 +6029,8 @@ void wined3d_context_gl_draw_textured_quad(struct wined3d_context_gl *context_gl gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); checkGLcall("glTexEnvi"); + wined3d_context_gl_pause_transform_feedback(context_gl, FALSE); + /* Draw a quad. */ gl_info->gl_ops.gl.p_glBegin(GL_TRIANGLE_STRIP); gl_info->gl_ops.gl.p_glTexCoord3fv(&info.texcoords[0].x); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/450
From: Zebediah Figura <zfigura(a)codeweavers.com> Besides being unnecessary, this triggers a bug in radeonsi (since fixed upstream), which can cause failures in d3d10core and d3d11 tests. --- dlls/wined3d/context_gl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 7e00aa40d4c..7679a0ffb20 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -5319,8 +5319,6 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s checkGLcall("glMemoryBarrier"); } - wined3d_context_gl_pause_transform_feedback(context_gl, FALSE); - if (rasterizer_discard) { glDisable(GL_RASTERIZER_DISCARD); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/450
This merge request was approved by Alexandre Julliard. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/450
participants (3)
-
Alexandre Julliard (@julliard) -
Zebediah Figura -
Zebediah Figura (@zfigura)