Villacaleb / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Create Texture2D with KeyedMutex flag #686

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am trying to create a Texture2D with ResourceOptionFlags.KeyedMutex but I 
always get an E_INVALIDARG error. If I comment the KeyedMutex flag it work fine.

Here is the code :

D3D11.Texture2DDescription sharedTextureDesc = new D3D11.Texture2DDescription()
                {
                    Width = backBufferDesc.Width,
                    Height = backBufferDesc.Height,
                    MipLevels = 1,
                    ArraySize = 1,
                    Format = SlimDX.DXGI.Format.B8G8R8A8_UNorm_SRGB,
                    SampleDescription = new SlimDX.DXGI.SampleDescription(1, 0),
                    Usage = SlimDX.Direct3D11.ResourceUsage.Default,
                    BindFlags = SlimDX.Direct3D11.BindFlags.ShaderResource | SlimDX.Direct3D11.BindFlags.RenderTarget,                    
                    OptionFlags = SlimDX.Direct3D11.ResourceOptionFlags.KeyedMutex // If I comment this, it's ok.
                };
D3D11.Texture2D sharedTexture11 = new D3D11.Texture2D(d3d11Device, 
sharedTextureDesc);

I donno if it's a SlimDX bug or ?

Thank you.

Original issue reported on code.google.com by Karna...@gmail.com on 9 Jun 2010 at 10:06

GoogleCodeExporter commented 9 years ago
Probably the combination of format, bind flags, and option flags isn't valid. 
The docs don't say much about it though. See if the debug runtimes give you any 
more information. Either way, this doesn't appear to be a SlimDX bug.

Original comment by Mike.Popoloski on 21 Aug 2010 at 4:37