Getting SharpDX.SharpDXException while running demo with Visual Studio 2019
See original GitHub issueSharpDX.SharpDXException HResult=0x80070057 Message=HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.
Source=SharpDX StackTrace: at SharpDX.Result.CheckError() at SharpDX.Direct3D11.Device.CreateVertexShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef, VertexShader vertexShaderOut) at SharpDX.Direct3D11.VertexShader…ctor(Device device, Byte[] shaderBytecode, ClassLinkage linkage) at DemoRenderer.ShapeDrawing.RayTracedRenderer`1…ctor(Device device, ShaderCache cache, String shaderPath, Int32 maximumInstancesPerDraw) in C:\Work\Games\bepuphysics2-master\DemoRenderer\ShapeDrawing\RayTracedRenderer.cs:line 70 at DemoRenderer.Renderer…ctor(RenderSurface surface) in C:\Work\Games\bepuphysics2-master\DemoRenderer\Renderer.cs:line 71 at Demos.GameLoop…ctor(Window window) in C:\Work\Games\bepuphysics2-master\Demos\GameLoop.cs:line 33 at Demos.Program.Main(String[] args) in C:\Work\Games\bepuphysics2-master\Demos\Program.cs:line 16
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
Oops, good catch! FlipDiscard does indeed only work on win10. That’s what I get for copying from the DX12 codebase 😛
Fixed in 65b2c321cd8e32ce6ef2eda569015ab9281a7a61.
Another potential cause: not having the SDK installed, and attempting to run in debug mode. By default, the demos renderer enabled the device debug layer, which would then fail on launch. Running in release would still work.
1751f48f16b5349afda3ec17e065b4ff89c0257e defaults the debug layer to off always.
To enable the debug layer to investigate other rendering issues, change the last parameter to true here: https://github.com/bepu/bepuphysics2/blob/1751f48f16b5349afda3ec17e065b4ff89c0257e/Demos/GameLoop.cs#L26