<div class="gmail_quote">On Mon, Sep 3, 2012 at 6:29 PM, Stefan Dösinger <span dir="ltr"><<a href="mailto:stefandoesinger@gmx.at" target="_blank">stefandoesinger@gmx.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I skimmed bug #18490, and I'm wondering about two things: Does the app create<br>
a D3DDEVTYPE_REF or D3DDEVTYPE_NULLREF device? Once the device is created,<br>
what does it to with it? A +d3d log would provide some answers.<br></blockquote></div><br>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).<br>Here is the relevant log line:<br>trace:d3d:wined3d_device_create
 wined3d 0x235ce558, adapter_idx 0, device_type 0x1, focus_window 
0x20026, flags 0x22, device_parent 0x2284cc0c, device 0x2284cc14.<br><br>Focus
 window is the desktop handle. Presentation parameters specify windowed 
mode and hDeviceWindow=NULL, so in the end it uses the desktop window.<br><br>It seems to be some kind of short-lived auxiliary device for texture operations. It's not used for rendering at all.<br>The only operations on that device I could find is a series of CreateTexture calls:<br>
trace:d3d9:d3d9_device_CreateTexture
 iface 0x2284cc08, width 2048, height 2048, levels 1, usage 0, format 
0x15, pool 0x2, texture 0x33be40, shared_handle (nil).<br><br>They are followed by several LockRect/UnlockRect calls, after which the textures are released.<br>The device is released immediately after that.<br><br>Originally
 I suspected this might be used to generate mip-maps or load textures 
with d3dx, but the presence of D3DPOOL_SYSTEMMEM excludes both.<br><br>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 case.<br>
<br>Regards,<br>Adam Jakubek<br><br>