f80159a1
by Henri Verbeet at 2025-12-09T10:51:13+01:00
wined3d: Do not set "context_gl->needs_set" in wined3d_context_gl_release().
Commit ce44dd0ba41b88f6b8eb626863c3358b75aca66c got rid of
wined3d_context_gl_restore_pixel_format(), but seemingly inverted the
condition under which wined3d_context_gl_release() set the "needs_set"
flag. Previously the flag was set when
wined3d_context_gl_restore_pixel_format() changed the pixel format, and
now it's set when it doesn't. I.e., always.
Setting the "needs_set" flag causes wined3d_context_gl_activate() to
call wined3d_context_gl_set_gl_context(), which sets the pixel format and
makes the GL context current. These are expensive operations. This
commit improves performance in the rthdribl demo from a fairly
disappointing 1-2 fps to a more reasonable 70-80 fps on my Intel Skylake
setup. On my AMD gfx1200 setup the difference is less dramatic but still
quite significant, going from about 250 fps to about 350 fps.
It's perhaps worth pointing out that after this commit things are still
some way off from what they were on Wine 10.0: 150-160 fps on the Intel
setup, and about 450 fps on the AMD setup.