Jump to content

  • Log In with Google      Sign In   
  • Create Account

DX11 software mode.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
25 replies to this topic

#1 _Flame_   Members   -  Reputation: 113

Like
0Likes
Like

Posted 11 July 2012 - 02:50 PM

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.

Sponsor:

#2 MJP   Moderators   -  Reputation: 11311

Like
1Likes
Like

Posted 11 July 2012 - 03:18 PM

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.

#3 _Flame_   Members   -  Reputation: 113

Like
0Likes
Like

Posted 11 July 2012 - 11:19 PM

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.

#4 mhagain   Crossbones+   -  Reputation: 7964

Like
0Likes
Like

Posted 12 July 2012 - 03:55 AM

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

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 _Flame1_   Members   -  Reputation: 99

Like
-1Likes
Like

Posted 12 July 2012 - 05:08 AM

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

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 Nik02   Crossbones+   -  Reputation: 2824

Like
0Likes
Like

Posted 12 July 2012 - 06:32 AM

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.

Edited by Nik02, 12 July 2012 - 06:46 AM.

Niko Suni


#7 _Flame1_   Members   -  Reputation: 99

Like
-3Likes
Like

Posted 12 July 2012 - 07:49 AM

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.


Where can i get that driver? Posted Image
I see that DX runtime has D3D11Ref.dll. What's that?

Edited by _Flame1_, 12 July 2012 - 07:52 AM.


#8 _Flame1_   Members   -  Reputation: 99

Like
0Likes
Like

Posted 12 July 2012 - 08:26 AM

Guys why are you decreasing my reputation? I just need to use software mode for my application, no more. Posted Image Is it problem?

Edited by _Flame1_, 12 July 2012 - 08:28 AM.


#9 Hodgman   Moderators   -  Reputation: 30360

Like
4Likes
Like

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

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.

Edited by Hodgman, 12 July 2012 - 08:40 AM.


#10 _Flame1_   Members   -  Reputation: 99

Like
0Likes
Like

Posted 12 July 2012 - 08:43 AM

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. Posted Image 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. Posted Image

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 mhagain   Crossbones+   -  Reputation: 7964

Like
0Likes
Like

Posted 12 July 2012 - 09:25 AM

For WARP you just specify D3D_DRIVER_TYPE_WARP in your D3D11CreateDeviceAndSwapChain call. That's all documented in the SDK.

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 _Flame1_   Members   -  Reputation: 99

Like
0Likes
Like

Posted 12 July 2012 - 09:36 AM

For WARP you just specify D3D_DRIVER_TYPE_WARP in your D3D11CreateDeviceAndSwapChain call. That's all documented in the SDK.

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

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.

No, you didn't understand me. I wrote that WARP doesn't have DX11 if i correctly understand msdn.

#13 Nik02   Crossbones+   -  Reputation: 2824

Like
1Likes
Like

Posted 13 July 2012 - 12:09 AM

What are the exact features present in the 11.0 profile that you can't live without?

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.

Niko Suni


#14 _Flame_   Members   -  Reputation: 113

Like
-3Likes
Like

Posted 13 July 2012 - 01:26 PM

Nick02 why are you teaching me what i need and what i don't need. I've already said what i need. If it's impossible now then ok i will cope with it. 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.

#15 mhagain   Crossbones+   -  Reputation: 7964

Like
0Likes
Like

Posted 13 July 2012 - 06:54 PM

The thing is, you've already been told that you can run your app without appropriate hardware.

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 _Flame_   Members   -  Reputation: 113

Like
-1Likes
Like

Posted 14 July 2012 - 12:37 AM

mhagain. I know that i can use DX11 with profiles. It's not a secrect for me. I need a software mode with full featured DX11 profile. Again, you advice me that i don't need. It seem to me that this discussion is useless for me. It's better to close that topic if it goes that way. For some reason you just like decreasing reputation instead of real help.

#17 Nik02   Crossbones+   -  Reputation: 2824

Like
4Likes
Like

Posted 14 July 2012 - 04:48 AM

We tried to be helpful and offer alternative ways to proceed, but it seems that the effort was wasted.

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

Niko Suni


#18 Erik Rufelt   Crossbones+   -  Reputation: 3477

Like
0Likes
Like

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.

#19 Bacterius   Crossbones+   -  Reputation: 8836

Like
0Likes
Like

Posted 15 July 2012 - 07:28 PM

Flame, do you have the DirectX SDK installed? Debug, Reference and WARP drivers are only available from the SDK - since they are supposed to be debug tools.

Edited by Bacterius, 15 July 2012 - 07:50 PM.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#20 MJP   Moderators   -  Reputation: 11311

Like
1Likes
Like

Posted 15 July 2012 - 07:39 PM

WARP isn't a debugging tool, it's intended to be deployed. So I'm pretty sure you don't need to install the SDK to use it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS