The parameter is incorrect error
Dovencio opened this issue · 2 comments
When I try to run the application downloaded from VS I get the following error:
SharpGen.Runtime.SharpGenException
HResult=0x80070057
Message=HRESULT: [0x80070057], Module: [Vortice.Direct2D1], ApiCode: [WINCODEC_ERR_INVALIDPARAMETER/InvalidParameter], Message: [The parameter is incorrect.
]
Source=SharpGen.Runtime
StackTrace:
at SharpGen.Runtime.Result.ThrowFailureException()
at WinFormsDirect3D11Sample.Direct3D11.OnInit() in C:\Users\Doven\source\repos\WinForms_Direct3D11_CSharp_Vortice_Sample\WinFormsDirect3D11Sample\Direct3D11.cs:line 251
at WinFormsDirect3D11Sample.MainWindow.InitializeDirect3D() in C:\Users\Doven\source\repos\WinForms_Direct3D11_CSharp_Vortice_Sample\WinFormsDirect3D11Sample\MainWindow.cs:line 156
at WinFormsDirect3D11Sample.MainWindow..ctor() in C:\Users\Doven\source\repos\WinForms_Direct3D11_CSharp_Vortice_Sample\WinFormsDirect3D11Sample\MainWindow.cs:line 31
at WinFormsDirect3D11Sample.Program.Main() in C:\Users\Doven\source\repos\WinForms_Direct3D11_CSharp_Vortice_Sample\WinFormsDirect3D11Sample\Program.cs:line 14
I have a NVIDIA GeForce RTX 4070 Ti
Feature levels are 12_1, 12_0, 11_1, 11_0, 10_1, 10_0, 9_3, 9_2, 9_1
Driver is version 31.0.15.3129
Tried updating the NuGet packages
Tried downloading from Visual studio and github but it's the same result.
Also same error in the result on line 47.
Hi, this could have different reasons. Try to build Release and not Debug-Mode. Is it possible?
You could try to remove some Feature_Levels from the feature level list or the Debug-flag.
If I find some time today, I will try to implement the DXGIInfoQueue, this class gives more specifics error messages (not only INVALID_ERROR) during debugging.
I have implemented the DxgiInfoManager which gives you more debug messages directly into the Debug-Output-Window in Visual Studio. Here an example, how it looks like:
--- BEGIN DXGI INFO MANAGER MESSAGES ---
pFeatureLevels includes FEATURE_LEVEL_12_2, which is not supported with Direct3D 11.
Using ID3D11Debug::ReportLiveDeviceObjects with D3D11_RLDO_DETAIL will help drill into object lifetimes. Objects with Refcount=0 and IntRef=0 will be eventually destroyed through typical Immediate Context usage. However, if the application requires these objects to be destroyed sooner, ClearState followed by Flush on the Immediate Context will realize their destruction.
--- END DXGI INFO MANAGER MESSAGES ---
or
--- BEGIN DXGI INFO MANAGER MESSAGES ---
ID3D11DeviceContext::Draw: Vertex Buffer at the input vertex slot 0 is not big enough for what the Draw*() call expects to traverse. This is OK, as reading off the end of the Buffer is defined to return 0. However the developer probably did not intend to make use of this behavior.
--- END DXGI INFO MANAGER MESSAGES ---
I hope this helps a little bit. I also removed the FeatureLevel 12_2 because it is not supported by Direct3D11