#1 Members - Reputation: 111
Posted 11 July 2012 - 02:50 PM
Is it possible to run DX11 application in software mode on Win7? I've tried but i've had an error "incorrect parameter". I know that i need to put handle of module as one of parameters and i did it but it's not a handle where a window is. Is it ok? Could anyone help me? Maybe anyone has an example? Thanks.
#2 Moderators - Reputation: 5418
Posted 11 July 2012 - 03:18 PM
There is a built-in software rasterizer, called WARP. To you use it you pass D3D_DRIVER_TYPE_WARP when creating the device.
#3 Members - Reputation: 111
Posted 11 July 2012 - 11:19 PM
#4 Members - Reputation: 3827
Posted 12 July 2012 - 03:55 AM
I'm not sure where you heard that, but you heard wrong. Full D3D11 is available on Windows 7. Even if you have downlevel hardware you can still use feature levels to target it with the D3D11 API - http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876%28v=vs.85%29.aspxBut the problem is that only DX10.1 is available on Win7 with that mode and it's not suitable for me.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
#5 Members - Reputation: 99
Posted 12 July 2012 - 05:08 AM
I've read about those limitations here - http://msdn.microsof...8(v=vs.85).aspx
A WARP driver, which is a high-performance software rasterizer. The rasterizer supports feature levels 9_1 through level 10_1 with a high performance software implementation
Note The WARP driver that Windows 8 includes supports feature levels 9_1 through level 11_1.
But anyway i'm not successfull in the any software modes now. My app is .net. And i do such thing - GetModuleHandle("MayApp.vcshost.exe"); and this function retuns handle which isn't null but i again have error - "Incorrect parameter" in the function D3D11CreateDivice. What's wrong?
Edited by _Flame1_, 12 July 2012 - 05:09 AM.
#6 Members - Reputation: 1990
Posted 12 July 2012 - 06:32 AM
All the stuff you need to implement is listed in the Windows DDK under the graphics drivers section. The basics of implementing a software driver are almost exactly same as implementing the user-mode portion of a hardware driver, though direct kernel access is not strictly necessary in pure software. In addition, software driver necessarily needs to implement the actual drawing operations such as the whole graphics pipeline, which would otherwise reside on GPU hardware.
I am under the impression that D3D 11.1 will be released on Vista and 7 as well, after '8' launches. This would enable you to use the WARP driver with 11.0 feature set.
Edited by Nik02, 12 July 2012 - 06:46 AM.
Software developer
#7 Members - Reputation: 99
Posted 12 July 2012 - 07:49 AM
A reference driver, which is a software implementation that supports every Direct3D feature. A reference driver is designed for accuracy rather than speed and as a result is slow but accurate. The rasterizer portion of the driver does make use of special CPU instructions whenever it can, but it is not intended for retail applications; use it only for feature testing, demonstration of functionality, debugging, or verifying bugs in other drivers. This driver is installed by the DirectX SDK. This driver may be referred to as a REF driver, a reference driver or a reference rasterizer.
Where can i get that driver?
I see that DX runtime has D3D11Ref.dll. What's that?
Edited by _Flame1_, 12 July 2012 - 07:52 AM.
#9 Moderators - Reputation: 13533
Posted 12 July 2012 - 08:31 AM
I know that i need to put handle of module as one of parameters and i did it but it's not a handle where a window is. Is it ok?
For software mode you're supposed to provide a handle to a DLL that implements a D3D11 driver + rasterizer in software. If you don't have one, you can't use it.
So as i understand correctly i need to provide a handle of my main application but not a handle of dll where my engine is?
I do such thing - GetModuleHandle("MayApp.vcshost.exe"); and this function retuns handle which isn't null but i again have error - "Incorrect parameter" in the function D3D11CreateDivice. What's wrong?
The handle is expected to be that of a native module (commonly a dll), which implements and exports the D3D driver entrypoints (there are lot of them).
You asked about your incorrect use of the handle parameter... MJP told you that this parameter is supposed to be used to load a custom D3D Driver DLL (and tried to steer you away from this and onto the WARP software driver)... You ignored him and kept trying to pass a handle to your application as if it were a software D3D driver... Nik02 again explained that the handle is for a driver DLL, and if you want to use it, you must implement this DLL yourself... and then you treat his reply as a joke, and tell him what they both told you already?? I dont understand how you're simultaneously understanding their advice and ignoring their advice!Very funny Nik02. I need to implement a software driver for that.
You can either
* load a software driver DLL (which you can write yourself, in theory...),
* use WARP with it's feature level restrictions, or
* use the reference device, although it's supposed to only be used for debugging purposes.
Edited by Hodgman, 12 July 2012 - 08:40 AM.
#10 Members - Reputation: 99
Posted 12 July 2012 - 08:43 AM
You can either
* load a software driver DLL (which you can write yourself, in theory...),
* use WARP with it's feature level restrictions, or
* use the reference device, although it's supposed to only be used for debugging purposes.
1. I can't do the first one.
2. How?
3. How?
What the hell should i do for 2 and 3 options?
Edited by _Flame1_, 12 July 2012 - 08:56 AM.
#11 Members - Reputation: 3827
Posted 12 July 2012 - 09:25 AM
As I flagged above, be very very certain that you do in fact need a software device before jumping in and creating one. You indicated that your understanding was that Windows 7 doesn't support D3D11 but that understanding is wrong. Even if you do need to run a program on downlevel (i.e. D3D9 or 10 class) hardware you can still do so via feature levels - check the link I provided above.
So it's likely that you don't in fact need a software device at all.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
#12 Members - Reputation: 99
Posted 12 July 2012 - 09:36 AM
I use D3D11CreateDevice and this flag doesn't work for me. I've tried all software flags(ref, warp and soft) and no one works. I've got an error "incorrect parameter".For WARP you just specify D3D_DRIVER_TYPE_WARP in your D3D11CreateDeviceAndSwapChain call. That's all documented in the SDK.
No, you didn't understand me. I wrote that WARP doesn't have DX11 if i correctly understand msdn.As I flagged above, be very very certain that you do in fact need a software device before jumping in and creating one. You indicated that your understanding was that Windows 7 doesn't support D3D11 but that understanding is wrong. Even if you do need to run a program on downlevel (i.e. D3D9 or 10 class) hardware you can still do so via feature levels - check the link I provided above.
#13 Members - Reputation: 1990
Posted 13 July 2012 - 12:09 AM
Functionality equivalent to tessellation and compute shaders is fairly trivial to implement in software, even though the rest of the drawing would happen in actual GPU hardware (even legacy GPUs). Of course, software is always going to be slower at these, and neither WARP nor your theoretical custom sw driver won't change that.
And, as I said previously, the newest version of WARP does support the D3D11 feature set. You just have to wait until the 11.1 runtime is released later this year. If you can't really wait, the only way is to write your own driver - which couldn't be farther from trivial, but is possible for an experienced software engineer team with a lot of time on their hands. Writing the driver from scratch very likely takes more time than waiting for the new WARP driver, though; no matter how experienced the team is.
Edited by Nik02, 13 July 2012 - 12:26 AM.
Software developer
#14 Members - Reputation: 111
Posted 13 July 2012 - 01:26 PM
#15 Members - Reputation: 3827
Posted 13 July 2012 - 06:54 PM
You don't need a software mode for this.
You can still use the D3D11 API.
Just use feature levels and it will work. If you must, you can go so far as to specify D3D_FEATURE_LEVEL_9_1 and it will even work on ancient D3D9 class hardware. So unless there are specific features that only D3D11 has and that you must use, which was Nick02's question, you already have an appropriate solution that does not require a software mode.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
#16 Members - Reputation: 111
Posted 14 July 2012 - 12:37 AM
#17 Members - Reputation: 1990
Posted 14 July 2012 - 04:48 AM
I know that MJP, mhagain and Hodgman are experienced software developers as well as helpful guys in general; we generally know what we're doing and we try to reply with our best knowledge. Usually, if you hit a dead end, the wise way to proceed is to find alternative ways. We presented several such ways, all of which are viable (though with hugely varying amount of effort required) but you insist on clawing your way through the thick brick wall that blocks your path.
If we had more accurate information about the scenario you actually want to accomplish, we would be able to offer more accurate help. But, personally, I don't have any incentive left to do that. I'll just concentrate on helping those that appreciate the effort.
Bye,
-N
Software developer
#18 Members - Reputation: 1985
Posted 14 July 2012 - 05:19 AM
I don't care about performance at all. The only thing that i need is DX11 software mode to run my app without appropriate hardware, no more.
D3D_DRIVER_TYPE_REFERENCE is exactly that, as others have already suggested. It has all full D3D11 features.






