early-access version 3612

This commit is contained in:
pineappleEA 2023-05-25 20:22:51 +02:00
parent 976f596f3d
commit f9b7bd6c16
5 changed files with 6 additions and 12 deletions

View File

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

View File

@ -30,8 +30,8 @@ BufferCache<P>::BufferCache(VideoCore::RasterizerInterface& rasterizer_,
} }
const s64 device_memory = static_cast<s64>(runtime.GetDeviceLocalMemory()); const s64 device_memory = static_cast<s64>(runtime.GetDeviceLocalMemory());
const s64 min_spacing_expected = device_memory - 1_GiB - 512_MiB; const s64 min_spacing_expected = device_memory - 1_GiB;
const s64 min_spacing_critical = device_memory - 1_GiB; const s64 min_spacing_critical = device_memory - 512_MiB;
const s64 mem_threshold = std::min(device_memory, TARGET_THRESHOLD); const s64 mem_threshold = std::min(device_memory, TARGET_THRESHOLD);
const s64 min_vacancy_expected = (6 * mem_threshold) / 10; const s64 min_vacancy_expected = (6 * mem_threshold) / 10;
const s64 min_vacancy_critical = (3 * mem_threshold) / 10; const s64 min_vacancy_critical = (3 * mem_threshold) / 10;

View File

@ -49,8 +49,8 @@ TextureCache<P>::TextureCache(Runtime& runtime_, VideoCore::RasterizerInterface&
if constexpr (HAS_DEVICE_MEMORY_INFO) { if constexpr (HAS_DEVICE_MEMORY_INFO) {
const s64 device_memory = static_cast<s64>(runtime.GetDeviceLocalMemory()); const s64 device_memory = static_cast<s64>(runtime.GetDeviceLocalMemory());
const s64 min_spacing_expected = device_memory - 1_GiB - 512_MiB; const s64 min_spacing_expected = device_memory - 1_GiB;
const s64 min_spacing_critical = device_memory - 1_GiB; const s64 min_spacing_critical = device_memory - 512_MiB;
const s64 mem_threshold = std::min(device_memory, TARGET_THRESHOLD); const s64 mem_threshold = std::min(device_memory, TARGET_THRESHOLD);
const s64 min_vacancy_expected = (6 * mem_threshold) / 10; const s64 min_vacancy_expected = (6 * mem_threshold) / 10;
const s64 min_vacancy_critical = (3 * mem_threshold) / 10; const s64 min_vacancy_critical = (3 * mem_threshold) / 10;
@ -139,7 +139,6 @@ void TextureCache<P>::TickFrame() {
TickAsyncDecode(); TickAsyncDecode();
runtime.TickFrame(); runtime.TickFrame();
critical_gc = 0;
++frame_tick; ++frame_tick;
if constexpr (IMPLEMENTS_ASYNC_DOWNLOADS) { if constexpr (IMPLEMENTS_ASYNC_DOWNLOADS) {
@ -1912,10 +1911,6 @@ void TextureCache<P>::RegisterImage(ImageId image_id) {
tentative_size = EstimatedDecompressedSize(tentative_size, image.info.format); tentative_size = EstimatedDecompressedSize(tentative_size, image.info.format);
} }
total_used_memory += Common::AlignUp(tentative_size, 1024); total_used_memory += Common::AlignUp(tentative_size, 1024);
if (total_used_memory > critical_memory && critical_gc < GC_EMERGENCY_COUNTS) {
RunGarbageCollector();
critical_gc++;
}
image.lru_index = lru_cache.Insert(image_id, frame_tick); image.lru_index = lru_cache.Insert(image_id, frame_tick);
ForEachGPUPage(image.gpu_addr, image.guest_size_bytes, [this, image_id](u64 page) { ForEachGPUPage(image.gpu_addr, image.guest_size_bytes, [this, image_id](u64 page) {

View File

@ -429,7 +429,6 @@ private:
u64 minimum_memory; u64 minimum_memory;
u64 expected_memory; u64 expected_memory;
u64 critical_memory; u64 critical_memory;
size_t critical_gc;
struct BufferDownload { struct BufferDownload {
GPUVAddr address; GPUVAddr address;

View File

@ -227,7 +227,7 @@ int main(int argc, char** argv) {
}; };
while (optind < argc) { while (optind < argc) {
int arg = getopt_long(argc, argv, "g:fhvp::c:", long_options, &option_index); int arg = getopt_long(argc, argv, "g:fhvp::c:u:", long_options, &option_index);
if (arg != -1) { if (arg != -1) {
switch (static_cast<char>(arg)) { switch (static_cast<char>(arg)) {
case 'c': case 'c':