Merge pull request #20689 from hrydgard/d3d11-fix

D3D11: Fix some fallout from my previous fixes
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2025-08-02 23:19:39 +02:00
commit 9a3a326afa
1 file changed
+4 -5
+4 -5
View File
@@ -143,9 +143,8 @@ void DrawEngineD3D11::DeviceRestore(Draw::DrawContext *draw) {
}
void DrawEngineD3D11::ClearInputLayoutMap() {
inputLayoutMap_.Iterate([&](const InputLayoutKey &key, ComPtr<ID3D11InputLayout> il) {
if (il)
il.Reset();
inputLayoutMap_.Iterate([&](const InputLayoutKey &key, ID3D11InputLayout *il) {
il->Release();
});
inputLayoutMap_.Clear();
}
@@ -324,14 +323,14 @@ void DrawEngineD3D11::Flush() {
D3D11VertexShader *vshader;
D3D11FragmentShader *fshader;
shaderManager_->GetShaders(prim, dec_->VertexType(), &vshader, &fshader, pipelineState_, useHWTransform, useHWTessellation_, decOptions_.expandAllWeightsToFloat, applySkinInDecode_);
ComPtr<ID3D11InputLayout> inputLayout;
ID3D11InputLayout *inputLayout;
SetupDecFmtForDraw(vshader, dec_->GetDecVtxFmt(), dec_->VertexType(), &inputLayout);
context_->PSSetShader(fshader->GetShader(), nullptr, 0);
context_->VSSetShader(vshader->GetShader(), nullptr, 0);
shaderManager_->UpdateUniforms(framebufferManager_->UseBufferedRendering());
shaderManager_->BindUniforms();
context_->IASetInputLayout(inputLayout.Get());
context_->IASetInputLayout(inputLayout);
UINT stride = dec_->GetDecVtxFmt().stride;
context_->IASetPrimitiveTopology(d3d11prim[prim]);