mirror of
https://github.com/sal063/AC6_recomp
synced 2026-08-22 15:11:33 -04:00
Implement texture swap dump and replace pipeline
This commit is contained in:
@@ -10,8 +10,16 @@ REXCVAR_DECLARE(bool, ac6_render_capture);
|
||||
REXCVAR_DECLARE(bool, ac6_timing_hooks_enabled);
|
||||
REXCVAR_DECLARE(bool, ac6_unlock_fps);
|
||||
REXCVAR_DECLARE(bool, ac6_native_graphics_enabled);
|
||||
REXCVAR_DECLARE(bool, ac6_native_graphics_require_capture);
|
||||
REXCVAR_DECLARE(bool, ac6_experimental_replay_present);
|
||||
REXCVAR_DECLARE(bool, ac6_force_safe_render_capture);
|
||||
REXCVAR_DECLARE(bool, ac6_force_safe_draw_resolution_scale);
|
||||
REXCVAR_DECLARE(bool, ac6_force_safe_direct_host_resolve);
|
||||
REXCVAR_DECLARE(std::string, ac6_graphics_mode);
|
||||
REXCVAR_DECLARE(bool, direct_host_resolve);
|
||||
REXCVAR_DECLARE(int32_t, resolution_scale);
|
||||
REXCVAR_DECLARE(int32_t, draw_resolution_scale_x);
|
||||
REXCVAR_DECLARE(int32_t, draw_resolution_scale_y);
|
||||
REXCVAR_DECLARE(std::string, log_file);
|
||||
REXCVAR_DECLARE(std::string, log_level);
|
||||
|
||||
@@ -26,6 +34,36 @@ REXCVAR_DECLARE(std::string, log_level);
|
||||
// Early boot log to catch crashes before the SDK logger is ready
|
||||
std::ofstream g_boot_log;
|
||||
|
||||
namespace {
|
||||
|
||||
bool ShouldApplyAc6HybridStartupSafetyOverrides() {
|
||||
return REXCVAR_GET(ac6_native_graphics_enabled) &&
|
||||
REXCVAR_GET(ac6_graphics_mode) == "hybrid_backend_fixes";
|
||||
}
|
||||
|
||||
void ApplyAc6HybridStartupSafetyOverrides() {
|
||||
if (!ShouldApplyAc6HybridStartupSafetyOverrides()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (REXCVAR_GET(ac6_force_safe_draw_resolution_scale)) {
|
||||
REXCVAR_SET(resolution_scale, 1);
|
||||
REXCVAR_SET(draw_resolution_scale_x, 1);
|
||||
REXCVAR_SET(draw_resolution_scale_y, 1);
|
||||
}
|
||||
|
||||
if (REXCVAR_GET(ac6_force_safe_direct_host_resolve)) {
|
||||
REXCVAR_SET(direct_host_resolve, false);
|
||||
}
|
||||
|
||||
if (REXCVAR_GET(ac6_force_safe_render_capture)) {
|
||||
REXCVAR_SET(ac6_native_graphics_require_capture, false);
|
||||
REXCVAR_SET(ac6_render_capture, false);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void InitEarlyLog() {
|
||||
g_boot_log.open("boot.log", std::ios::out | std::ios::trunc);
|
||||
if (g_boot_log.is_open()) {
|
||||
@@ -46,6 +84,7 @@ std::unique_ptr<rex::ui::WindowedApp> Ac6recompAppCreate(rex::ui::WindowedAppCon
|
||||
REXCVAR_SET(log_file, "ac6recomp.log");
|
||||
REXCVAR_SET(log_level, "info");
|
||||
REXCVAR_SET(ac6_unlock_fps, false);
|
||||
ApplyAc6HybridStartupSafetyOverrides();
|
||||
|
||||
REXLOG_INFO("Ac6recompAppCreate: graphics mode={} replay_present={} capture={}",
|
||||
REXCVAR_GET(ac6_graphics_mode),
|
||||
|
||||
Reference in New Issue
Block a user