I am marketing my game with a requirement for a DirectX 10 capable video card. But one user gets a crash with a GeForce GTX 280 chip (came in 2009) which I believe supports DirectX 10.
This is the error message:
HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.
Line: 0
at SharpDX.Result.CheckError()
at SharpDX.Direct3D11.Device.CreateTexture2D(Texture2DDescription& descRef, DataBox[] initialDataRef, Texture2D texture2DOut)
at Microsoft.Xna.Framework.Graphics.Texture2D.CreateTexture()
at Microsoft.Xna.Framework.Graphics.RenderTarget2D.GenerateIfRequired()
This is the code that crashes:
DiffuseMSRenderTarget = new RenderTarget2D(device,
width, height, false,
pp.BackBufferFormat, pp.DepthStencilFormat, pp.MultiSampleCount, RenderTargetUsage.PreserveContents);
// resolve target - not needed?
diffuseRenderTarget = new RenderTarget2D(device, width, height, false,
pp.BackBufferFormat, pp.DepthStencilFormat, 0, RenderTargetUsage.PreserveContents);
edgeDetectNormalDepthRenderTarget = new RenderTarget2D(device,
width, height, false,
pp.BackBufferFormat, pp.DepthStencilFormat, 0, RenderTargetUsage.PreserveContents);
// no depth buffer, no multisampling!
shadowRenderTarget = new RenderTarget2D(device,
width, height, false,
pp.BackBufferFormat, DepthFormat.None, 0, RenderTargetUsage.DiscardContents);
// no depth buffer, no multisampling!
diffuseFinalRenderTarget = new RenderTarget2D(device,
width, height, false,
pp.BackBufferFormat, DepthFormat.None, 0, RenderTargetUsage.DiscardContents);
emissiveModelLightRenderTarget = new RenderTarget2D(device,
width, height, false,
pp.BackBufferFormat, DepthFormat.None, 0, RenderTargetUsage.DiscardContents);
emissiveModelLightDistanceRenderTarget = new RenderTarget2D(device,
width, height, false, SurfaceFormat.Rg32
, DepthFormat.None, 0, RenderTargetUsage.DiscardContents);
DistanceHeightAndBillboardAlphaRenderTarget = new RenderTarget2D(device,
width, height, false, SurfaceFormat.Rgba1010102, DepthFormat.None, 0, RenderTargetUsage.DiscardContents);
Does this mean I need to change the requirements to DirectX 11?