mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 04:40:05 +00:00
Miscallenious fixes to gl backend and qt frontend (#6834)
* renderer_gl: Make rasterizer normal class member * It doesn't need to be heap allocated anymore * gl_rasterizer: Remove default_texture * It's unused * gl_rasterizer: General cleanup * gl_rasterizer: Lower case lambdas * Match style with review comments from vulkan backend * rasterizer_cache: Prevent memory leak * Since the switch from shared_ptr these surfaces were no longer being destroyed properly. Use our garbage collector for that purpose to destroy it safely for both backends * rasterizer_cache: Make temp copy of old surface * The custom surface would override the memory region of the old region resulting in garbage data, this ensures the custom surface is constructed correctly * citra_qt: Manually create dialog tabs * Allows for custom constructors which is very useful. While at it, global state is now eliminated from configuration * citra_qt: Eliminate global system usage * core: Remove global system usage in memory and HIO * citra_qt: Use qOverload * tests: Run clang format * gl_texture_runtime: Fix surface scaling
This commit is contained in:
parent
970f2284d8
commit
88ea66053e
73 changed files with 594 additions and 555 deletions
|
@ -20,7 +20,8 @@
|
|||
#include "audio_fixures.h"
|
||||
|
||||
TEST_CASE("DSP HLE Audio Decoder", "[audio_core]") {
|
||||
Memory::MemorySystem memory;
|
||||
Core::System system;
|
||||
Memory::MemorySystem memory{system};
|
||||
SECTION("decoder should produce correct samples") {
|
||||
auto decoder =
|
||||
#ifdef HAVE_MF
|
||||
|
|
|
@ -8,14 +8,16 @@
|
|||
#include "audio_core/lle/lle.h"
|
||||
#include "common/common_paths.h"
|
||||
#include "common/file_util.h"
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
TEST_CASE("DSP LLE vs HLE", "[audio_core][hle]") {
|
||||
Memory::MemorySystem hle_memory;
|
||||
Core::System system;
|
||||
Memory::MemorySystem hle_memory{system};
|
||||
Core::Timing hle_core_timing(1, 100);
|
||||
|
||||
Memory::MemorySystem lle_memory;
|
||||
Memory::MemorySystem lle_memory{system};
|
||||
Core::Timing lle_core_timing(1, 100);
|
||||
|
||||
AudioCore::DspHle hle(hle_memory, hle_core_timing);
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
#include "audio_core/lle/lle.h"
|
||||
#include "common/common_paths.h"
|
||||
#include "common/file_util.h"
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
TEST_CASE("DSP LLE Sanity", "[audio_core][lle]") {
|
||||
Memory::MemorySystem memory;
|
||||
Core::System system;
|
||||
Memory::MemorySystem memory{system};
|
||||
Core::Timing core_timing(1, 100);
|
||||
|
||||
AudioCore::DspLle lle(memory, core_timing, true);
|
||||
|
|
|
@ -16,7 +16,8 @@ TestEnvironment::TestEnvironment(bool mutable_memory_)
|
|||
: mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
|
||||
|
||||
timing = std::make_unique<Core::Timing>(1, 100);
|
||||
memory = std::make_unique<Memory::MemorySystem>();
|
||||
system = std::make_unique<Core::System>();
|
||||
memory = std::make_unique<Memory::MemorySystem>(*system);
|
||||
kernel = std::make_unique<Kernel::KernelSystem>(
|
||||
*memory, *timing, [] {}, Kernel::MemoryMode::Prod, 1,
|
||||
Kernel::New3dsHwCapabilities{false, false, Kernel::New3dsMemoryMode::Legacy});
|
||||
|
|
|
@ -85,6 +85,7 @@ private:
|
|||
std::vector<WriteRecord> write_records;
|
||||
|
||||
std::unique_ptr<Core::Timing> timing;
|
||||
std::unique_ptr<Core::System> system;
|
||||
std::unique_ptr<Memory::MemorySystem> memory;
|
||||
std::unique_ptr<Kernel::KernelSystem> kernel;
|
||||
};
|
||||
|
|
|
@ -3,12 +3,10 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/ipc.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/handle_table.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
|
@ -23,7 +21,8 @@ static std::shared_ptr<Object> MakeObject(Kernel::KernelSystem& kernel) {
|
|||
|
||||
TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel]") {
|
||||
Core::Timing timing(1, 100);
|
||||
Memory::MemorySystem memory;
|
||||
Core::System system;
|
||||
Memory::MemorySystem memory{system};
|
||||
Kernel::KernelSystem kernel(
|
||||
memory, timing, [] {}, Kernel::MemoryMode::Prod, 1,
|
||||
Kernel::New3dsHwCapabilities{false, false, Kernel::New3dsMemoryMode::Legacy});
|
||||
|
@ -247,7 +246,8 @@ TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel
|
|||
|
||||
TEST_CASE("HLERequestContext::WriteToOutgoingCommandBuffer", "[core][kernel]") {
|
||||
Core::Timing timing(1, 100);
|
||||
Memory::MemorySystem memory;
|
||||
Core::System system;
|
||||
Memory::MemorySystem memory{system};
|
||||
Kernel::KernelSystem kernel(
|
||||
memory, timing, [] {}, Kernel::MemoryMode::Prod, 1,
|
||||
Kernel::New3dsHwCapabilities{false, false, Kernel::New3dsMemoryMode::Legacy});
|
||||
|
|
|
@ -3,13 +3,15 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/kernel/process.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
TEST_CASE("memory.IsValidVirtualAddress", "[core][memory]") {
|
||||
Core::Timing timing(1, 100);
|
||||
Memory::MemorySystem memory;
|
||||
Core::System system;
|
||||
Memory::MemorySystem memory{system};
|
||||
Kernel::KernelSystem kernel(
|
||||
memory, timing, [] {}, Kernel::MemoryMode::Prod, 1,
|
||||
Kernel::New3dsHwCapabilities{false, false, Kernel::New3dsMemoryMode::Legacy});
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#include <vector>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
#include "core/hle/kernel/memory.h"
|
||||
#include "core/hle/kernel/process.h"
|
||||
#include "core/hle/kernel/vm_manager.h"
|
||||
#include "core/memory.h"
|
||||
|
@ -15,7 +15,8 @@ TEST_CASE("Memory Basics", "[kernel][memory]") {
|
|||
auto mem = std::make_shared<BufferMem>(Memory::CITRA_PAGE_SIZE);
|
||||
MemoryRef block{mem};
|
||||
Core::Timing timing(1, 100);
|
||||
Memory::MemorySystem memory;
|
||||
Core::System system;
|
||||
Memory::MemorySystem memory{system};
|
||||
Kernel::KernelSystem kernel(
|
||||
memory, timing, [] {}, Kernel::MemoryMode::Prod, 1,
|
||||
Kernel::New3dsHwCapabilities{false, false, Kernel::New3dsMemoryMode::Legacy});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue