Speed of gdi vs opengl DirectDrawRenderer

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Feb 20 16:16:54 CST 2015


On 19/02/15 21:45, Ken Thomases wrote:
[snip]
> Basically, GDI32 and USER32 can overdrive the drawing loop without having to wait for the GPU or the refresh cycle.

Great, thanks for the explanation! That's indeed exactly what this game
seems to need. It generates and tries to display a new screen per game
step, but there's no need to display them all.

> See if the game has a setting for disabling vsync.  If it doesn't, try setting:
> 
> [HKEY_CURRENT_USER\Software\Wine\Mac Driver]
> "AllowVerticalSync"="n"
> 
> Does that help?

The game has an option to disable it, but just to make sure I also added
the registry key. It didn't make a (noticeable) difference.

> Others would understand better why the OpenGL renderer is slow.  Does your system support 16-bit display modes?

I don't know:

trace:wgl:init_pixel_formats renderer_properties 0:
trace:wgl:dump_renderer Renderer ID: 0x00022700
trace:wgl:dump_renderer Buffer modes:
trace:wgl:dump_renderer     Monoscopic:    YES
trace:wgl:dump_renderer     Stereoscopic:  NO
trace:wgl:dump_renderer     Single buffer: YES
trace:wgl:dump_renderer     Double buffer: YES
trace:wgl:dump_renderer Color buffer modes:
trace:wgl:dump_renderer     Color size 15, Alpha size 0
trace:wgl:dump_renderer     Color size 32, Alpha size 8
trace:wgl:dump_renderer     Color size 64, Alpha size 16, Float
trace:wgl:dump_renderer     Color size 128, Alpha size 32, Float
trace:wgl:dump_renderer Accumulation buffer sizes: { 128, }
trace:wgl:dump_renderer Depth buffer sizes: { 0, 16, 24, }
trace:wgl:dump_renderer Stencil buffer sizes: { 0, 8, }
trace:wgl:dump_renderer Max. Auxiliary Buffers: 2
trace:wgl:dump_renderer Max. Sample Buffers: 1
trace:wgl:dump_renderer Max. Samples: 8
trace:wgl:dump_renderer Offscreen: NO
trace:wgl:dump_renderer Accelerated: YES
trace:wgl:dump_renderer Backing store: YES
trace:wgl:dump_renderer Window: YES
trace:wgl:dump_renderer Online: YES
trace:d3d:wined3d_adapter_init_fb_cfgs iPixelFormat=1,

There are also several enumerated pixel formats with 16 as "color depth"
(but still 32 as "color bits", so I'm not sure which one counts):
trace:wgl:enum_renderer_pixel_formats w/p/a 1/1/1 col 32/8
dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 0/0 0000000000000804f remapped
from w/p/a 1/0/1 col 15/0 dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 0/0
0000000000000801d
trace:wgl:enum_renderer_pixel_formats w/p/a 1/1/1 col 32/8
dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 1/2 0000000140000804f remapped
from w/p/a 1/0/1 col 15/0 dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 1/2
0000000140000801d
trace:wgl:enum_renderer_pixel_formats w/p/a 1/1/1 col 32/8
dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 1/4 0000000240000804f remapped
from w/p/a 1/0/1 col 15/0 dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 1/4
0000000240000801d
trace:wgl:enum_renderer_pixel_formats w/p/a 1/1/1 col 32/8
dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 1/8 0000000440000804f remapped
from w/p/a 1/0/1 col 15/0 dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 1/8
0000000440000801d
trace:wgl:enum_renderer_pixel_formats w/p/a 1/1/1 col 32/8
dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 0/0 0000000000000804f remapped
from w/p/a 1/1/1 col 15/0 dp/stn/ac/ax/b/db/str 16/0/0/0/0/0/0 samp 0/0
0000000000000801f (duplicate)

All of the "col" values are either 32, 64f or 128f.

> Is the game/wined3d actually switching it into one of those?

I'm not sure:

trace:d3d:init_format_fbo_compat_info Checking if format
WINED3DFMT_B5G6R5_UNORM is supported as FBO color attachment...
trace:d3d:check_fbo_compat Framebuffer format check call ok utils.c / 1344
trace:d3d:check_fbo_compat Format WINED3DFMT_B5G6R5_UNORM is supported
as FBO color attachment.
trace:d3d:check_fbo_compat RB attachment call ok utils.c / 1420
trace:d3d:check_fbo_compat Post-pixelshader blending check call ok
utils.c / 1468
trace:d3d:check_fbo_compat Format supports post-pixelshader blending.
trace:d3d:check_fbo_compat Color output: 0xff7b0000
trace:d3d:check_fbo_compat RB cleanup call ok utils.c / 1500

...

trace:d3d:wined3d_set_adapter_display_mode wined3d 0x11fe50, adapter_idx
0, mode 0x33fcfc.
trace:d3d:wined3d_set_adapter_display_mode mode 1024x768 at 0
WINED3DFMT_B5G6R5_UNORM 0.
...
trace:d3d:wined3d_get_adapter_display_mode wined3d 0x11fe50, adapter_idx
0, display_mode 0x33fc08, rotation 0x0.
warn:d3d:wined3d_get_adapter_display_mode Overriding format
WINED3DFMT_B8G8R8X8_UNORM with stored format WINED3DFMT_B5G6R5_UNORM.
trace:d3d:wined3d_get_adapter_display_mode Returning 1024x768 at 60
WINED3DFMT_B5G6R5_UNORM 0x1.
...
trace:d3d:swapchain_update_render_to_fbo Single buffered rendering.
trace:d3d:context_create swapchain 0x161238, target 0x1618f0, window
0x3003a.
trace:d3d:context_choose_pixel_format device 0x131748, dc 0x90033,
color_format WINED3DFMT_B5G6R5_UNORM, ds_format
WINED3DFMT_D24_UNORM_S8_UINT, aux_buffers 0, find_compatible 0.
trace:d3d:getColorBits format WINED3DFMT_B5G6R5_UNORM.
trace:d3d:getColorBits Returning red: 5, green: 6, blue: 5, alpha: 0,
total: 16 for format WINED3DFMT_B5G6R5_UNORM.
trace:d3d:getDepthStencilBits format WINED3DFMT_D24_UNORM_S8_UINT.
trace:d3d:getDepthStencilBits Returning depthSize: 24 and stencilSize: 8
for format WINED3DFMT_D24_UNORM_S8_UINT.
trace:d3d:context_choose_pixel_format Found iPixelFormat=69 for
ColorFormat=WINED3DFMT_B5G6R5_UNORM,
DepthStencilFormat=WINED3DFMT_D24_UNORM_S8_UINT
trace:d3d:context_enter Entering context 0x141f68, level 1.
trace:d3d:device_context_add Adding context 0x141f68.
trace:d3d:context_set_current Switching to D3D context 0x141f68, GL
context 0x31001, device context 0x90033.


Jonas



More information about the wine-devel mailing list