https://bugs.winehq.org/show_bug.cgi?id=54659
--- Comment #2 from François Gouget fgouget@codeweavers.com --- Created attachment 74195 --> https://bugs.winehq.org/attachment.cgi?id=74195 Simplify reproducing the d3d8 gamma underflow crash
The attached patch simplifies reproducing the gamma underflow crash in d3d8:device by forcing the use of XF86VidMode{Get|Set}Gamma(), and adding options to test things out. It also adds some xvidmode traces.
To reproduce the crash run the following: ./wine dlls/d3d8/tests/i386-windows/d3d8_test.exe device break
The extended d3d8:device command line usage is: d3d8_test.exe device (truncate|roundup|high|low) [COUNT]
In all cases the test: * Resets the gamma to 1.0. * Creates and destroys COUNT swapchains. * Performs the truncate, roundup, high or low operation. * Creates and destroys COUNT swapchains again.
Where: * COUNT specifies how many swapchains to create and destroy. If omitted it defaults to 3. * truncate sets the FPU rounding mode to truncate and create+destroys a single swapchain with CREATE_DEVICE_FPU_PRESERVE. * roundup is the same but with round up rounding mode. * high uses SetDeviceGammaRamp() to set the gamma to a > 1.0 value. * low uses SetDeviceGammaRamp() to set the gamma to a < 1.0 value.
In the log look for the GenerateRampFromGamma and ComputeGammaFromRamp traces to observe gamma value changes. If possible add WINEDEBUG=xvidmode.