chore: update project branding to CITRON

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-05-06 16:11:33 +10:00
parent 5e16e20427
commit b2d9cf4a01
119 changed files with 483 additions and 483 deletions

View File

@@ -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 (CITRON_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 (CITRON_USE_PRECOMPILED_HEADERS)
target_precompile_headers(video_core PRIVATE precompiled_headers.h)
endif()
if (YUZU_ENABLE_LTO)
if (CITRON_ENABLE_LTO)
set_property(TARGET video_core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()

View File

@@ -43,8 +43,8 @@ class DeinterlaceFilter;
// Wraps an AVPacket, a container for compressed bitstream data.
class Packet {
public:
YUZU_NON_COPYABLE(Packet);
YUZU_NON_MOVEABLE(Packet);
CITRON_NON_COPYABLE(Packet);
CITRON_NON_MOVEABLE(Packet);
explicit Packet(std::span<const u8> data);
~Packet();
@@ -60,8 +60,8 @@ private:
// Wraps an AVFrame, a container for audio and video stream data.
class Frame {
public:
YUZU_NON_COPYABLE(Frame);
YUZU_NON_MOVEABLE(Frame);
CITRON_NON_COPYABLE(Frame);
CITRON_NON_MOVEABLE(Frame);
explicit Frame();
~Frame();
@@ -109,8 +109,8 @@ private:
// Wraps an AVCodec, a type containing information about a codec.
class Decoder {
public:
YUZU_NON_COPYABLE(Decoder);
YUZU_NON_MOVEABLE(Decoder);
CITRON_NON_COPYABLE(Decoder);
CITRON_NON_MOVEABLE(Decoder);
explicit Decoder(Tegra::Host1x::NvdecCommon::VideoCodec codec);
~Decoder() = default;
@@ -128,8 +128,8 @@ private:
// Wraps AVBufferRef for an accelerated decoder.
class HardwareContext {
public:
YUZU_NON_COPYABLE(HardwareContext);
YUZU_NON_MOVEABLE(HardwareContext);
CITRON_NON_COPYABLE(HardwareContext);
CITRON_NON_MOVEABLE(HardwareContext);
static std::vector<AVHWDeviceType> GetSupportedDeviceTypes();
@@ -151,8 +151,8 @@ private:
// Wraps an AVCodecContext.
class DecoderContext {
public:
YUZU_NON_COPYABLE(DecoderContext);
YUZU_NON_MOVEABLE(DecoderContext);
CITRON_NON_COPYABLE(DecoderContext);
CITRON_NON_MOVEABLE(DecoderContext);
explicit DecoderContext(const Decoder& decoder);
~DecoderContext();
@@ -173,8 +173,8 @@ private:
// Wraps an AVFilterGraph.
class DeinterlaceFilter {
public:
YUZU_NON_COPYABLE(DeinterlaceFilter);
YUZU_NON_MOVEABLE(DeinterlaceFilter);
CITRON_NON_COPYABLE(DeinterlaceFilter);
CITRON_NON_MOVEABLE(DeinterlaceFilter);
explicit DeinterlaceFilter(const Frame& frame);
~DeinterlaceFilter();
@@ -191,8 +191,8 @@ private:
class DecodeApi {
public:
YUZU_NON_COPYABLE(DecodeApi);
YUZU_NON_MOVEABLE(DecodeApi);
CITRON_NON_COPYABLE(DecodeApi);
CITRON_NON_MOVEABLE(DecodeApi);
DecodeApi() = default;
~DecodeApi() = default;

View File

@@ -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 CITRON_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 CITRON_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 CITRON_USE_FP16
AF4 c;
FsrRcasF(c.r, c.g, c.b, c.a, pos, Const0);
frag_color = c;

View File

@@ -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 CITRON_USE_FP16
#define A_HALF
#endif
#include "ffx_a.h"
#ifndef YUZU_USE_FP16
#ifndef CITRON_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 CITRON_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 CITRON_USE_FP16
AF4 c;
FsrRcasF(c.r, c.g, c.b, c.a, pos, constants[0]);
frag_color = c;

View File

@@ -7,7 +7,7 @@
#extension GL_ARB_separate_shader_objects : enable
#ifdef YUZU_USE_FP16
#ifdef CITRON_USE_FP16
#extension GL_AMD_gpu_shader_half_float : enable
#extension GL_NV_gpu_shader5 : enable

View File

@@ -4,7 +4,7 @@
#version 460 core
#extension GL_GOOGLE_include_directive : enable
#define YUZU_USE_FP16
#define CITRON_USE_FP16
#define USE_EASU 1
#define VERSION 1

View File

@@ -4,7 +4,7 @@
#version 460 core
#extension GL_GOOGLE_include_directive : enable
#define YUZU_USE_FP16
#define CITRON_USE_FP16
#define USE_RCAS 1
#define VERSION 1

View File

@@ -6,6 +6,6 @@
#extension GL_GOOGLE_include_directive : enable
#define VERSION 2
#define YUZU_USE_FP16
#define CITRON_USE_FP16
#include "opengl_present_scaleforce.frag"

View File

@@ -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 >> CITRON_PAGEBITS;
for (u64 page = addr_begin >> CITRON_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) >> CITRON_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) >> CITRON_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 CITRON_PAGESIZE = 4096;
static constexpr unsigned CITRON_PAGEBITS = 12;
Common::SlotVector<AsyncJob> slot_async_jobs;

View File

@@ -30,8 +30,8 @@ struct RendererSettings {
class RendererBase {
public:
YUZU_NON_COPYABLE(RendererBase);
YUZU_NON_MOVEABLE(RendererBase);
CITRON_NON_COPYABLE(RendererBase);
CITRON_NON_MOVEABLE(RendererBase);
explicit RendererBase(Core::Frontend::EmuWindow& window,
std::unique_ptr<Core::Frontend::GraphicsContext> context);

View File

@@ -108,14 +108,14 @@ bool IsASTCSupported() {
static bool HasSlowSoftwareAstc(std::string_view vendor_name, std::string_view renderer) {
// ifdef for Unix reduces string comparisons for non-Windows drivers, and Intel
#ifdef YUZU_UNIX
#ifdef CITRON_UNIX
// Sorted vaguely by how likely a vendor is to appear
if (vendor_name == "AMD") {
// RadeonSI
return true;
}
if (vendor_name == "Intel") {
// Must be inside YUZU_UNIX ifdef as the Windows driver uses the same vendor string
// Must be inside CITRON_UNIX ifdef as the Windows driver uses the same vendor string
// iris, crocus
const bool is_intel_dg = (renderer.find("DG") != std::string_view::npos);
return is_intel_dg;

View File

@@ -12,7 +12,7 @@ namespace OpenGL {
class OGLRenderbuffer final {
public:
YUZU_NON_COPYABLE(OGLRenderbuffer);
CITRON_NON_COPYABLE(OGLRenderbuffer);
OGLRenderbuffer() = default;
@@ -39,7 +39,7 @@ public:
class OGLTexture final {
public:
YUZU_NON_COPYABLE(OGLTexture);
CITRON_NON_COPYABLE(OGLTexture);
OGLTexture() = default;
@@ -66,7 +66,7 @@ public:
class OGLTextureView final {
public:
YUZU_NON_COPYABLE(OGLTextureView);
CITRON_NON_COPYABLE(OGLTextureView);
OGLTextureView() = default;
@@ -93,7 +93,7 @@ public:
class OGLSampler final {
public:
YUZU_NON_COPYABLE(OGLSampler);
CITRON_NON_COPYABLE(OGLSampler);
OGLSampler() = default;
@@ -120,7 +120,7 @@ public:
class OGLShader final {
public:
YUZU_NON_COPYABLE(OGLShader);
CITRON_NON_COPYABLE(OGLShader);
OGLShader() = default;
@@ -143,7 +143,7 @@ public:
class OGLProgram final {
public:
YUZU_NON_COPYABLE(OGLProgram);
CITRON_NON_COPYABLE(OGLProgram);
OGLProgram() = default;
@@ -167,7 +167,7 @@ public:
class OGLAssemblyProgram final {
public:
YUZU_NON_COPYABLE(OGLAssemblyProgram);
CITRON_NON_COPYABLE(OGLAssemblyProgram);
OGLAssemblyProgram() = default;
@@ -191,7 +191,7 @@ public:
class OGLPipeline final {
public:
YUZU_NON_COPYABLE(OGLPipeline);
CITRON_NON_COPYABLE(OGLPipeline);
OGLPipeline() = default;
OGLPipeline(OGLPipeline&& o) noexcept : handle{std::exchange<GLuint>(o.handle, 0)} {}
@@ -215,7 +215,7 @@ public:
class OGLBuffer final {
public:
YUZU_NON_COPYABLE(OGLBuffer);
CITRON_NON_COPYABLE(OGLBuffer);
OGLBuffer() = default;
@@ -242,7 +242,7 @@ public:
class OGLSync final {
public:
YUZU_NON_COPYABLE(OGLSync);
CITRON_NON_COPYABLE(OGLSync);
OGLSync() = default;
@@ -271,7 +271,7 @@ public:
class OGLFramebuffer final {
public:
YUZU_NON_COPYABLE(OGLFramebuffer);
CITRON_NON_COPYABLE(OGLFramebuffer);
OGLFramebuffer() = default;
@@ -298,7 +298,7 @@ public:
class OGLQuery final {
public:
YUZU_NON_COPYABLE(OGLQuery);
CITRON_NON_COPYABLE(OGLQuery);
OGLQuery() = default;
@@ -325,7 +325,7 @@ public:
class OGLTransformFeedback final {
public:
YUZU_NON_COPYABLE(OGLTransformFeedback);
CITRON_NON_COPYABLE(OGLTransformFeedback);
OGLTransformFeedback() = default;

View File

@@ -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 + CITRON_PAGESIZE - 1) >> CITRON_PAGEBITS;
for (u64 page = addr >> CITRON_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 + CITRON_PAGESIZE - 1) >> CITRON_PAGEBITS;
for (u64 page = addr >> CITRON_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 + CITRON_PAGESIZE - 1) >> CITRON_PAGEBITS;
for (u64 page = entry->addr_start >> CITRON_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

@@ -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 CITRON_PAGEBITS = 14;
static constexpr u64 CITRON_PAGESIZE = u64(1) << CITRON_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 >> CITRON_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 << CITRON_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 << CITRON_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 << CITRON_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 << CITRON_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 << CITRON_PAGEBITS);
return;
}
std::vector<ImageMapId>& image_map_ids = page_it->second;

View File

@@ -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 CITRON_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) >> CITRON_PAGEBITS;
for (u64 page = addr >> CITRON_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) >> CITRON_PAGEBITS;
for (u64 page = addr >> CITRON_PAGEBITS; page <= page_end; ++page) {
if constexpr (RETURNS_BOOL) {
if (func(page)) {
break;