Microsoft Visual C++ 2010 Express
 Microsoft DirectX SDK (February 2010)
 Direct3D 11.0

■Direct3D 11.0 エラーリスト Top


デバックウィンドウにエラーもしくはワーニングが出力された場合の、原因と解決方法をのせときます。メモっとかないと忘れるので。

●ID3D11Device::CreateDepthStencilView

レベル 内容 原因 解決方法
D3D11: ERROR The base resource was created as a multisample resource. You must specify D3D11_DSV_DIMENSION_TEXTURE2DMS instead of D3D11_DSV_DIMENSION_TEXTURE2D. [ STATE_CREATION ERROR #143: CREATEDEPTHSTENCILVIEW_INVALIDDESC ] バックバッファがマルチサンプリングリソースとして作成された。深度バッファがマルチサンプルでない。 バックバッファがマルチサンプルリソースとして作成された場合、深度バッファの作成でも同様にマルチサンプルリソースとして作成する。具体的には、D3D11_DSV_DIMENSION_TEXTURE2DMSを指定する。

●ID3D11Device::CreateTexture2D

レベル 内容 原因 解決方法
D3D11: ERROR A multisampled Texture2D cannot be bound to certain parts of the graphics pipeline, but must have at least one BindFlags bit set. The following BindFlags bits (0) cannot be set in this case: D3D11_BIND_VERTEX_BUFFER (0), D3D11_BIND_INDEX_BUFFER (0), D3D11_BIND_CONSTANT_BUFFER (0), D3D11_BIND_STREAM_OUTPUT (0). [ STATE_CREATION ERROR #99: CREATETEXTURE2D_INVALIDBINDFLAGS ] マルチサンプリングを有効にして作成したバックバッファをパラメータに渡して、D3DX11SaveTextureToFile を実行したら発生した。 マルチサンプリングを無効にすると、エラーにならない。 要調査。

●ID3D11DeviceContext::Draw

レベル 内容 原因 解決方法
D3D11: WARNING Draw: Input vertex slot 0 has stride 12 which is less than the minimum stride logically expected from the current Input Layout (24 bytes). This is OK, as hardware is perfectly capable of reading overlapping data. However the developer probably did not intend to make use of this behavior. [ EXECUTION WARNING #355: DEVICE_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL ] 頂点バッファを作成するとき、D3D11_INPUT_ELEMENT_DESC で設定した、オフセット値と実際の頂点のバイト数が一致していない。 一致させる。

●ID3D11DeviceContext::OMSetRenderTargets

レベル 内容 原因 解決方法
D3D11: ERROR The RenderTargetView at slot 0 is not compatable with the DepthStencilView. DepthStencilViews may only be used with RenderTargetViews if the effective dimensions of the Views are equal, as well as the Resource types, multisample count, and multisample quality. The RenderTargetView at slot 0 has (w:640,h:480,as:1), while the Resource is a Texture2D with (mc:8,mq:0). The DepthStencilView has (w:640,h:480,as:1), while the Resource is a Texture2D with (mc:1,mq:0). D3D11_RESOURCE_MISC_TEXTURECUBE factors into the Resource type, unless GetFeatureLevel() returns D3D_FEATURE_LEVEL_10_1 or greater. [ STATE_SETTING ERROR #388: OMSETRENDERTARGETS_INVALIDVIEW ] RenderTargetView と DepthStencilViewとで互換性がない。 バックバッファと深度バッファの作成時に指定する、サーフェイスの解像度、フォーマットの種類、マルチサンプリング数、マルチサンプリングの品質を一致させること。

●ID3D11DeviceContext::PSSetShaderResources

レベル 内容 原因 解決方法
D3D11: WARNING D3D11: WARNING: ID3D11DeviceContext::PSSetShaderResources: Resource being set to PS shader resource slot 0 is still bound on output! Forcing to NULL. [ STATE_SETTING WARNING #7: DEVICE_PSSETSHADERRESOURCES_HAZARD ] ピクセルシェーダーのテクスチャーの入力と出力が同じリソース。 同じにしない。

●IDXGIOutput::SetDisplaySurface

レベル 内容 原因 解決方法
DXGI Error This function can only be called if TakeOwnership has been called. 不明 わからん

●IDXGISwapChain::Present

レベル 内容 原因 解決方法
DXGI Warning Fullscreen presentation inefficiencies incurred due to application not using IDXGISwapChain::ResizeBuffers appropriately, specifying a DXGI_MODE_DESC not available in IDXGIOutput::GetDisplayModeList, or not using DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH. DXGI_SWAP_CHAIN_DESC::BufferDesc = { 640, 480, { 60, 1 }, R8G8B8A8_UNORM, 1, 0 }; DXGI_SWAP_CHAIN_DESC::SampleDesc = { 8, 0 }; DXGI_SWAP_CHAIN_DESC::Flags = 0x2; ResizeBuffers関数を適切に使ってない。 WM_SIZEイベントに最適化処理を実装すること。当サイトでも一応解説してるが、完全ではない。


web拍手

Top

inserted by FC2 system