Original Post
I use Direct2D with DirectX11 via KeyedMutex. Everything works great if I am using a Hardware device. As soon as I default to Warp device I have a problem when I go to create a Texture2D object, I get the error message "Direct3D11Exception: E_OUTOFMEMORY: Ran out of memory"
These are the lines that are responsible:
[source lang="csharp"]SlimDX.Direct3D11.Texture2DDescription tds = SlimDX.Direct3D11.Texture2D.FromSwapChain(swapChain, 0).Description;
tds.BindFlags |= BindFlags.ShaderResource;
tds.SampleDescription = new SampleDescription(1, 0);
tds.OptionFlags |= ResourceOptionFlags.KeyedMutex;
textureD3D11 = new SlimDX.Direct3D11.Texture2D(device, tds);[/source]
Again, everything works great using a Hardware device, just not Warp. When I run it against PIX I see this:
<0x09033390> ID3D11Device:CreateTexture2D(0x0FD1E330, NULL, 0x0FD1E32C --> NULL)
That's using the Warp driver, but when I use Hardware that last NULL is not NULL, it's an actual pointer which points to a D3D11 Texture2D object. I've tried modifying the parameters of tds every way thinkable.
Any thoughts? I know I haven't included much code here but I was hoping someone would know what this was without having to post the whole DX routine. I will if requested.
These are the lines that are responsible:
[source lang="csharp"]SlimDX.Direct3D11.Texture2DDescription tds = SlimDX.Direct3D11.Texture2D.FromSwapChain(swapChain, 0).Description;
tds.BindFlags |= BindFlags.ShaderResource;
tds.SampleDescription = new SampleDescription(1, 0);
tds.OptionFlags |= ResourceOptionFlags.KeyedMutex;
textureD3D11 = new SlimDX.Direct3D11.Texture2D(device, tds);[/source]
Again, everything works great using a Hardware device, just not Warp. When I run it against PIX I see this:
<0x09033390> ID3D11Device:CreateTexture2D(0x0FD1E330, NULL, 0x0FD1E32C --> NULL)
That's using the Warp driver, but when I use Hardware that last NULL is not NULL, it's an actual pointer which points to a D3D11 Texture2D object. I've tried modifying the parameters of tds every way thinkable.
Any thoughts? I know I haven't included much code here but I was hoping someone would know what this was without having to post the whole DX routine. I will if requested.