   [SlimDX] Initialise Direct3D10.1 with WARP driver
  Quick question - In SlimDX, how I do create a Direct3D 10 device which uses the WARP device? In unmanaged Direct3D, it seems you do it by specifying the driver type as D3D10_DRIVER_TYPE_WARP, but the equivalent SlimDX enumeration (SlimDX.Direct3D10.DriverType) has only Hardware, Software, Reference, and Null values. Thanks. :)   
  D3D10_DRIVER_TYPE_WARP has the value of 5. To work around the fact that the enumeration seems to be missing in SlimDX, cast 5 to the DriverType type.   ;Quote:Original post by jpetrieD3D10_DRIVER_TYPE_WARP has the value of 5. To work around the fact that the enumeration seems to be missing in SlimDX, cast 5 to the DriverType type.Thanks. I assumed .NET would be more strict with casting an integer to an enum, but it certainly seems to do the trick!   ;  I spoke too soon - the following line doesn't work:new Device1(null, (DriverType)5, DeviceCreationFlags.None, SlimDX.Direct3D10_1.FeatureLevel.Level_9_1);I get an exception of 'E_INVALIDARG: An invalid parameter was passed to the returning function (-2147024809)'. Oddly enough nothing shows up in DebugView when the error occurs, but I do get a warning in DebugView saying the device wasn't disposed when the application is closed. So, it seems the device is created, but isn't usable. :(The following line, on the other hand, does work (0 being 'Hardware')new Device1(null, (DriverType)0, DeviceCreationFlags.None, SlimDX.Direct3D10_1.FeatureLevel.Level_9_1);;  (SEE BELOW)[Edited by - Barguast on April 26, 2010 11:40:31 AM];Quote:Original post by BarguastAnd yet, my attempt with Device.CreateWithSwapChain succeeds. :pEDIT: To update, it only works when FeatureLevel is 10 or above. Does the WARP renderer not like targetting Direct3D 9 under Direct3D 10? It worked with Direct3D 11 when I tried it.   ;  WARP only supports the D3D10 DDI, there is no DX9 or DX11 support from WARP.  I think that it also covers D3D10.1.   ;Quote:Original post by DieterVWWARP only supports the D3D10 DDI, there is no DX9 or DX11 support from WARP.  I think that it also covers D3D10.1.But in Direct3D 11, it's possible to create a WARP device, targetting Direct3D 9. Does this in fact use Direct3D 10?... This is all very confusing. :p   ;  That sounds like a bug in device creation to me.  It does seem safe though since the shader blobs will contain a *s_4_* target.  I'm not sure why anyone would want to target 10Level9 with WARP anyway given that WARP 10 would have more features - and you're using the dx10/dx11 api anyway.   ;Quote:Original post by DieterVWWARP only supports the D3D10 DDI, there is no DX9 or DX11 support from WARP.  I think that it also covers D3D10.1.That's in conflict with the documentation for the flag:Quote:A WARP driver, which is a high-performance software rasterizer. The rasterizer supports feature level 9_1 through level 10.1 with a high performance software implementation when hardware is not available.And I've added the WARP enum to SVN for SlimDX.   