mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-23 19:29:05 +02:00
Windows/Vulkan: implement screenshots. Something is iffy with the red/blue swap though...
This commit is contained in:
1 parent
3594623a8d
commit
10792cc8e7
10 files changed
+118
-27
No files matched your search
@@ -699,4 +699,14 @@ void FramebufferManagerVulkan::CompilePostShader() {
|
||||
|
||||
|
||||
usePostShader_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool FramebufferManagerVulkan::GetOutputFramebuffer(GPUDebugBuffer &buffer) {
|
||||
int w, h;
|
||||
draw_->GetFramebufferDimensions(nullptr, &w, &h);
|
||||
// I'm really not sure why I have to pass the wrong format here, it seems all the other color conversion are correct.
|
||||
// But I get R/B swapped if I do what seems right... Maybe driver bug for copies from the backbuffer, who knows.
|
||||
buffer.Allocate(w, h, GPU_DBG_FORMAT_8888_BGRA, false);
|
||||
draw_->CopyFramebufferToMemorySync(nullptr, Draw::FB_COLOR_BIT, 0, 0, w, h, Draw::DataFormat::R8G8B8A8_UNORM, buffer.GetData(), w);
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user