Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Features/Upscaling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@ void Upscaling::DrawSettings()
// Check the current upscale method
auto upscaleMethod = GetUpscaleMethod();

// Display warning for DLSS resolution limits
if (upscaleMethod == UpscaleMethod::kDLSS) {
auto screenSize = globals::state->screenSize;
if (screenSize.x > streamline.MAX_RESOLUTION || screenSize.y > streamline.MAX_RESOLUTION) {
ImGui::PushStyleColor(ImGuiCol_Text, Util::Colors::GetWarning());
ImGui::Text("Warning: Requested resolution %.0f x %.0f exceeds maximum supported resolution %d x %d for DLSS.", screenSize.x, screenSize.y, streamline.MAX_RESOLUTION, streamline.MAX_RESOLUTION);
ImGui::Text("DLSS will not function. Lower your resolution or select a different upscaling method.");
ImGui::PopStyleColor();
}
}

// Display upscaling settings if applicable
if (upscaleMethod != UpscaleMethod::kNONE && upscaleMethod != UpscaleMethod::kTAA) {
const char* upscalePresetsDLSS[] = { "Ultra Performance", "Performance", "Balanced", "Quality", "DLAA" };
Expand Down
5 changes: 4 additions & 1 deletion src/Features/Upscaling/Streamline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,10 @@ float2 Streamline::GetInputResolutionScale(uint32_t outputWidth, uint32_t output
sl::DLSSOptimalSettings optimalSettings{};
sl::Result result = slDLSSGetOptimalSettings(dlssOptions, optimalSettings);
if (result != sl::Result::eOk) {
logger::critical("[Streamline] Failed to get DLSS optimal settings, error code: {}", (int)result);
if (outputWidth > MAX_RESOLUTION || outputHeight > MAX_RESOLUTION) {
logger::critical("[Streamline] Requested resolution {} x {} exceeds the maximum allowed resolution of {} x {}. Lower your resolution to enable Streamline.", outputWidth, outputHeight, MAX_RESOLUTION, MAX_RESOLUTION);
}
logger::critical("[Streamline] Failed to get DLSS optimal settings, error code: {}({})", magic_enum::enum_name(result), (int)result);
return { 1.0f, 1.0f };
}

Expand Down
2 changes: 1 addition & 1 deletion src/Features/Upscaling/Streamline.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Streamline
bool featureDLSS = false;

sl::ViewportHandle viewport{ 0 };

static constexpr uint32_t MAX_RESOLUTION = 8192;
HMODULE interposer = NULL;

// SL Interposer Functions
Expand Down