我在DirectX 11代码中遇到DrawInstanced()
调用问题。当我使用功能级别10_0或更高级别调用DrawInstanced()时,一切都按预期工作,但是当我切换到功能级别9_3时,我在调试输出中出现以下错误:
D3D11: Removing Device.
D3D11 WARNING: ID3D11Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DRIVER_INTERNAL_ERROR: There is strong evidence that the driver has performed an undefined operation; but it may be because the application performed an illegal or undefined operation to begin with.). [ EXECUTION WARNING #379: DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT]
根据these msdn docs,应该在Directx 9_3功能级别上支持Instancing。发生了什么事?
答案 0 :(得分:2)
事实证明,虽然功能级别9_3支持Instancing,但根据msdn,唯一有效的api是DrawIndexedInstanced
,所以我必须调整我的代码才能使用索引实例。