Jump to content
  • Advertisement
Sign in to follow this  
Tape_Worm

[SlimDX][D3D11] Questions about using the 9.3 feature level...

This topic is 2611 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using the [color="#2B91AF"][font="Consolas"]FeatureLevel[/font][font="Consolas"].Level_9_3 [/font][font="Arial"]when creating my device so that I can test for backward compatibility issues.[/font]

[font="Arial"]So far, it appears to be working. However I do have 2 questions:[/font]

Question the first:
When I enable multi-sampling for the device (by passing a count of 4 and 0 for the quality level) there's no antialiasing happening on my image. If I use Level_11_0, 10_1, or 10_0, I get a nice anti-aliased triangle. All I'm doing right now is giving the swap chain a multisample description of 4, 0. [font="Arial"]Is there something I'm not doing? (I'm using an ATI Radeon 6870, 11.9 catalyst drivers if that's relevant)[/font]
[font="Arial"]
Question the second:
[/font][font="Arial"]When digging around for info on this I saw this on the MSDN documentation:[/font]
[font="Arial"]
[/font]
Special Behavior of Adapters for Feature Level 9
[color="#2A2A2A"]The three lowest feature levels D3D_FEATURE_LEVEL_9_1, D3D_FEATURE_LEVEL_9_2 and D3D_FEATURE_LEVEL_9_3, share a common implementation DLL and treat the IDXGIAdapter argument to D3D11CreateDevice[AndSwapchain] as a template adapter and create their own adapter as part of device creation. This means that the IDXGIAdapter passed into the creation routine will not be the same adapter as that retrieved from the device via IDXGIDevice::GetAdapter. The impact of this is that the IDXGIOutputs enumerated from the passed-in adapter cannot be used to enter fullscreen using any level 9 device, since those outputs are not owned by the device's adapter. It is good practice to discard the passed-in template adapter and retrieve the device's created adapter using IDXGIDevice::GetAdapter, where IDXGIDevice can be retrieved using QueryInterface from the Direct3D device interface.
[/quote]
So, being the little keener that I am, I decided to try and follow the rules (hoping that it may have something to do with question #1). First thing I noticed was that when I do this:


private GI.Adapter1 _gi11Adapter = null;

// Get the real adapter.
giDevice = new GI.Device1(D3DDevice);

GI.Adapter newAdapter = giDevice.Adapter;

_gi11Adapter = newAdapter;
[font="arial, verdana, tahoma, sans-serif"] [/font]
[font="arial, verdana, tahoma, sans-serif"] [/font]
[font="arial, verdana, tahoma, sans-serif"]It doesn't work. The Device1.Adapter returns just a DXGI.Adapter object, not a DXGI.Adapter1 object. Fair enough, I casted the thing to an Adapter1 and it wouldn't convert it. The documentation says to not mix DXGI1.1 and DXGI1.0 with D3D 11, so I'm not sure what I should be doing. Is it supposed to be returning a DXGI 1.0 Adapter object or is it supposed to be returning a DXGI 1.1 adapter?[/font]

Share this post


Link to post
Share on other sites
Advertisement

What format is your render target that you're creating with multisampling? Feature level 9.3 only supports MSAA for render targets with R8G8B8A/B8R8G8A8 formats. The full list is here: http://msdn.microsof...y/ff471324.aspx

[font="Arial"] [/font]
Actually that was the first page I went to when I discovered this issue.
[font="Arial"]Regardless, I'm using the R8G8B8A8_UNorm and I've tried B8G8R8A8_UNorm (B8R8G8A8 doesn't exist on that list, I assume it's a typo?). I tried this with the C++ tutorial samples included with the SDK and they exhibit the same behaviour.[/font]

Share this post


Link to post
Share on other sites
Well, for question the first, it turns out that it's probably a driver issue (yeah, I know, should be using RefRast to test these things). Oddly enough, the level 9 stuff was working as it should, it was the level 11 stuff that seems to be ungood.

I had to create a rasterizer state and enable the multisampling. The default is FALSE (according to the documentation), so once I set it to TRUE it worked for level 9. However, if I set the count to 2, no MSAA shows up. So that seems to me to be a buggy driver. When I set it to level 11, it automatically turns on (i.e. I think, it sets the MultiSampleEnable property to TRUE internally).

Anyway, that answers the first question. Still need some info for the 2nd one.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!