feat: Add frame generation and enhance UE4 game compatibility

- Add frame generation settings (enabled/disabled, interpolation/extrapolation modes)
- Add frame skipping settings (enabled/disabled, adaptive/fixed modes)
- Implement frame skipping logic with adaptive and fixed modes
- Enhance UE4 crash handling with recovery mechanisms
- Add support for signed and float 32-bit image formats across shader backends
- Update Vulkan Validation Layers to v1.4.321.0
- Fix duplicate frame skipping options in Qt UI
- Improve memory handling for UE4 games (Hogwarts Legacy compatibility)
- Add enhanced bindless texture handling with fallback approach
- Update Android build configuration and dependencies

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-08-05 19:32:28 +10:00
parent 011a546229
commit 117c467ff3
40 changed files with 1004 additions and 76 deletions

View File

@@ -434,6 +434,18 @@ OGLTexture MakeImage(const VideoCommon::ImageInfo& info, GLenum gl_internal_form
return GL_RG32UI;
case Shader::ImageFormat::R32G32B32A32_UINT:
return GL_RGBA32UI;
case Shader::ImageFormat::R32_SINT:
return GL_R32I;
case Shader::ImageFormat::R32_SFLOAT:
return GL_R32F;
case Shader::ImageFormat::R32G32_SINT:
return GL_RG32I;
case Shader::ImageFormat::R32G32_SFLOAT:
return GL_RG32F;
case Shader::ImageFormat::R32G32B32A32_SINT:
return GL_RGBA32I;
case Shader::ImageFormat::R32G32B32A32_SFLOAT:
return GL_RGBA32F;
}
ASSERT_MSG(false, "Invalid image format={}", format);
return GL_R32UI;

View File

@@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -140,6 +141,16 @@ void RendererOpenGL::Composite(std::span<const Tegra::FramebufferConfig> framebu
return;
}
const auto frame_start_time = std::chrono::steady_clock::now();
// Check if frame should be skipped
if (frame_skipping.ShouldSkipFrame(frame_start_time)) {
// Skip rendering but still notify the GPU
gpu.RendererFrameEndNotify();
rasterizer.TickFrame();
return;
}
RenderAppletCaptureLayer(framebuffers);
RenderScreenshot(framebuffers);
@@ -148,6 +159,12 @@ void RendererOpenGL::Composite(std::span<const Tegra::FramebufferConfig> framebu
++m_current_frame;
// Update frame timing for frame skipping
const auto frame_end_time = std::chrono::steady_clock::now();
const auto frame_duration = std::chrono::duration_cast<std::chrono::microseconds>(
frame_end_time - frame_start_time);
frame_skipping.UpdateFrameTime(frame_duration);
gpu.RendererFrameEndNotify();
rasterizer.TickFrame();

View File

@@ -14,6 +14,7 @@
#include "video_core/renderer_opengl/gl_resource_manager.h"
#include "video_core/renderer_opengl/gl_shader_manager.h"
#include "video_core/renderer_opengl/gl_state_tracker.h"
#include "video_core/frame_skipping.h"
namespace Core {
class System;
@@ -75,6 +76,7 @@ private:
std::unique_ptr<BlitScreen> blit_screen;
std::unique_ptr<BlitScreen> blit_applet;
VideoCore::FrameSkipping frame_skipping;
};
} // namespace OpenGL