https://bugs.winehq.org/show_bug.cgi?id=51836
Bug ID: 51836 Summary: d3d: Disable CSMT by default if using llvmpipe OpenGL renderer backend Product: Wine Version: 6.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: jinoh.kang.kr@gmail.com Distribution: ---
llvmpipe is a software-only OpenGL implementation. It compiles GLSL shaders into native CPU code using LLVM, offering reasonable graphics performance on systems where hardware graphics acceleration is otherwise not available.
The problem is that llvmpipe does not play nicely with Wine's CSMT feature. CSMT assumes the OpenGL backend to be a proxy that submits rendering commands to GPU, rather than a full-blown computation engine itself. The source and sink of the comman stream is the CPU itself, and llvmpipe supports direct multithreading -- making CSMT redundant.
For testing/benchmark, llvmpipe can be activated on Linux with the environment variable `LIBGL_ALWAYS_SOFTWARE=1`. With CSMT, perf shows `wined3d_cs_mt_finish` to be the major overhead; without CSMT, the bottleneck is absent and the app exhibits noticeable performance improvement.
Example glxinfo output on system with llvmpipe enabled:
OpenGL vendor string: Mesa/X.org OpenGL renderer string: llvmpipe (LLVM 11.0.0, 256 bits) ... Extended renderer info (GLX_MESA_query_renderer): Vendor: Mesa/X.org (0xffffffff) Device: llvmpipe (LLVM 11.0.0, 256 bits) (0xffffffff)
https://bugs.winehq.org/show_bug.cgi?id=51836
--- Comment #1 from Jinoh Kang jinoh.kang.kr@gmail.com --- On older Mesa versions:
OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits) ... (ditto for strings)
https://bugs.winehq.org/show_bug.cgi?id=51836
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- Broadly speaking, what you're probably seeing is bug 44315. I.e. we shouldn't stall waiting for the CS thread in so many cases.
I think we need the CS thread for other reasons that have to do with OpenGL context/threading rules (e.g. queries need to be started and ended on the same context?), but I'm a bit fuzzy on the details.
https://bugs.winehq.org/show_bug.cgi?id=51836
jank9525 thieujank@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thieujank@gmail.com
--- Comment #3 from jank9525 thieujank@gmail.com --- Its more or less the same for me . No difference
https://bugs.winehq.org/show_bug.cgi?id=51836
Jinoh Kang jinoh.kang.kr@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE
--- Comment #4 from Jinoh Kang jinoh.kang.kr@gmail.com --- Cannot reproduce on latest Wine. Assuming duplicate of bug 44315 for now.
*** This bug has been marked as a duplicate of bug 44315 ***
https://bugs.winehq.org/show_bug.cgi?id=51836
Jinoh Kang jinoh.kang.kr@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Jinoh Kang jinoh.kang.kr@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=51836
Jinoh Kang jinoh.kang.kr@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|d3d: Disable CSMT by |d3d: CSMT performance drop |default if using llvmpipe |if using llvmpipe OpenGL |OpenGL renderer backend |renderer backend