diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index ef60bd0a3c..8439350372 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1129,7 +1129,7 @@ static Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, bool fromT // If we've made it this far, it should be safe to dump. if (g_Config.bDumpDecryptedEboot) { - INFO_LOG(SCEMODULE, "Dumping derypted EBOOT.BIN to file."); + INFO_LOG(SCEMODULE, "Dumping decrypted EBOOT.BIN to file."); const u32 dumpLength = ret; __SaveDecryptedEbootToStorageMedia(ptr, dumpLength); } diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index ae655f31f1..35f0348128 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -237,6 +237,8 @@ void SoftGPU::CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight) { if (GetGPUBackend() == GPUBackend::VULKAN) { std::swap(v0, v1); } + draw_->BindBackbufferAsRenderTarget(); + draw_->Clear(Draw::FB_COLOR_BIT, 0, 0, 0); Draw::SamplerState *sampler; if (g_Config.iBufFilter == SCALE_NEAREST) { @@ -273,6 +275,7 @@ void SoftGPU::CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight) { draw_->BindVertexBuffers(0, 1, &vdata, nullptr); draw_->BindIndexBuffer(idata, 0); draw_->DrawIndexed(6, 0); + draw_->BindIndexBuffer(nullptr, 0); } void SoftGPU::CopyDisplayToOutput() diff --git a/ext/native/thin3d/thin3d_d3d11.cpp b/ext/native/thin3d/thin3d_d3d11.cpp index 1043a93fcb..5a32aca56c 100644 --- a/ext/native/thin3d/thin3d_d3d11.cpp +++ b/ext/native/thin3d/thin3d_d3d11.cpp @@ -184,6 +184,8 @@ private: ID3D11Buffer *nextVertexBuffers_[4]{}; int nextVertexBufferOffsets_[4]{}; + + bool dirtyIndexBuffer_ = false; ID3D11Buffer *nextIndexBuffer_ = nullptr; int nextIndexBufferOffset_ = 0; @@ -978,8 +980,9 @@ void D3D11DrawContext::ApplyCurrentState() { int numVBs = (int)curPipeline_->input->strides.size(); context_->IASetVertexBuffers(0, 1, nextVertexBuffers_, (UINT *)curPipeline_->input->strides.data(), (UINT *)nextVertexBufferOffsets_); - if (nextIndexBuffer_) { + if (dirtyIndexBuffer_) { context_->IASetIndexBuffer(nextIndexBuffer_, DXGI_FORMAT_R32_UINT, nextIndexBufferOffset_); + dirtyIndexBuffer_ = false; } if (curPipeline_->dynamicUniforms) { context_->VSSetConstantBuffers(0, 1, &curPipeline_->dynamicUniforms); @@ -1055,8 +1058,9 @@ void D3D11DrawContext::BindVertexBuffers(int start, int count, Buffer **buffers, void D3D11DrawContext::BindIndexBuffer(Buffer *indexBuffer, int offset) { D3D11Buffer *buf = (D3D11Buffer *)indexBuffer; // Lazy application - nextIndexBuffer_ = buf->buf; - nextIndexBufferOffset_ = offset; + dirtyIndexBuffer_ = true; + nextIndexBuffer_ = buf ? buf->buf : 0; + nextIndexBufferOffset_ = buf ? offset : 0; } void D3D11DrawContext::Draw(int vertexCount, int offset) {