1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-01 00:46:32 -05:00

Full rebrand

This commit is contained in:
JuanCStar
2024-03-08 09:06:48 +00:00
committed by Crimson Hawk
parent c445fa1e3e
commit 88b901a24e
427 changed files with 55946 additions and 56077 deletions

View File

@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project & 2024 suyu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
add_subdirectory(host_shaders)
@@ -320,7 +320,7 @@ add_library(video_core STATIC
target_link_libraries(video_core PUBLIC common core)
target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder)
if (YUZU_USE_BUNDLED_FFMPEG AND NOT (WIN32 OR ANDROID))
if (SUYU_USE_BUNDLED_FFMPEG AND NOT (WIN32 OR ANDROID))
add_dependencies(video_core ffmpeg-build)
endif()
@@ -380,11 +380,11 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
target_link_libraries(video_core PRIVATE dynarmic::dynarmic)
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(video_core PRIVATE precompiled_headers.h)
endif()
if (YUZU_ENABLE_LTO)
if (SUYU_ENABLE_LTO)
set_property(TARGET video_core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
//!#version 460 core
@@ -39,7 +39,7 @@ layout(set=0,binding=0) uniform sampler2D InputTexture;
#define A_GLSL 1
#define FSR_RCAS_PASSTHROUGH_ALPHA 1
#ifndef YUZU_USE_FP16
#ifndef SUYU_USE_FP16
#include "ffx_a.h"
#if USE_EASU
@@ -77,7 +77,7 @@ layout (location = 0) out vec4 frag_color;
void CurrFilter(AU2 pos) {
#if USE_EASU
#ifndef YUZU_USE_FP16
#ifndef SUYU_USE_FP16
AF3 c;
FsrEasuF(c, pos, Const0, Const1, Const2, Const3);
frag_color = AF4(c, texture(InputTexture, frag_texcoord).a);
@@ -88,7 +88,7 @@ void CurrFilter(AU2 pos) {
#endif
#endif
#if USE_RCAS
#ifndef YUZU_USE_FP16
#ifndef SUYU_USE_FP16
AF4 c;
FsrRcasF(c.r, c.g, c.b, c.a, pos, Const0);
frag_color = c;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
//!#version 460 core
@@ -33,12 +33,12 @@ layout (location = 0) uniform uvec4 constants[4];
#define A_GLSL 1
#define FSR_RCAS_PASSTHROUGH_ALPHA 1
#ifdef YUZU_USE_FP16
#ifdef SUYU_USE_FP16
#define A_HALF
#endif
#include "ffx_a.h"
#ifndef YUZU_USE_FP16
#ifndef SUYU_USE_FP16
layout (binding=0) uniform sampler2D InputTexture;
#if USE_EASU
#define FSR_EASU_F 1
@@ -74,7 +74,7 @@ layout (location = 0) out vec4 frag_color;
void CurrFilter(AU2 pos)
{
#if USE_EASU
#ifndef YUZU_USE_FP16
#ifndef SUYU_USE_FP16
AF3 c;
FsrEasuF(c, pos, constants[0], constants[1], constants[2], constants[3]);
frag_color = AF4(c, texture(InputTexture, frag_texcoord).a);
@@ -85,7 +85,7 @@ void CurrFilter(AU2 pos)
#endif
#endif
#if USE_RCAS
#ifndef YUZU_USE_FP16
#ifndef SUYU_USE_FP16
AF4 c;
FsrRcasF(c.r, c.g, c.b, c.a, pos, constants[0]);
frag_color = c;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2020 BreadFish64
// SPDX-FileCopyrightText: 2020 BreadFish64 & 2024 suyu Emulator Project
// SPDX-License-Identifier: MIT
// Adapted from https://github.com/BreadFish64/ScaleFish/tree/master/scaleforce
@@ -7,7 +7,7 @@
#extension GL_ARB_separate_shader_objects : enable
#ifdef YUZU_USE_FP16
#ifdef SUYU_USE_FP16
#extension GL_AMD_gpu_shader_half_float : enable
#extension GL_NV_gpu_shader5 : enable

View File

@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#version 460 core
#extension GL_GOOGLE_include_directive : enable
#define YUZU_USE_FP16
#define SUYU_USE_FP16
#define USE_EASU 1
#define VERSION 1

View File

@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#version 460 core
#extension GL_GOOGLE_include_directive : enable
#define YUZU_USE_FP16
#define SUYU_USE_FP16
#define USE_RCAS 1
#define VERSION 1

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#version 460
@@ -6,6 +6,6 @@
#extension GL_GOOGLE_include_directive : enable
#define VERSION 2
#define YUZU_USE_FP16
#define SUYU_USE_FP16
#include "opengl_present_scaleforce.frag"

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -253,8 +253,8 @@ private:
return cache_begin < addr_end && addr_begin < cache_end;
};
const u64 page_end = addr_end >> YUZU_PAGEBITS;
for (u64 page = addr_begin >> YUZU_PAGEBITS; page <= page_end; ++page) {
const u64 page_end = addr_end >> SUYU_PAGEBITS;
for (u64 page = addr_begin >> SUYU_PAGEBITS; page <= page_end; ++page) {
const auto& it = cached_queries.find(page);
if (it == std::end(cached_queries)) {
continue;
@@ -281,14 +281,14 @@ private:
/// Registers the passed parameters as cached and returns a pointer to the stored cached query.
CachedQuery* Register(VideoCore::QueryType type, VAddr cpu_addr, u8* host_ptr, bool timestamp) {
const u64 page = static_cast<u64>(cpu_addr) >> YUZU_PAGEBITS;
const u64 page = static_cast<u64>(cpu_addr) >> SUYU_PAGEBITS;
return &cached_queries[page].emplace_back(static_cast<QueryCache&>(*this), type, cpu_addr,
host_ptr);
}
/// Tries to a get a cached query. Returns nullptr on failure.
CachedQuery* TryGet(VAddr addr) {
const u64 page = static_cast<u64>(addr) >> YUZU_PAGEBITS;
const u64 page = static_cast<u64>(addr) >> SUYU_PAGEBITS;
const auto it = cached_queries.find(page);
if (it == std::end(cached_queries)) {
return nullptr;
@@ -338,8 +338,8 @@ private:
rasterizer.SyncOperation(std::move(operation));
}
static constexpr std::uintptr_t YUZU_PAGESIZE = 4096;
static constexpr unsigned YUZU_PAGEBITS = 12;
static constexpr std::uintptr_t SUYU_PAGESIZE = 4096;
static constexpr unsigned SUYU_PAGEBITS = 12;
Common::SlotVector<AsyncJob> slot_async_jobs;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
// SPDX-FileCopyrightText: 2015 Citra Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string_view>
@@ -175,7 +175,7 @@ void OGLFramebuffer::Create() {
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
// Bind to READ_FRAMEBUFFER to stop Nvidia's driver from creating an EXT_framebuffer instead of
// a core framebuffer. EXT framebuffer attachments have to match in size and can be shared
// across contexts. yuzu doesn't share framebuffers across contexts and we need attachments with
// across contexts. suyu doesn't share framebuffers across contexts and we need attachments with
// mismatching size, this is why core framebuffers are preferred.
glGenFramebuffers(1, &handle);
glBindFramebuffer(GL_READ_FRAMEBUFFER, handle);

View File

@@ -151,7 +151,7 @@ FramebufferTextureInfo Layer::LoadFBToScreenInfo(const Tegra::FramebufferConfig&
// Update existing texture
// TODO: Test what happens on hardware when you change the framebuffer dimensions so that
// they differ from the LCD resolution.
// TODO: Applications could theoretically crash yuzu here by specifying too large
// TODO: Applications could theoretically crash suyu here by specifying too large
// framebuffer sizes. We should make sure that this cannot happen.
glTextureSubImage2D(framebuffer_texture.resource.handle, 0, 0, 0, framebuffer.width,
framebuffer.height, framebuffer_texture.gl_format,

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -127,8 +127,8 @@ void ShaderCache::Register(std::unique_ptr<ShaderInfo> data, VAddr addr, size_t
const VAddr addr_end = addr + size;
Entry* const entry = NewEntry(addr, addr_end, data.get());
const u64 page_end = (addr_end + YUZU_PAGESIZE - 1) >> YUZU_PAGEBITS;
for (u64 page = addr >> YUZU_PAGEBITS; page < page_end; ++page) {
const u64 page_end = (addr_end + SUYU_PAGESIZE - 1) >> SUYU_PAGEBITS;
for (u64 page = addr >> SUYU_PAGEBITS; page < page_end; ++page) {
invalidation_cache[page].push_back(entry);
}
@@ -139,8 +139,8 @@ void ShaderCache::Register(std::unique_ptr<ShaderInfo> data, VAddr addr, size_t
void ShaderCache::InvalidatePagesInRegion(VAddr addr, size_t size) {
const VAddr addr_end = addr + size;
const u64 page_end = (addr_end + YUZU_PAGESIZE - 1) >> YUZU_PAGEBITS;
for (u64 page = addr >> YUZU_PAGEBITS; page < page_end; ++page) {
const u64 page_end = (addr_end + SUYU_PAGESIZE - 1) >> SUYU_PAGEBITS;
for (u64 page = addr >> SUYU_PAGEBITS; page < page_end; ++page) {
auto it = invalidation_cache.find(page);
if (it == invalidation_cache.end()) {
continue;
@@ -191,8 +191,8 @@ void ShaderCache::InvalidatePageEntries(std::vector<Entry*>& entries, VAddr addr
}
void ShaderCache::RemoveEntryFromInvalidationCache(const Entry* entry) {
const u64 page_end = (entry->addr_end + YUZU_PAGESIZE - 1) >> YUZU_PAGEBITS;
for (u64 page = entry->addr_start >> YUZU_PAGEBITS; page < page_end; ++page) {
const u64 page_end = (entry->addr_end + SUYU_PAGESIZE - 1) >> SUYU_PAGEBITS;
for (u64 page = entry->addr_start >> SUYU_PAGEBITS; page < page_end; ++page) {
const auto entries_it = invalidation_cache.find(page);
ASSERT(entries_it != invalidation_cache.end());
std::vector<Entry*>& entries = entries_it->second;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -36,8 +36,8 @@ struct ShaderInfo {
};
class ShaderCache : public VideoCommon::ChannelSetupCaches<VideoCommon::ChannelInfo> {
static constexpr u64 YUZU_PAGEBITS = 14;
static constexpr u64 YUZU_PAGESIZE = u64(1) << YUZU_PAGEBITS;
static constexpr u64 SUYU_PAGEBITS = 14;
static constexpr u64 SUYU_PAGESIZE = u64(1) << SUYU_PAGEBITS;
static constexpr size_t NUM_PROGRAMS = 6;

View File

@@ -732,7 +732,7 @@ template <class P>
std::pair<typename P::ImageView*, bool> TextureCache<P>::TryFindFramebufferImageView(
const Tegra::FramebufferConfig& config, DAddr cpu_addr) {
// TODO: Properly implement this
const auto it = page_table.find(cpu_addr >> YUZU_PAGEBITS);
const auto it = page_table.find(cpu_addr >> SUYU_PAGEBITS);
if (it == page_table.end()) {
return {};
}
@@ -2039,14 +2039,14 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
selected_page_table) {
const auto page_it = selected_page_table.find(page);
if (page_it == selected_page_table.end()) {
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS);
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << SUYU_PAGEBITS);
return;
}
std::vector<ImageId>& image_ids = page_it->second;
const auto vector_it = std::ranges::find(image_ids, image_id);
if (vector_it == image_ids.end()) {
ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}",
page << YUZU_PAGEBITS);
page << SUYU_PAGEBITS);
return;
}
image_ids.erase(vector_it);
@@ -2059,14 +2059,14 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
ForEachCPUPage(image.cpu_addr, image.guest_size_bytes, [this, map_id](u64 page) {
const auto page_it = page_table.find(page);
if (page_it == page_table.end()) {
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS);
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << SUYU_PAGEBITS);
return;
}
std::vector<ImageMapId>& image_map_ids = page_it->second;
const auto vector_it = std::ranges::find(image_map_ids, map_id);
if (vector_it == image_map_ids.end()) {
ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}",
page << YUZU_PAGEBITS);
page << SUYU_PAGEBITS);
return;
}
image_map_ids.erase(vector_it);
@@ -2087,7 +2087,7 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
ForEachCPUPage(cpu_addr, size, [this, image_id](u64 page) {
const auto page_it = page_table.find(page);
if (page_it == page_table.end()) {
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS);
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << SUYU_PAGEBITS);
return;
}
std::vector<ImageMapId>& image_map_ids = page_it->second;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
@@ -92,7 +92,7 @@ public:
template <class P>
class TextureCache : public VideoCommon::ChannelSetupCaches<TextureCacheChannelInfo> {
/// Address shift for caching images into a hash table
static constexpr u64 YUZU_PAGEBITS = 20;
static constexpr u64 SUYU_PAGEBITS = 20;
/// Enables debugging features to the texture cache
static constexpr bool ENABLE_VALIDATION = P::ENABLE_VALIDATION;
@@ -257,8 +257,8 @@ private:
template <typename Func>
static void ForEachCPUPage(DAddr addr, size_t size, Func&& func) {
static constexpr bool RETURNS_BOOL = std::is_same_v<std::invoke_result<Func, u64>, bool>;
const u64 page_end = (addr + size - 1) >> YUZU_PAGEBITS;
for (u64 page = addr >> YUZU_PAGEBITS; page <= page_end; ++page) {
const u64 page_end = (addr + size - 1) >> SUYU_PAGEBITS;
for (u64 page = addr >> SUYU_PAGEBITS; page <= page_end; ++page) {
if constexpr (RETURNS_BOOL) {
if (func(page)) {
break;
@@ -272,8 +272,8 @@ private:
template <typename Func>
static void ForEachGPUPage(GPUVAddr addr, size_t size, Func&& func) {
static constexpr bool RETURNS_BOOL = std::is_same_v<std::invoke_result<Func, u64>, bool>;
const u64 page_end = (addr + size - 1) >> YUZU_PAGEBITS;
for (u64 page = addr >> YUZU_PAGEBITS; page <= page_end; ++page) {
const u64 page_end = (addr + size - 1) >> SUYU_PAGEBITS;
for (u64 page = addr >> SUYU_PAGEBITS; page <= page_end; ++page) {
if constexpr (RETURNS_BOOL) {
if (func(page)) {
break;

View File

@@ -186,7 +186,7 @@ void NsightAftermathTracker::OnShaderDebugInfoCallback(const void* shader_debug_
void NsightAftermathTracker::OnCrashDumpDescriptionCallback(
PFN_GFSDK_Aftermath_AddGpuCrashDumpDescription add_description) {
add_description(GFSDK_Aftermath_GpuCrashDumpDescriptionKey_ApplicationName, "yuzu");
add_description(GFSDK_Aftermath_GpuCrashDumpDescriptionKey_ApplicationName, "suyu");
}
void NsightAftermathTracker::GpuCrashDumpCallback(const void* gpu_crash_dump,

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -431,9 +431,9 @@ Instance Instance::Create(u32 version, Span<const char*> layers, Span<const char
const VkApplicationInfo application_info{
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
.pNext = nullptr,
.pApplicationName = "yuzu Emulator",
.pApplicationName = "suyu Emulator",
.applicationVersion = VK_MAKE_VERSION(0, 1, 0),
.pEngineName = "yuzu Emulator",
.pEngineName = "suyu Emulator",
.engineVersion = VK_MAKE_VERSION(0, 1, 0),
.apiVersion = VK_API_VERSION_1_3,
};