early-access version 3206

This commit is contained in:
pineappleEA 2022-12-12 00:36:37 +01:00
parent fd00d63783
commit f918c13b12
5 changed files with 19 additions and 18 deletions

View file

@ -22,6 +22,8 @@ CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion # On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF) CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
option(ENABLE_OPENGL "Enable OpenGL" ON)
mark_as_advanced(FORCE ENABLE_OPENGL)
option(ENABLE_QT "Enable the Qt frontend" ON) option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT6 "Allow usage of Qt6 to be attempted" OFF) option(ENABLE_QT6 "Allow usage of Qt6 to be attempted" OFF)
set(QT6_LOCATION "" CACHE PATH "Additional Location to search for Qt6 libraries like C:/Qt/6.3.1/msvc2019_64/") set(QT6_LOCATION "" CACHE PATH "Additional Location to search for Qt6 libraries like C:/Qt/6.3.1/msvc2019_64/")

View file

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3204. This is the source code for early-access 3206.
## Legal Notice ## Legal Notice

View file

@ -34,8 +34,6 @@ add_library(common STATIC
bit_util.h bit_util.h
cityhash.cpp cityhash.cpp
cityhash.h cityhash.h
cache_management.cpp
cache_management.h
common_funcs.h common_funcs.h
common_precompiled_headers.h common_precompiled_headers.h
common_types.h common_types.h

View file

@ -6,7 +6,6 @@
#include "common/assert.h" #include "common/assert.h"
#include "common/atomic_ops.h" #include "common/atomic_ops.h"
#include "common/cache_management.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/page_table.h" #include "common/page_table.h"
@ -340,10 +339,9 @@ struct Memory::Impl {
LOG_ERROR(HW_Memory, "Unmapped cache maintenance @ {:#018X}", current_vaddr); LOG_ERROR(HW_Memory, "Unmapped cache maintenance @ {:#018X}", current_vaddr);
throw InvalidMemoryException(); throw InvalidMemoryException();
}, },
[&](const std::size_t block_size, u8* const host_ptr) { cb(block_size, host_ptr); }, [&](const std::size_t block_size, u8* const host_ptr) {},
[&](const VAddr current_vaddr, const std::size_t block_size, u8* const host_ptr) { [&](const VAddr current_vaddr, const std::size_t block_size, u8* const host_ptr) {
system.GPU().FlushRegion(current_vaddr, block_size); cb(current_vaddr, block_size);
cb(block_size, host_ptr);
}, },
[](const std::size_t block_size) {}); [](const std::size_t block_size) {});
} catch (InvalidMemoryException&) { } catch (InvalidMemoryException&) {
@ -354,27 +352,30 @@ struct Memory::Impl {
} }
Result InvalidateDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size) { Result InvalidateDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size) {
auto perform = [&](const std::size_t block_size, u8* const host_ptr) { auto on_rasterizer = [&](const VAddr current_vaddr, const std::size_t block_size) {
// Do nothing; this operation (dc ivac) cannot be supported // dc ivac: Invalidate to point of coherency
// from EL0 // GPU flush -> CPU invalidate
system.GPU().FlushRegion(current_vaddr, block_size);
}; };
return PerformCacheOperation(process, dest_addr, size, perform); return PerformCacheOperation(process, dest_addr, size, on_rasterizer);
} }
Result StoreDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size) { Result StoreDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size) {
auto perform = [&](const std::size_t block_size, u8* const host_ptr) { auto on_rasterizer = [&](const VAddr current_vaddr, const std::size_t block_size) {
// dc cvac: Store to point of coherency // dc cvac: Store to point of coherency
Common::DataCacheLineCleanByVAToPoC(host_ptr, block_size); // CPU flush -> GPU invalidate
system.GPU().InvalidateRegion(current_vaddr, block_size);
}; };
return PerformCacheOperation(process, dest_addr, size, perform); return PerformCacheOperation(process, dest_addr, size, on_rasterizer);
} }
Result FlushDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size) { Result FlushDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size) {
auto perform = [&](const std::size_t block_size, u8* const host_ptr) { auto on_rasterizer = [&](const VAddr current_vaddr, const std::size_t block_size) {
// dc civac: Store to point of coherency, and invalidate from cache // dc civac: Store to point of coherency, and invalidate from cache
Common::DataCacheLineCleanAndInvalidateByVAToPoC(host_ptr, block_size); // CPU flush -> GPU invalidate
system.GPU().InvalidateRegion(current_vaddr, block_size);
}; };
return PerformCacheOperation(process, dest_addr, size, perform); return PerformCacheOperation(process, dest_addr, size, on_rasterizer);
} }
void MarkRegionDebug(VAddr vaddr, u64 size, bool debug) { void MarkRegionDebug(VAddr vaddr, u64 size, bool debug) {

View file

@ -402,7 +402,7 @@ if (MSVC)
copy_yuzu_FFmpeg_deps(yuzu) copy_yuzu_FFmpeg_deps(yuzu)
endif() endif()
if (NOT APPLE) if (NOT APPLE AND ENABLE_OPENGL)
target_compile_definitions(yuzu PRIVATE HAS_OPENGL) target_compile_definitions(yuzu PRIVATE HAS_OPENGL)
endif() endif()