mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Fix issues with software GPU on D3D11
This commit is contained in:
parent
56c3753bb4
commit
c899882034
@ -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);
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user