"Denver Gingerich" denver@ossguy.com wrote:
This patch allows the user to specify a list of default refresh rates to use at particular resolutions to override the default behavior that chooses the refresh rate based on whichever mode is first in the list for a given resolution. The list is specified by populating the X11 Driver/DefaultRefreshRates registry key with a semicolon-delimited list of resolution, refresh rate pairs.
What's really needs to be done is writing the tests to investigate what Windows does in that case, and make the tests pass in Wine.
On Mon, Mar 3, 2008 at 6:03 AM, Dmitry Timoshkov dmitry@codeweavers.com wrote:
"Denver Gingerich" denver@ossguy.com wrote:
This patch allows the user to specify a list of default refresh rates to use at particular resolutions to override the default behavior that chooses the refresh rate based on whichever mode is first in the list for a given resolution. The list is specified by populating the X11 Driver/DefaultRefreshRates registry key with a semicolon-delimited list of resolution, refresh rate pairs.
What's really needs to be done is writing the tests to investigate what Windows does in that case, and make the tests pass in Wine.
The only way I could see of modifying the default refresh rate under Windows is to change it through Display Settings. Unfortunately, not all Wine platforms have this option. On my system, where the Nvidia binary driver automatically constructs a list of modes (there are no ModeLine entries in xorg.conf), there does not appear to be a mechanism for modifying the mode list.
I suppose the proper solution would be to modify the Nvidia binary driver to allow for modification of the mode list (and modify any other drivers that don't provide that mechanism). While I generally like proper solutions, I don't think that is a practical option because we don't have access to the Nvidia binary driver source code yet those with Nvidia cards have to use it for DirectDrawRenderer=opengl and RenderTargetLockMode=readtex.
If I find the time, I will try to construct a test case in the next few days and run it on Windows and Wine to see what happens. If someone on the list is interested, though, I would appreciate if they did it instead. I don't have a development environment setup on Windows at this point.
Regardless of the outcome of the test cases, I would still like to see DefaultRefreshRates implemented in Wine for the reasons above. Unless someone can tell me how to change the mode ordering in the OS with the Nvidia driver, I can't see any way to choose different default refresh rates for the various resolutions. I would appreciate if others could comment on whether their video card driver allows the mode ordering to be changed.
Denver
"Denver Gingerich" denver@ossguy.com wrote:
The only way I could see of modifying the default refresh rate under Windows is to change it through Display Settings. Unfortunately, not all Wine platforms have this option. On my system, where the Nvidia binary driver automatically constructs a list of modes (there are no ModeLine entries in xorg.conf), there does not appear to be a mechanism for modifying the mode list.
Why do you need to modify the modes list? You need to figure out how Windows chooses from the list of available modes when refresh rate is not specified. Does it select first/best/any from the list?
On Mon, Mar 3, 2008 at 10:25 AM, Dmitry Timoshkov dmitry@codeweavers.com wrote:
"Denver Gingerich" denver@ossguy.com wrote:
The only way I could see of modifying the default refresh rate under Windows is to change it through Display Settings. Unfortunately, not all Wine platforms have this option. On my system, where the Nvidia binary driver automatically constructs a list of modes (there are no ModeLine entries in xorg.conf), there does not appear to be a mechanism for modifying the mode list.
Why do you need to modify the modes list?
Using the current Wine code (without this patch), modifying the modes list so that a particular refresh rate appears first in the list is the only way that I can see to specify a default refresh rate for a given resolution. This is because the current Wine code chooses the first mode that matches the resolution if no refresh rate is specified even if there are other modes with the same resolution but different refresh rates.
I think what you're saying is that Wine's current behavior (pick the first mode with matching resolution) does not necessarily reflect Windows' behavior so testing needs to be done to see what algorithm Windows uses to determine the refresh rate when it isn't specified. Correct me if I'm wrong.
You need to figure out how Windows chooses from the list of available modes when refresh rate is not specified. Does it select first/best/any from the list?
This test definitely needs to be done. I will hopefully have time in the next few days but if someone else beats me to it, I won't complain.
Denver