mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 10:40:01 +01:00
Add new flag that will simplify the GL path
This commit is contained in:
1 parent
8dc3e8ed14
commit
85de7fdc50
8 files changed
+15
-9
No files matched your search
@@ -3185,9 +3185,9 @@ bool GetOutputFramebuffer(Draw::DrawContext *draw, GPUDebugBuffer &buffer) {
|
||||
if (fmt != Draw::DataFormat::B8G8R8A8_UNORM)
|
||||
fmt = Draw::DataFormat::R8G8B8A8_UNORM;
|
||||
|
||||
bool flipped = g_Config.iGPUBackend == (int)GPUBackend::OPENGL;
|
||||
bool flipY = g_Config.iGPUBackend == (int)GPUBackend::OPENGL;
|
||||
|
||||
buffer.Allocate(w, h, fmt == Draw::DataFormat::R8G8B8A8_UNORM ? GPU_DBG_FORMAT_8888 : GPU_DBG_FORMAT_8888_BGRA, flipped);
|
||||
buffer.Allocate(w, h, fmt == Draw::DataFormat::R8G8B8A8_UNORM ? GPU_DBG_FORMAT_8888 : GPU_DBG_FORMAT_8888_BGRA, flipY);
|
||||
buffer.SetIsBackbuffer(true);
|
||||
return draw->CopyFramebufferToMemory(nullptr, Draw::Aspect::COLOR_BIT, 0, 0, w, h, fmt, buffer.GetData(), w, Draw::ReadbackMode::BLOCK, "GetOutputFramebuffer");
|
||||
}
|
||||
|
||||
@@ -190,6 +190,11 @@ u32 GPU_GLES::CheckGPUFeatures() const {
|
||||
features |= GPU_ROUND_DEPTH_TO_16BIT;
|
||||
}
|
||||
}
|
||||
|
||||
if (!g_Config.bSkipBufferEffects) {
|
||||
features |= GPU_USE_BUFFERED_FLIP;
|
||||
}
|
||||
|
||||
return features;
|
||||
}
|
||||
|
||||
|
||||
@@ -480,6 +480,7 @@ enum {
|
||||
GPU_USE_CLIP_DISTANCE = FLAG_BIT(24),
|
||||
GPU_USE_CULL_DISTANCE = FLAG_BIT(25),
|
||||
GPU_USE_SHADER_BLENDING = FLAG_BIT(26), // This is set to false when skip buffer effects is enabled and GPU_USE_FRAMEBUFFER_FETCH is not.
|
||||
GPU_USE_BUFFERED_FLIP = FLAG_BIT(27), // We use a flip hack to pretend the coordinate system is right-side-up, except if buffered rendering is off.
|
||||
|
||||
// VR flags (reserved or in-use)
|
||||
GPU_USE_VIRTUAL_REALITY = FLAG_BIT(29),
|
||||
|
||||
Reference in new issue
Block a user