Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


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

#21 Bacterius   Crossbones+   -  Reputation: 11679

Like
0Likes
Like

Posted 15 July 2012 - 07:44 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.

Indeed it is part of the D3D runtime - my mistake. Thanks MJP.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


Sponsor:

#22 _Flame1_   Members   -  Reputation: 99

Like
0Likes
Like

Posted 16 July 2012 - 04:42 AM

Yes. It's not good if it will be nessesary to install DirectX SDK but it's alright.
Ok, here is my code.

D3D_DRIVER_TYPE driver = D3D_DRIVER_TYPE_REFERENCE;
D3D11CreateDevice(pAdapter, driver, 0, 0, 0, 0, D3D11_SDK_VERSION, &pDevice, NULL, NULL );

Also i've tried D3D_DRIVER_TYPE_WARP. And i have HRESULT - 0x80070057(The parameter is incorrect. ) all time.
Yes, i have installed latest DirectX Sdk.

#23 Hodgman   Moderators   -  Reputation: 42086

Like
1Likes
Like

Posted 16 July 2012 - 04:47 AM

Maybe you need the other 2 out params to not be NULL?
D3D_FEATURE_LEVEL level = 0;
ID3D11DeviceContext* pContext = 0;
D3D_DRIVER_TYPE driver = D3D_DRIVER_TYPE_REFERENCE;
D3D11CreateDevice(pAdapter, driver, 0, 0, 0, 0, D3D11_SDK_VERSION, &pDevice, &level, &pContext );
[Edit] Also, did you see this restriction? It implies that pAdapter should be NULL for a reference driver.

If you set the pAdapter parameter to a non-NULL value, you must also set the DriverType parameter to the D3D_DRIVER_TYPE_UNKNOWN value.


Edited by Hodgman, 16 July 2012 - 04:54 AM.


#24 _Flame1_   Members   -  Reputation: 99

Like
0Likes
Like

Posted 16 July 2012 - 05:16 AM

Thanks. D3D_DRIVER_TYPE_REFERENCE is working now with NULL adapter.

But i can't create swap chain now.
The function CreateSwapChain returns error - 0x887A0001(DXGI_ERROR_INVALID_CALL).


Also i can't run my application with WARP.
D3D_DRIVER_TYPE driver = D3D_DRIVER_TYPE_WARP;
D3D11CreateDevice(0, driver, 0, 0, 0, 0, D3D10_SDK_VERSION, &pDevice, NULL, NULL );
I have an error "The parameter is incorrect" again.

Edited by _Flame1_, 16 July 2012 - 06:00 AM.


#25 _Flame1_   Members   -  Reputation: 99

Like
0Likes
Like

Posted 16 July 2012 - 10:01 AM

Any ideas? Firstly i invoke D3D11CreateDevice and secondly IDXGIFactory->CreateSwapChain;

My SwapChainDescription is quite simple.

DXGI_SWAP_CHAIN_DESC sd;
ZeroMemory( &sd, sizeof( sd ) );
sd.BufferCount = 1;
sd.BufferDesc.Width = 640;
sd.BufferDesc.Height = 480;
sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
sd.BufferDesc.RefreshRate.Numerator = 60;
sd.BufferDesc.RefreshRate.Denominator = 1;
sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
sd.OutputWindow = g_hWnd;
sd.SampleDesc.Count = 1;
sd.SampleDesc.Quality = 0;
sd.Windowed = TRUE;

I took it from msdn example.

#26 _Flame1_   Members   -  Reputation: 99

Like
0Likes
Like

Posted 17 July 2012 - 07:11 AM

Turns out that it's impossible to create ref device and after that create a swap chain. Only D3D11CreateDeviceAndSwapChain works properly with ref device. It must be bug of DirectX.




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