namespace Shader::Maxwell {
namespace {
@@ -37,17 +36,6 @@ enum class ShuffleMode : u64 {
}
}
-bool IsKONA() {
- std::ifstream machineFile("/sys/devices/soc0/machine");
- if (machineFile.is_open()) {
- std::string line;
- std::getline(machineFile, line);
- if (line == "KONA")
- return true;
- }
- return false;
-}
-
void Shuffle(TranslatorVisitor& v, u64 insn, const IR::U32& index, const IR::U32& mask) {
union {
u64 insn;
@@ -59,10 +47,7 @@ void Shuffle(TranslatorVisitor& v, u64 insn, const IR::U32& index, const IR::U32
const IR::U32 result{ShuffleOperation(v.ir, v.X(shfl.src_reg), index, mask, shfl.mode)};
v.ir.SetPred(shfl.pred, v.ir.GetInBoundsFromOp(result));
- if (IsKONA())
- v.X(shfl.dest_reg, v.ir.Imm32(0xffffffff)); // This fixes the freeze for Retroid / Snapdragon SD865
- else
- v.X(shfl.dest_reg, result);
+ v.X(shfl.dest_reg, result);
}
} // Anonymous namespace
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index e134e26e66..97b6ba9e36 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -26,9 +26,11 @@ BufferCache::BufferCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, R
void(slot_buffers.insert(runtime, NullBufferParams{}));
gpu_modified_ranges.Clear();
inline_buffer_id = NULL_BUFFER_ID;
+
#ifdef ANDROID
immediately_free = (Settings::values.vram_usage_mode.GetValue() == Settings::VramUsageMode::Aggressive);
#endif
+
if (!runtime.CanReportMemoryUsage()) {
minimum_memory = DEFAULT_EXPECTED_MEMORY;
critical_memory = DEFAULT_CRITICAL_MEMORY;
@@ -1385,8 +1387,9 @@ void BufferCache
::JoinOverlap(BufferId new_buffer_id, BufferId overlap_id,
});
new_buffer.MarkUsage(copies[0].dst_offset, copies[0].size);
runtime.CopyBuffer(new_buffer, overlap, copies, true);
- if (immediately_free)
+ if (immediately_free) {
runtime.Finish();
+ }
DeleteBuffer(overlap_id, true);
}
@@ -1678,9 +1681,7 @@ void BufferCache
::DeleteBuffer(BufferId buffer_id, bool do_not_mark) {
}
Unregister(buffer_id);
-
- if (!do_not_mark || !immediately_free)
- delayed_destruction_ring.Push(std::move(slot_buffers[buffer_id]));
+ delayed_destruction_ring.Push(std::move(slot_buffers[buffer_id]));
slot_buffers.erase(buffer_id);
if constexpr (HAS_PERSISTENT_UNIFORM_BUFFER_BINDINGS) {
diff --git a/src/video_core/buffer_cache/buffer_cache_base.h b/src/video_core/buffer_cache/buffer_cache_base.h
index dbe44c875f..8c94c0cf72 100644
--- a/src/video_core/buffer_cache/buffer_cache_base.h
+++ b/src/video_core/buffer_cache/buffer_cache_base.h
@@ -159,11 +159,7 @@ template
class BufferCache : public VideoCommon::ChannelSetupCaches {
// Page size for caching purposes.
// This is unrelated to the CPU page size and it can be changed as it seems optimal.
-#ifdef ANDROID
- static constexpr u32 CACHING_PAGEBITS = 12;
-#else
static constexpr u32 CACHING_PAGEBITS = 16;
-#endif
static constexpr u64 CACHING_PAGESIZE = u64{1} << CACHING_PAGEBITS;
static constexpr bool IS_OPENGL = P::IS_OPENGL;
@@ -177,15 +173,9 @@ class BufferCache : public VideoCommon::ChannelSetupCaches slot_buffers;
-#ifdef ANDROID
- static constexpr size_t TICKS_TO_DESTROY = 6;
-#else
- static constexpr size_t TICKS_TO_DESTROY = 8;
-#endif
- DelayedDestructionRing delayed_destruction_ring;
+ DelayedDestructionRing delayed_destruction_ring;
const Tegra::Engines::DrawManager::IndirectParams* current_draw_indirect{};
diff --git a/src/video_core/host1x/host1x.cpp b/src/video_core/host1x/host1x.cpp
index 652d387031..293bca6d79 100644
--- a/src/video_core/host1x/host1x.cpp
+++ b/src/video_core/host1x/host1x.cpp
@@ -1,6 +1,3 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
-// SPDX-License-Identifier: GPL-3.0-or-later
-
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -21,11 +18,9 @@ Host1x::~Host1x() = default;
void Host1x::StartDevice(s32 fd, ChannelType type, u32 syncpt) {
switch (type) {
case ChannelType::NvDec:
- std::call_once(nvdec_first_init, []() {std::this_thread::sleep_for(std::chrono::milliseconds{500});}); // HACK: For Astroneer
devices[fd] = std::make_unique(*this, fd, syncpt, frame_queue);
break;
case ChannelType::VIC:
- std::call_once(vic_first_init, []() {std::this_thread::sleep_for(std::chrono::milliseconds{500});}); // HACK: For Astroneer
devices[fd] = std::make_unique(*this, fd, syncpt, frame_queue);
break;
default:
diff --git a/src/video_core/host1x/host1x.h b/src/video_core/host1x/host1x.h
index 5ecffa442c..8debac93dd 100644
--- a/src/video_core/host1x/host1x.h
+++ b/src/video_core/host1x/host1x.h
@@ -1,6 +1,3 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
-// SPDX-License-Identifier: GPL-3.0-or-later
-
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -204,8 +201,6 @@ private:
std::unique_ptr> allocator;
FrameQueue frame_queue;
std::unordered_map> devices;
- std::once_flag nvdec_first_init;
- std::once_flag vic_first_init;
};
} // namespace Tegra::Host1x
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h
index 3f67828b86..cbc27344b0 100644
--- a/src/video_core/texture_cache/texture_cache_base.h
+++ b/src/video_core/texture_cache/texture_cache_base.h
@@ -110,17 +110,10 @@ class TextureCache : public VideoCommon::ChannelSetupCaches::max()};
- #ifdef ANDROID
- static constexpr s64 TARGET_THRESHOLD = 3_GiB;
- static constexpr s64 DEFAULT_EXPECTED_MEMORY = 1_GiB + 125_MiB;
- static constexpr s64 DEFAULT_CRITICAL_MEMORY = 1_GiB + 625_MiB;
- static constexpr size_t GC_EMERGENCY_COUNTS = 2;
- #else
static constexpr s64 TARGET_THRESHOLD = 4_GiB;
static constexpr s64 DEFAULT_EXPECTED_MEMORY = 1_GiB + 125_MiB;
static constexpr s64 DEFAULT_CRITICAL_MEMORY = 1_GiB + 625_MiB;
static constexpr size_t GC_EMERGENCY_COUNTS = 2;
- #endif
using Runtime = typename P::Runtime;
using Image = typename P::Image;
@@ -486,11 +479,7 @@ private:
};
Common::LeastRecentlyUsedCache lru_cache;
- #ifdef ANDROID
- static constexpr size_t TICKS_TO_DESTROY = 6;
- #else
static constexpr size_t TICKS_TO_DESTROY = 8;
-#endif
DelayedDestructionRing sentenced_images;
DelayedDestructionRing sentenced_image_view;
DelayedDestructionRing sentenced_framebuffers;
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
index 04b362f9b0..3ab09b57c8 100644
--- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
+++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
@@ -275,6 +275,7 @@ vk::Buffer MemoryAllocator::CreateBuffer(const VkBufferCreateInfo& ci, MemoryUsa
if (result == VK_ERROR_OUT_OF_DEVICE_MEMORY) {
LOG_ERROR(Render_Vulkan, "Out of memory creating buffer (size: {})", ci.size);
}
+
vmaGetAllocationMemoryProperties(allocator, allocation, &property_flags);
u8* data = reinterpret_cast(alloc_info.pMappedData);