D3D11: Unbind the GS/HS/DS stages at the start of each frame

- Fixes #22748

thin3d never uses these stages, so it never set them. A libretro frontend
shares the immediate context with us, and recent RetroArch leaves its sprite
geometry shader bound after drawing its frame, so every one of our draws went
through it and the core output was black (with threaded video off, where the
core draws on the frontend's context).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-11-09 11:28:25 +01:00
1 parent c3ab986b74
commit b185d746ee
1 file changed
+5
+5
View File
@@ -1652,6 +1652,11 @@ void D3D11DrawContext::BeginFrame(DebugFlags debugFlags) {
context_->IASetInputLayout(curInputLayout_.Get());
context_->VSSetShader(curVS_.Get(), nullptr, 0);
context_->PSSetShader(curPS_.Get(), nullptr, 0);
// We never use these stages, but a libretro frontend sharing the context may leave a shader bound
// in them (RetroArch draws its sprites with a geometry shader).
context_->GSSetShader(nullptr, nullptr, 0);
context_->HSSetShader(nullptr, nullptr, 0);
context_->DSSetShader(nullptr, nullptr, 0);
if (curTopology_ != D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED) {
context_->IASetPrimitiveTopology(curTopology_);
}