DX11 software mode.

Started by
24 comments, last by _Flame1_ 11 years, 9 months ago
Hi.
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.
Advertisement
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.

There is a built-in software rasterizer, called WARP. To you use it you pass D3D_DRIVER_TYPE_WARP when creating the device.
Thanks for answer. 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? And after that it will work in software mode well? Ok, i will try. Just another question. What's the difference between software and reference mode? And what do you mean "built-in software rasterizer, called WARP". I've heard a little bit about that mode and i've thought that it's software mode which works a little bit faster when usual software mode and i don't know why. But the problem is that only DX10.1 is available on Win7 with that mode and it's not suitable for me.

But the problem is that only DX10.1 is available on Win7 with that mode and it's not suitable for me.

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.aspx

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

It's me again but under abit different nickname coz i don't have pass here from my original nickname smile.png

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.[/quote]

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 [font=monospace]D3D11CreateDivice. [/font]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).

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.

Niko Suni

Very funny Nik02. I need to implement a software driver for that.

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.[/quote]

Where can i get that driver? smile.png
I see that DX runtime has D3D11Ref.dll. What's that?
Guys why are you decreasing my reputation? I just need to use software mode for my application, no more. smile.png Is it problem?

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).

Very funny Nik02. I need to implement a software driver for that.
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!

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.
Dear Hodgman i don't know this topic and it's easy for me not to understand correctly. They said that i need to put a handle where driver is. But i thought that it's in my application. Ok. it was a mistake, now i've got it. I've ask some example or maybe small piece of code. Advice about implementing a driver is really joke for me. smile.png I didn't ask that at all. All i need is to run my application in software mode. What should i do for that? I don't need abstract advice i need practical. smile.png


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.
[/quote]

1. I can't do the first one.
2. How?
3. How?

What the hell should i do for 2 and 3 options?

This topic is closed to new replies.

Advertisement