iXit / wine-nine-standalone

Build Gallium Nine support on top of an existing WINE installation
GNU Lesser General Public License v2.1
276 stars 23 forks source link

Set _VARIABLE_REFRESH property to enable variable sync (FreeSync) #17

Closed aqxa1 closed 5 years ago

aqxa1 commented 5 years ago

Fixes #14

I don't have a detailed understanding of the codebase (or of D3D9) but all appears to work (tested with The Witcher and Oblivion), with kernel command drm.debug=0x04 indicating that variable sync is enabled.

siro20 commented 5 years ago

how do you test it to make sure it works?

aqxa1 commented 5 years ago

@siro20 Set drm.debug=0x04 on the kernel commandline. If VRR is working, you should see something like: [drm:update_freesync_state_on_stream.isra.45 [amdgpu]] VRR packet update: crtc=47 enabled=1 state=3 which will switch to enabled=0 once you switch away from a fullscreen application.

Better monitors than mine may have an indicator by the monitor itself, showing that it's working.

dhewg commented 5 years ago

Nice, I'll test this soon (tm), thanks!

axeldavy commented 5 years ago

The patch looks good to me. I wonder if it is possible to feel any difference with freesync, with and without thread_submit=true. thread_submit=true means we delay sending the buffers to the server until they are actually completly rendered (we wait in a secondary thread).

dhewg commented 5 years ago

Works as advertised, thanks for the patch! Stalker 1 always seems to miss vsync by a bit. Before this, fps dropped far below 60 quite a lot. With VRR, it's constant at 59.something, nice! thread_submit=true doesn't seem required anymore on my setup. It helped a lot before, but doesn't hurt now either. I'm not really sure, but tearfree_discard=true seems to stutter a little with VRR.