Added a new quirk for Wuchang FSR crash

This commit is contained in:
cdozdil
2025-07-28 17:51:28 +03:00
parent b9f35e89fd
commit 394cb6598d
3 changed files with 25 additions and 3 deletions
+3
View File
@@ -1006,6 +1006,9 @@ static void CheckQuirks()
if (quirks & GameQuirk::DontUseUnrealBarriers && !Config::Instance()->MVResourceBarrier.has_value())
Config::Instance()->MVResourceBarrier.set_volatile_value(128);
if (quirks & GameQuirk::SkipFirst10Frames && !Config::Instance()->SkipFirstFrames.has_value())
Config::Instance()->SkipFirstFrames.set_volatile_value(10);
State::Instance().gameQuirks = quirks;
}
+14 -3
View File
@@ -590,7 +590,11 @@ ffxReturnCode_t ffxDispatch_Dx12(ffxContext* context, ffxDispatchDescHeader* des
params->Set(NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, dispatchDesc->renderSize.height);
params->Set(NVSDK_NGX_Parameter_Depth, dispatchDesc->depth.resource);
params->Set(NVSDK_NGX_Parameter_ExposureTexture, dispatchDesc->exposure.resource);
params->Set(NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, dispatchDesc->reactive.resource);
if (dispatchDesc->reactive.description.width >= dispatchDesc->renderSize.width &&
dispatchDesc->reactive.description.height >= dispatchDesc->renderSize.height)
params->Set(NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, dispatchDesc->reactive.resource);
params->Set(NVSDK_NGX_Parameter_Color, dispatchDesc->color.resource);
params->Set(NVSDK_NGX_Parameter_MotionVectors, dispatchDesc->motionVectors.resource);
params->Set(NVSDK_NGX_Parameter_Output, dispatchDesc->output.resource);
@@ -599,8 +603,15 @@ ffxReturnCode_t ffxDispatch_Dx12(ffxContext* context, ffxDispatchDescHeader* des
params->Set("FSR.cameraFovAngleVertical", dispatchDesc->cameraFovAngleVertical);
params->Set("FSR.frameTimeDelta", dispatchDesc->frameTimeDelta);
params->Set("FSR.viewSpaceToMetersFactor", dispatchDesc->viewSpaceToMetersFactor);
params->Set("FSR.transparencyAndComposition", dispatchDesc->transparencyAndComposition.resource);
params->Set("FSR.reactive", dispatchDesc->reactive.resource);
if (dispatchDesc->transparencyAndComposition.description.width >= dispatchDesc->renderSize.width &&
dispatchDesc->transparencyAndComposition.description.height >= dispatchDesc->renderSize.height)
params->Set("FSR.transparencyAndComposition", dispatchDesc->transparencyAndComposition.resource);
if (dispatchDesc->reactive.description.width >= dispatchDesc->renderSize.width &&
dispatchDesc->reactive.description.height >= dispatchDesc->renderSize.height)
params->Set("FSR.reactive", dispatchDesc->reactive.resource);
params->Set(NVSDK_NGX_Parameter_Sharpness, dispatchDesc->sharpness);
params->Set("FSR.upscaleSize.width", dispatchDesc->upscaleSize.width);
params->Set("FSR.upscaleSize.height", dispatchDesc->upscaleSize.height);
+8
View File
@@ -21,6 +21,7 @@ enum class GameQuirk : uint64_t
DisableOptiXessPipelineCreation,
DontUseNTShared,
DontUseUnrealBarriers,
SkipFirst10Frames,
// Quirks that are applied deeper in code
CyberpunkHudlessStateOverride,
@@ -162,6 +163,11 @@ static const QuirkEntry quirkTable[] = {
// no spoof needed for DLSS inputs, but no DLSSG and Reflex
QUIRK_ENTRY("returnal-win64-shipping.exe", GameQuirk::DisableDxgiSpoofing, GameQuirk::DontUseUnrealBarriers),
// WUCHANG: Fallen Feathers
// Skip 1 frame use of upscaler which cause crash
QUIRK_ENTRY("project_plague-deck-shipping.exe", GameQuirk::SkipFirst10Frames),
QUIRK_ENTRY("project_plague-win64-shipping.exe", GameQuirk::SkipFirst10Frames),
// UNCHARTED: Legacy of Thieves Collection
// no spoof needed for DLSS inputs
QUIRK_ENTRY("u4.exe", GameQuirk::DisableDxgiSpoofing),
@@ -253,6 +259,8 @@ static void printQuirks(flag_set<GameQuirk>& quirks)
spdlog::info("Quirk: Don't use NTShared enabled");
if (quirks & GameQuirk::DontUseUnrealBarriers)
spdlog::info("Quirk: Don't use resource barrier fix for Unreal Engine games");
if (quirks & GameQuirk::SkipFirst10Frames)
spdlog::info("Quirk: Skipping upscaling for first 10 frames");
return;
}