https://bugs.winehq.org/show_bug.cgi?id=45724
--- Comment #6 from Andrew Wesie awesie@gmail.com --- (In reply to Henri Verbeet from comment #5)
I seem to recall that it shouldn't be possible to create a front buffer with DDSCAPS_3DDEVICE, but I may be misremembering. Note that ddraw never has real front/back buffers though; it always draws offscreen and then goes through ddraw_surface_update_frontbuffer() to get things to the screen.
Thanks, I missed it at first glance.
I modified the d3d9 occlusion query test to check if it gets flushed implicitly, flushed implicitly with BeginScene / Draw / EndScene, and then flushed explicitly. This revised test passes on my Windows 10 x64 installation when using Intel GPU. It does not pass with AMD GPU because the query is flushed implicitly (e.g. even without the BeginScene / EndScene).
With my previous patch to wined3d query and the attached patch to remove glFlush from wined3d_device_end_scene, the revised test also passes on Wine. Obviously without removing glFlush from wined3d_device_end_scene, it does not pass.