https://bugs.winehq.org/show_bug.cgi?id=54223
--- Comment #8 from CHECK_1234 CHECK_1234543212345@protonmail.com --- Update 4: Custom compiled with performance regression fixed
I changed dlls/wined3d/device.c I changed the code from:
-------------------------------------------------------------------------------
static bool use_buffer_chunk_suballocation(struct wined3d_device_gl *device_gl, const struct wined3d_gl_info *gl_info, GLenum binding) { switch (binding) { case GL_ARRAY_BUFFER: case GL_ATOMIC_COUNTER_BUFFER: case GL_DRAW_INDIRECT_BUFFER: case GL_PIXEL_UNPACK_BUFFER: case GL_UNIFORM_BUFFER: return true;
case GL_ELEMENT_ARRAY_BUFFER: /* There is no way to specify an element array buffer offset for * indirect draws in OpenGL. */ return device_gl->d.wined3d->flags & WINED3D_NO_DRAW_INDIRECT || !gl_info->supported[ARB_DRAW_INDIRECT];
case GL_TEXTURE_BUFFER: return gl_info->supported[ARB_TEXTURE_BUFFER_RANGE];
default: return false; } }
-------------------------------------------------------------------------------
to
-------------------------------------------------------------------------------
static bool use_buffer_chunk_suballocation(struct wined3d_device_gl *device_gl, const struct wined3d_gl_info *gl_info, GLenum binding) { switch (binding) { case GL_ARRAY_BUFFER: case GL_ATOMIC_COUNTER_BUFFER: case GL_DRAW_INDIRECT_BUFFER: case GL_PIXEL_UNPACK_BUFFER: case GL_UNIFORM_BUFFER: return false;
case GL_ELEMENT_ARRAY_BUFFER: /* There is no way to specify an element array buffer offset for * indirect draws in OpenGL. */ return false;
case GL_TEXTURE_BUFFER: return false;
default: return false; } }
-------------------------------------------------------------------------------
I had to use grep -r 'case GL_UNIFORM_BUFFER:' to find "case GL_UNIFORM_BUFFER:" which was the main one causing the performance regression because I did not find "case GL_UNIFORM_BUFFER:" at "dlls/wined3d/context_gl.c" according to the git bisect.
I recompiled and Wine DirectX11 to OpenGL performance regression gets fixed, but there there might be another performance regression with DirectX11 to OpenGL because scene 3's FPS is lower compared to Wine Staging 6.0.
⬤ Settings:
RX580 locked to 300Mhz core clock and 300Mhz memory clock Quality: Low Resolution: 1280x720 Fullscreen: Unchecked MAX CPU CLOCK SPEED: 2.5Ghz at 0.768V
⬤ Unigine Heaven Custom Wine 8.0-rc2 DX11 to OpenGL vs Wine Staging 6.0 DX11 to OpenGL
--------------------
Performance Regression Fixed Custom Wine 8.0-rc2 DX11 to OpenGL
Scene 2: Up to 100 FPS Scene 3: 67 FPS
Performance Regression Fixed Custom Custom Wine 8.0-rc2 DX9 to OpenGL
Scene 2: Up to 100 FPS Scene 3: 82 FPS
--------------------
Wine Staging 6.0 DX11 to OpenGL
Scene 2: 92 FPS Scene 3: 78 FPS
Wine Staging 6.0 DX9 to OpenGL
Scene 2: 92 FPS Scene 3: 80 FPS
--------------------
⬤ Conclusion
The "Performance Regression Fixed Custom Wine 8.0-rc2" DX11 to OpenGL might still have another performance regression because the FPS at scene 3 seems to lower than Wine Staging 6.0.
Hopefully this DirectX11 to OpenGL performance regression can be fully fixed by Wine 8.0 Stable.