Out of Memory Exception

Jan 21, 2015 at 3:45 PM
Edited Jan 21, 2015 at 10:37 PM

I get a Direct3D11Exception when I attempt to create a new instance of the TextSpriteRenderer class. Creating the SpriteRenderer instance passing my device object works fine. I'm using SlimDX and so I referenced SpriteTextRenderer.dll as well as SpriteTextRenderer.SlimDX.dll.

The actual Direct3D error message is unfortunately as always totally useless:

{"E_OUTOFMEMORY: Ran out of memory (-2147024882)"}

I'm sure it's not actually an out-of-memory problem because I haven't even created any vertex buffers or anything, other than initializing the device and swapchain. The stack trace shows the error happens in the constructor call of ShaderResourceView in CreateDeviceCompatibleTexture:
 at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
   at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
   at SlimDX.Direct3D11.ShaderResourceView..ctor(Device device, Resource resource)
   at SpriteTextRenderer.SlimDX.TextBlockRenderer.CreateDeviceCompatibleTexture(Int32 width, Int32 height, IDisposable texture10, IDisposable& texture11, IDisposable& srv11)
   at SpriteTextRenderer.TextBlockRenderer.CreateCharTable(Byte bytePrefix)
   at SpriteTextRenderer.SlimDX.TextBlockRenderer..ctor(SpriteRenderer sprite, String fontName, FontWeight fontWeight, FontStyle fontStyle, FontStretch fontStretch, Single fontSize)
Do you have any idea what could be wrong? I downloaded the binaries from the downloads section and I'm using .NET40

Edit: I get the same error when I compile and run the provided SampleSlimDX project. I had a quick look at the source code and the problem seems to be related to the _OpenSharedResource_() method call. If I set PixCompatible to true in CreateDeviceCompatibleTexture, no exception is thrown, however nothing is rendered. I'm on a MacBook with onboard Intel graphics HD3000 running Windows 7 x64.
Jan 22, 2015 at 3:50 PM
Turns out it was a driver issue. After updating to the latest driver version, the problem is gone! :)
Marked as answer by bomsel1234 on 1/23/2015 at 5:01 AM