Compare commits

...

7 commits

Author SHA1 Message Date
354f0ea2f0 add spline-1 filter
All checks were successful
eden-license / license-header (pull_request) Successful in 17s
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-21 03:35:59 +02:00
e1193bf89d actually memory is bad
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-21 03:35:59 +02:00
82b61bdd39 optimize with precomputed kernel
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-21 03:35:59 +02:00
eecc47b968 fix
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-21 03:35:59 +02:00
b0b6ecc6cb fix mispell
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-21 03:35:59 +02:00
f3e8eaabf7 [vk, opengl] add lanczo filtering
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-21 03:35:59 +02:00
06dabbadcb
[cmake] fix OpenGL, git rev identifier (#2530)
Reviewed-on: #2530
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2025-09-20 22:58:33 +02:00
24 changed files with 254 additions and 60 deletions

View file

@ -187,9 +187,7 @@ option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android"
option(FORCE_DOWNLOAD_WIN_BUNDLES "Forcefully download bundled Windows dependencies (useful for CI)" OFF)
# TODO(crueter): Cleanup, each dep that has a bundled option should allow to choose between bundled, external, system
if (YUZU_USE_CPM AND ENABLE_SDL2)
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
endif()
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}" "ENABLE_SDL2" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" OFF)
@ -209,6 +207,8 @@ CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead
set(YUZU_TZDB_PATH "" CACHE STRING "Path to a pre-downloaded timezone database")
option(YUZU_DISABLE_LLVM "Disable LLVM (useful for CI)" OFF)
set(DEFAULT_ENABLE_OPENSSL ON)
if (ANDROID OR WIN32 OR APPLE OR PLATFORM_SUN)
# - Windows defaults to the Schannel backend.
@ -483,7 +483,10 @@ if (YUZU_USE_CPM)
else()
# Enforce the search mode of non-required packages for better and shorter failure messages
find_package(fmt 8 REQUIRED)
find_package(LLVM MODULE COMPONENTS Demangle)
if (NOT YUZU_DISABLE_LLVM)
find_package(LLVM MODULE COMPONENTS Demangle)
endif()
find_package(nlohmann_json 3.8 REQUIRED)
find_package(lz4 REQUIRED)
find_package(RenderDoc MODULE)

View file

@ -598,11 +598,6 @@ function(AddCIPackage)
if (DEFINED ARTIFACT_DIR)
include(${ARTIFACT_DIR}/${ARTIFACT_CMAKE}.cmake)
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_NAMES ${ARTIFACT_NAME})
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_URLS "https://github.com/${ARTIFACT_REPO}") # TODO(crueter) other hosts?
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS ${ARTIFACT_VERSION})
set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE)
else()
find_package(${ARTIFACT_PACKAGE} ${ARTIFACT_MIN_VERSION} REQUIRED)

View file

@ -1,38 +1,35 @@
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Gets a UTC timestamp and sets the provided variable to it
# generate git/build information
include(GetSCMRev)
function(get_timestamp _var)
string(TIMESTAMP timestamp UTC)
set(${_var} "${timestamp}" PARENT_SCOPE)
endfunction()
# generate git/build information
include(GetGitRevisionDescription)
if(NOT GIT_REF_SPEC)
get_git_head_revision(GIT_REF_SPEC GIT_REV)
endif()
if(NOT GIT_DESC)
git_describe(GIT_DESC --always --long --dirty)
endif()
if (NOT GIT_BRANCH)
git_branch_name(GIT_BRANCH)
endif()
get_timestamp(BUILD_DATE)
git_get_exact_tag(GIT_TAG --tags)
if (GIT_TAG MATCHES "NOTFOUND")
set(BUILD_VERSION "${GIT_DESC}")
set(IS_DEV_BUILD true)
else()
set(BUILD_VERSION ${GIT_TAG})
if (DEFINED GIT_RELEASE)
set(BUILD_VERSION "${GIT_TAG}")
set(GIT_REFSPEC "${GIT_RELEASE}")
set(IS_DEV_BUILD false)
else()
string(SUBSTRING ${GIT_COMMIT} 0 10 BUILD_VERSION)
set(BUILD_VERSION "${BUILD_VERSION}-${GIT_REFSPEC}")
set(IS_DEV_BUILD true)
endif()
set(GIT_DESC ${BUILD_VERSION})
# Generate cpp with Git revision from template
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
set(REPO_NAME "Eden")
set(BUILD_ID ${GIT_BRANCH})
set(BUILD_ID ${GIT_REFSPEC})
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
set(CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")

View file

@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 2025 crueter
# SPDX-License-Identifier: GPL-3.0-or-later
include(GetGitRevisionDescription)
function(trim var)
string(REGEX REPLACE "\n" "" new "${${var}}")
set(${var} ${new} PARENT_SCOPE)
endfunction()
set(TAG_FILE ${CMAKE_SOURCE_DIR}/GIT-TAG)
set(REF_FILE ${CMAKE_SOURCE_DIR}/GIT-REFSPEC)
set(COMMIT_FILE ${CMAKE_SOURCE_DIR}/GIT-COMMIT)
set(RELEASE_FILE ${CMAKE_SOURCE_DIR}/GIT-RELEASE)
if (EXISTS ${REF_FILE} AND EXISTS ${COMMIT_FILE})
file(READ ${REF_FILE} GIT_REFSPEC)
file(READ ${COMMIT_FILE} GIT_COMMIT)
else()
get_git_head_revision(GIT_REFSPEC GIT_COMMIT)
git_branch_name(GIT_REFSPEC)
if (GIT_REFSPEC MATCHES "NOTFOUND")
set(GIT_REFSPEC 1.0.0)
set(GIT_COMMIT stable)
endif()
endif()
if (EXISTS ${TAG_FILE})
file(READ ${TAG_FILE} GIT_TAG)
else()
git_describe(GIT_TAG --tags --abbrev=0)
if (GIT_TAG MATCHES "NOTFOUND")
set(GIT_TAG "${GIT_REFSPEC}")
endif()
endif()
if (EXISTS ${RELEASE_FILE})
file(READ ${RELEASE_FILE} GIT_RELEASE)
trim(GIT_RELEASE)
message(STATUS "Git release: ${GIT_RELEASE}")
endif()
trim(GIT_REFSPEC)
trim(GIT_COMMIT)
trim(GIT_TAG)
message(STATUS "Git commit: ${GIT_COMMIT}")
message(STATUS "Git tag: ${GIT_TAG}")
message(STATUS "Git refspec: ${GIT_REFSPEC}")

View file

@ -6,8 +6,8 @@
#include "common/scm_rev.h"
#define GIT_REV "@GIT_REV@"
#define GIT_BRANCH "@GIT_BRANCH@"
#define GIT_REV "@GIT_COMMIT@"
#define GIT_BRANCH "@GIT_REFSPEC@"
#define GIT_DESC "@GIT_DESC@"
#define BUILD_NAME "@REPO_NAME@"
#define BUILD_DATE "@BUILD_DATE@"
@ -31,7 +31,7 @@ constexpr const char g_build_version[] = BUILD_VERSION;
constexpr const char g_build_id[] = BUILD_ID;
constexpr const char g_title_bar_format_idle[] = TITLE_BAR_FORMAT_IDLE;
constexpr const char g_title_bar_format_running[] = TITLE_BAR_FORMAT_RUNNING;
constexpr const bool g_is_dev_build = IS_DEV_BUILD;
constexpr const char g_compiler_id[] = COMPILER_ID;
constexpr const bool g_is_dev_build = IS_DEV_BUILD;
} // namespace Common

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
@ -19,7 +19,7 @@ extern const char g_build_id[];
extern const char g_title_bar_format_idle[];
extern const char g_title_bar_format_running[];
extern const char g_shader_cache_version[];
extern const bool g_is_dev_build;
extern const char g_compiler_id[];
extern const bool g_is_dev_build;
} // namespace Common

View file

@ -166,7 +166,7 @@ ENUM(ResolutionSetup,
Res7X,
Res8X);
ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, Gaussian, ScaleForce, Fsr, Area, MaxEnum);
ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, Spline1, Gaussian, Lanczos, ScaleForce, Fsr, Area, MaxEnum);
ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum);

View file

@ -27,7 +27,7 @@ endif()
option(DYNARMIC_FATAL_ERRORS "Errors are fatal" OFF)
option(DYNARMIC_IGNORE_ASSERTS "Ignore asserts" OFF)
option(DYNARMIC_TESTS_USE_UNICORN "Enable fuzzing tests against unicorn" OFF)
option(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF)
CMAKE_DEPENDENT_OPTION(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF "NOT YUZU_DISABLE_LLVM" OFF)
if (PLATFORM_OPENBSD)
option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)

View file

@ -40,7 +40,10 @@ endif()
add_subdirectory(externals)
target_link_libraries(qt_common PRIVATE core Qt6::Core SimpleIni::SimpleIni QuaZip::QuaZip frozen::frozen)
target_link_libraries(qt_common PRIVATE Qt6::Core)
if (NOT APPLE AND ENABLE_OPENGL)
target_compile_definitions(qt_common PUBLIC HAS_OPENGL)
endif()
if (NOT WIN32)
target_include_directories(qt_common PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})

View file

@ -572,7 +572,9 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent)
PAIR(ScalingFilter, NearestNeighbor, tr("Nearest Neighbor")),
PAIR(ScalingFilter, Bilinear, tr("Bilinear")),
PAIR(ScalingFilter, Bicubic, tr("Bicubic")),
PAIR(ScalingFilter, Spline1, tr("Spline-1")),
PAIR(ScalingFilter, Gaussian, tr("Gaussian")),
PAIR(ScalingFilter, Lanczos, tr("Lanczos")),
PAIR(ScalingFilter, ScaleForce, tr("ScaleForce")),
PAIR(ScalingFilter, Fsr, tr("AMD FidelityFX™ Super Resolution")),
PAIR(ScalingFilter, Area, tr("Area")),

View file

@ -38,8 +38,12 @@ static const std::map<Settings::ScalingFilter, QString> scaling_filter_texts_map
{Settings::ScalingFilter::Bilinear,
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bilinear"))},
{Settings::ScalingFilter::Bicubic, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bicubic"))},
{Settings::ScalingFilter::Spline1,
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Spline-1"))},
{Settings::ScalingFilter::Gaussian,
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Gaussian"))},
{Settings::ScalingFilter::Lanczos,
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Lanczos"))},
{Settings::ScalingFilter::ScaleForce,
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "ScaleForce"))},
{Settings::ScalingFilter::Fsr, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "FSR"))},

View file

@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
set(FIDELITYFX_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/externals/FidelityFX-FSR/ffx-fsr)
@ -45,6 +45,8 @@ set(SHADER_FILES
present_area.frag
present_bicubic.frag
present_gaussian.frag
present_lanczos.frag
present_spline1.frag
queries_prefix_scan_sum.comp
queries_prefix_scan_sum_nosubgroups.comp
resolve_conditional_render.comp

View file

@ -0,0 +1,40 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// https://en.wikipedia.org/wiki/Lanczos_resampling
#version 460 core
layout (location = 0) in vec2 frag_tex_coord;
layout (location = 0) out vec4 color;
layout (binding = 0) uniform sampler2D color_texture;
#define PI 3.1415926535897932384626433
float sinc(float x) {
return x == 0.0f ? 1.0f : sin(PI * x) / (PI * x);
}
float lanczos(vec2 v, float a) {
float d = length(v);
return sinc(d) / sinc(d / a);
}
vec4 textureLanczos(sampler2D textureSampler, vec2 p) {
vec3 c_sum = vec3(0.0f);
float w_sum = 0.0f;
vec2 res = vec2(textureSize(textureSampler, 0));
vec2 cc = floor(p * res) / res;
// kernel size = (2r + 1)^2
const int r = 3; //radius (1 = 3 steps)
for (int x = -r; x <= r; x++)
for (int y = -r; y <= r; y++) {
vec2 kp = 0.5f * (vec2(x, y) / res); // 0.5 = half-pixel level resampling
vec2 uv = cc + kp;
float w = lanczos(kp, float(r));
c_sum += w * texture(textureSampler, p + kp).rgb;
w_sum += w;
}
return vec4(c_sum / w_sum, 1.0f);
}
void main() {
color = textureLanczos(color_texture, frag_tex_coord);
}

View file

@ -0,0 +1,24 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// Spline (smooth linear inerpolation) with 1 texel fetch (needs bilinear to work)
// Emulates bicubic without actually doing bicubic
// See https://iquilezles.org/articles/texture, unfortunely there are issues with the original
// where smoothstep "expansion" actually results in worse codegen (SPIRV-Opt does a direct conv to smoothstep)
// TODO: Numerical analysis - fract is sawtooth func and floor, reuse params? Perhaps - no need for precision
#version 460 core
layout (location = 0) in vec2 frag_tex_coord;
layout (location = 0) out vec4 color;
layout (binding = 0) uniform sampler2D color_texture;
vec4 textureSpline1(sampler2D sam, vec2 uv) {
float r = float(textureSize(sam, 0).x);
vec2 x = fract(uv * r + 0.5);
return texture(sam, (floor(uv * r + 0.5) + smoothstep(0.0, 1.0, x) - 0.5) / r);
}
void main() {
color = textureSpline1(color_texture, frag_tex_coord);
}

View file

@ -89,6 +89,12 @@ void BlitScreen::CreateWindowAdapt() {
case Settings::ScalingFilter::Gaussian:
window_adapt = MakeGaussian(device);
break;
case Settings::ScalingFilter::Spline1:
window_adapt = MakeSpline1(device);
break;
case Settings::ScalingFilter::Lanczos:
window_adapt = MakeLanczos(device);
break;
case Settings::ScalingFilter::ScaleForce:
window_adapt = MakeScaleForce(device);
break;

View file

@ -12,6 +12,7 @@
#include "video_core/host_shaders/present_area_frag.h"
#include "video_core/host_shaders/present_bicubic_frag.h"
#include "video_core/host_shaders/present_gaussian_frag.h"
#include "video_core/host_shaders/present_lanczos_frag.h"
#include "video_core/renderer_opengl/present/filters.h"
#include "video_core/renderer_opengl/present/util.h"
@ -27,6 +28,11 @@ std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device) {
HostShaders::OPENGL_PRESENT_FRAG);
}
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device) {
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
HostShaders::PRESENT_SPLINE1_FRAG);
}
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device) {
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
HostShaders::PRESENT_BICUBIC_FRAG);
@ -37,6 +43,11 @@ std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device) {
HostShaders::PRESENT_GAUSSIAN_FRAG);
}
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device) {
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
HostShaders::PRESENT_LANCZOS_FRAG);
}
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device) {
return std::make_unique<WindowAdaptPass>(
device, CreateBilinearSampler(),

View file

@ -18,6 +18,8 @@ std::unique_ptr<WindowAdaptPass> MakeNearestNeighbor(const Device& device);
std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device);
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device);
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device);
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device);
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device);
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device);
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device);

View file

@ -12,6 +12,7 @@
#include "video_core/host_shaders/present_area_frag_spv.h"
#include "video_core/host_shaders/present_bicubic_frag_spv.h"
#include "video_core/host_shaders/present_gaussian_frag_spv.h"
#include "video_core/host_shaders/present_lanczos_frag_spv.h"
#include "video_core/host_shaders/vulkan_present_frag_spv.h"
#include "video_core/host_shaders/vulkan_present_scaleforce_fp16_frag_spv.h"
#include "video_core/host_shaders/vulkan_present_scaleforce_fp32_frag_spv.h"
@ -45,6 +46,11 @@ std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device, VkFormat fra
BuildShader(device, VULKAN_PRESENT_FRAG_SPV));
}
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device, VkFormat frame_format) {
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateBilinearSampler(device),
BuildShader(device, PRESENT_SPLINE1_FRAG_SPV));
}
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format) {
// No need for handrolled shader -- if the VK impl can do it for us ;)
if (device.IsExtFilterCubicSupported())
@ -59,6 +65,11 @@ std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device, VkFormat fra
BuildShader(device, PRESENT_GAUSSIAN_FRAG_SPV));
}
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device, VkFormat frame_format) {
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateBilinearSampler(device),
BuildShader(device, PRESENT_LANCZOS_FRAG_SPV));
}
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device, VkFormat frame_format) {
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateBilinearSampler(device),
SelectScaleForceShader(device));

View file

@ -18,7 +18,9 @@ class MemoryAllocator;
std::unique_ptr<WindowAdaptPass> MakeNearestNeighbor(const Device& device, VkFormat frame_format);
std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device, VkFormat frame_format);
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format);
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device, VkFormat frame_format);
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device, VkFormat frame_format);
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device, VkFormat frame_format);
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device, VkFormat frame_format);
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device, VkFormat frame_format);

View file

@ -43,9 +43,15 @@ void BlitScreen::SetWindowAdaptPass() {
case Settings::ScalingFilter::Bicubic:
window_adapt = MakeBicubic(device, swapchain_view_format);
break;
case Settings::ScalingFilter::Spline1:
window_adapt = MakeSpline1(device, swapchain_view_format);
break;
case Settings::ScalingFilter::Gaussian:
window_adapt = MakeGaussian(device, swapchain_view_format);
break;
case Settings::ScalingFilter::Lanczos:
window_adapt = MakeLanczos(device, swapchain_view_format);
break;
case Settings::ScalingFilter::ScaleForce:
window_adapt = MakeScaleForce(device, swapchain_view_format);
break;

View file

@ -480,10 +480,6 @@ if (MSVC)
copy_yuzu_FFmpeg_deps(yuzu)
endif()
if (NOT APPLE AND ENABLE_OPENGL)
target_compile_definitions(yuzu PRIVATE HAS_OPENGL)
endif()
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
target_link_libraries(yuzu PRIVATE dynarmic::dynarmic)
endif()

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -11,16 +14,11 @@ AboutDialog::AboutDialog(QWidget* parent)
: QDialog(parent)
, ui{std::make_unique<Ui::AboutDialog>()}
{
static const std::string description = std::string(Common::g_build_version);
static const std::string build_id = std::string(Common::g_build_id);
static const std::string compiler = std::string(Common::g_compiler_id);
static const std::string description = std::string{Common::g_build_version};
static const std::string build_id = std::string{Common::g_build_id};
static const std::string compiler = std::string{Common::g_compiler_id};
std::string yuzu_build;
if (Common::g_is_dev_build) {
yuzu_build = fmt::format("Eden Nightly | {}-{} | {}", description, build_id, compiler);
} else {
yuzu_build = fmt::format("Eden | {} | {}", description, compiler);
}
static const std::string yuzu_build = fmt::format("Eden | {} | {}", description, compiler);
const auto override_build = fmt::format(fmt::runtime(
std::string(Common::g_title_bar_format_idle)),

View file

@ -4205,16 +4205,11 @@ void GMainWindow::OnEmulatorUpdateAvailable() {
void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_view title_version,
std::string_view gpu_vendor) {
static const std::string description = std::string(Common::g_build_version);
static const std::string build_id = std::string(Common::g_build_id);
static const std::string compiler = std::string(Common::g_compiler_id);
static const std::string description = std::string{Common::g_build_version};
static const std::string build_id = std::string{Common::g_build_id};
static const std::string compiler = std::string{Common::g_compiler_id};
std::string yuzu_title;
if (Common::g_is_dev_build) {
yuzu_title = fmt::format("Eden Nightly | {}-{} | {}", description, build_id, compiler);
} else {
yuzu_title = fmt::format("Eden | {} | {}", description, compiler);
}
static const std::string yuzu_title = fmt::format("Eden | {} | {}", description, compiler);
const auto override_title =
fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id);

48
tools/lanczos_gen.c Normal file
View file

@ -0,0 +1,48 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// clang -lm tools/lanczos_gen.c -o tools/lanczos_gen && ./tools/lanczos_gen
#include <stdio.h>
#include <math.h>
double sinc(double x) {
return x == 0.0f ? 1.0f : sin(M_PI * x) / (M_PI * x);
}
typedef struct vec2 {
double x;
double y;
} vec2;
double lanczos(vec2 v, float a) {
double d = sqrt(v.x * v.x + v.y * v.y);
return sinc(d) / sinc(d / a);
}
int main(int argc, char* argv[]) {
const int r = 3; //radius (1 = 3 steps)
const int k_size = (r * 2 + 1) * (r * 2 + 1);
double w_sum = 0.0f;
// kernel size = (r * 2 + 1) ^ 2
printf("const float w_kernel[%i] = float[] (\n ", k_size);
double factor = 1.0f / ((double)r + 1.0f);
for (int x = -r; x <= r; x++)
for (int y = -r; y <= r; y++) {
double w = lanczos((vec2){ .x = x, .y = y }, (double)r);
printf("%lff, ", w);
w_sum += w;
}
printf("\n);\n");
printf("const vec2 w_pos[%i] = vec2[] (\n ", k_size);
for (int x = -r; x <= r; x++)
for (int y = -r; y <= r; y++) {
vec2 kp = (vec2){
.x = x * factor,
.y = y * factor
};
printf("vec2(%lff, %lff), ", kp.x, kp.y);
}
printf("\n);\n");
printf("const float w_sum = %lff;\n", w_sum);
return 0;
}