wined3d: Use backup swapchain DC for devices created with desktop window. (try 2)
ajakubek at gmail.com
Mon Sep 3 14:51:59 CDT 2012
On Mon, Sep 3, 2012 at 6:29 PM, Stefan Dösinger <stefandoesinger at gmx.at>wrote:
> I skimmed bug #18490, and I'm wondering about two things: Does the app
> a D3DDEVTYPE_REF or D3DDEVTYPE_NULLREF device? Once the device is created,
> what does it to with it? A +d3d log would provide some answers.
Ok, this needs a little correction on my part. The game actually creates
D3DEVTYPE_HAL (I somehow previously concluded it wouldn't work, since on my
test machine it required software vertex processing).
Here is the relevant log line:
trace:d3d:wined3d_device_create wined3d 0x235ce558, adapter_idx 0,
device_type 0x1, focus_window 0x20026, flags 0x22, device_parent
0x2284cc0c, device 0x2284cc14.
Focus window is the desktop handle. Presentation parameters specify
windowed mode and hDeviceWindow=NULL, so in the end it uses the desktop
It seems to be some kind of short-lived auxiliary device for texture
operations. It's not used for rendering at all.
The only operations on that device I could find is a series of
trace:d3d9:d3d9_device_CreateTexture iface 0x2284cc08, width 2048, height
2048, levels 1, usage 0, format 0x15, pool 0x2, texture 0x33be40,
They are followed by several LockRect/UnlockRect calls, after which the
textures are released.
The device is released immediately after that.
Originally I suspected this might be used to generate mip-maps or load
textures with d3dx, but the presence of D3DPOOL_SYSTEMMEM excludes both.
I admit that it's a very non-standard way of creating a D3D device, since
it can't render anything. However it seems to work for this particular use
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel