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.
From: Zebediah Figura zfigura@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 5292297bb85..72e3bc6f98d 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -5946,6 +5946,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;
From: Zebediah Figura zfigura@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 72e3bc6f98d..f512aefb709 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -6031,6 +6031,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);
From: Zebediah Figura zfigura@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 f512aefb709..721ffdc3c09 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -5321,8 +5321,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);