gpt4 book ai didi

c++ - CreateGraphicsPipelineState 失败并显示 E_INVALIDARG

转载 作者:行者123 更新时间:2023-11-30 04:46:47 25 4
gpt4 key购买 nike

在 Directx 12 中创建管道状态对象失败并显示 E_INVALIDARG 并且调试层输出一堆废话说 D3D12_GRAPHICS_PIPELINE_STATE_DESC 实例中的数据无效:

D3D12 ERROR: ID3D12Device::CreateBlendState: DestBlendAlpha[ 0 ] is trying to use a D3D11_BLEND value (0x4) that manipulates color, which is invalid. [ STATE_CREATION ERROR #115: CREATEBLENDSTATE_INVALIDDESTBLENDALPHA] D3D12 ERROR: ID3D12Device::CreateDepthStencilState: BackFace.StencilFailOp has an unrecognized value. [ STATE_CREATION ERROR #106: CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP] D3D12 ERROR: ID3D12Device::CreateDepthStencilState: BackFace.StencilDepthFailOp has an unrecognized value. [ STATE_CREATION ERROR #107: CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP] D3D12 ERROR: ID3D12Device::CreateDepthStencilState: BackFace.StencilPassOp has an unrecognized value. [ STATE_CREATION ERROR #108: CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP] D3D12 ERROR: ID3D12Device::CreateDepthStencilState: BackFace.StencilFunc has an unrecognized value. [ STATE_CREATION ERROR #109: CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC] D3D12 ERROR: ID3D12Device::CreateRasterizerState: FillMode has an unrecognized value. [ STATE_CREATION ERROR #95: CREATERASTERIZERSTATE_INVALIDFILLMODE] D3D12 ERROR: ID3D12Device::CreateRasterizerState: FillMode must be D3D12_FILL_MODE_SOLID when ConservativeRaster is D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON: FillMode = D3D12_FILL_MODE_WIREFRAME, ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON. [ STATE_CREATION ERROR #95: CREATERASTERIZERSTATE_INVALIDFILLMODE] D3D12 ERROR: ID3D12Device::Create*: The specified node mask (0xcccccccc) contains a bit set beyond the node count of the device. [ STATE_CREATION ERROR #900: INVALID_NODE_INDEX]

列表继续......

看起来内存损坏了,但实际上并没有,我一遍又一遍地检查了所有的值,它们都很好。至少 一些 的值必须是正确的,例如看最后一条消息,它说

The specified node mask (0xcccccccc)

…我确定在 CreateGraphicsPipelineState 调用之前它不是 0xcccccccc,调试器确认。

最佳答案

原来在我的机器上构建的exe在其他计算机上创建PSO会失败,但是如果项目是在其他机器上构建并在我的机器上运行,则不会出现PSO问题。

重新安装 Windows SDK 有助于解决问题。

关于c++ - CreateGraphicsPipelineState 失败并显示 E_INVALIDARG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56577279/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com