Skip to content
Open
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
1 change: 1 addition & 0 deletions src/Backends/DRMBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3461,6 +3461,7 @@ namespace gamescope
bNeedsFullComposite |= bWasFirstFrame;
bNeedsFullComposite |= pFrameInfo->useFSRLayer0;
bNeedsFullComposite |= pFrameInfo->useNISLayer0;
bNeedsFullComposite |= pFrameInfo->useAnime4k2xCnnULLayer0;
bNeedsFullComposite |= pFrameInfo->blurLayer0;
bNeedsFullComposite |= bNeedsCompositeFromFilter;
bNeedsFullComposite |= !k_bUseCursorPlane && bDrewCursor;
Expand Down
1 change: 1 addition & 0 deletions src/Backends/OpenVRBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,7 @@ namespace gamescope
bNeedsFullComposite |= cv_composite_force;
bNeedsFullComposite |= pFrameInfo->useFSRLayer0;
bNeedsFullComposite |= pFrameInfo->useNISLayer0;
bNeedsFullComposite |= pFrameInfo->useAnime4k2xCnnULLayer0;
bNeedsFullComposite |= pFrameInfo->blurLayer0;
bNeedsFullComposite |= bNeedsCompositeFromFilter;
bNeedsFullComposite |= g_bColorSliderInUse;
Expand Down
1 change: 1 addition & 0 deletions src/Backends/WaylandBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ namespace gamescope
bNeedsFullComposite |= cv_composite_force;
bNeedsFullComposite |= pFrameInfo->useFSRLayer0;
bNeedsFullComposite |= pFrameInfo->useNISLayer0;
bNeedsFullComposite |= pFrameInfo->useAnime4k2xCnnULLayer0;
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing integration in DRMBackend and OpenVRBackend. The useAnime4k2xCnnULLayer0 flag is checked in WaylandBackend to determine if full composite is needed, but the same check is missing in DRMBackend.cpp and OpenVRBackend.cpp. These backends also check useFSRLayer0 and useNISLayer0 in their bNeedsFullComposite logic (see DRMBackend.cpp:3462-3463 and OpenVRBackend.cpp:1571-1572), so they should similarly check useAnime4k2xCnnULLayer0. Without this, the anime4k filter may not work correctly on DRM and OpenVR backends.

Copilot uses AI. Check for mistakes.
bNeedsFullComposite |= pFrameInfo->blurLayer0;
bNeedsFullComposite |= bNeedsCompositeFromFilter;
bNeedsFullComposite |= g_bColorSliderInUse;
Expand Down
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ const char usage[] =
" -r, --nested-refresh game refresh rate (frames per second)\n"
" -m, --max-scale maximum scale factor\n"
" -S, --scaler upscaler type (auto, integer, fit, fill, stretch)\n"
" -F, --filter upscaler filter (linear, nearest, fsr, nis, pixel)\n"
" -F, --filter upscaler filter (linear, nearest, fsr, nis, pixel, anime4k)\n"
" fsr => AMD FidelityFX™ Super Resolution 1.0\n"
" nis => NVIDIA Image Scaling v1.0.3\n"
" anime4k => Anime4K 2x CNN UL upscaling\n"
" --sharpness, --fsr-sharpness upscaler sharpness from 0 (max) to 20 (min)\n"
" --expose-wayland support wayland clients using xdg-shell\n"
" -s, --mouse-sensitivity multiply mouse movement by given decimal number\n"
Expand Down Expand Up @@ -410,6 +411,8 @@ static enum GamescopeUpscaleFilter parse_upscaler_filter(const char *str)
return GamescopeUpscaleFilter::NIS;
} else if (strcmp(str, "pixel") == 0) {
return GamescopeUpscaleFilter::PIXEL;
} else if (strcmp(str, "anime4k") == 0) {
return GamescopeUpscaleFilter::ANIME4K_2X_CNN_UL;
} else {
fprintf( stderr, "gamescope: invalid value for --filter\n" );
exit(1);
Expand Down
2 changes: 1 addition & 1 deletion src/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum class GamescopeUpscaleFilter : uint32_t
FSR,
NIS,
PIXEL,

ANIME4K_2X_CNN_UL,
FROM_VIEW = 0xF, // internal
};

Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ shader_src = [
'shaders/cs_nis.comp',
'shaders/cs_nis_fp16.comp',
'shaders/cs_rgb_to_nv12.comp',
'shaders/Anime4k/CNN_x2_UL/cs_anime4k_2x_cnn_ul.comp',
]

spirv_shaders = glsl_generator.process(shader_src)
Expand Down
Loading