summaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorGravatar Liam2023-05-20 17:15:36 -0400
committerGravatar Liam2023-05-23 12:54:40 -0400
commit415c78b87c008f0d963679ea9bc06c8aa566b506 (patch)
tree11e6a5d2211a99660a48678059c703e849c06da3 /src/video_core/vulkan_common
parentMerge pull request #10392 from danilaml/update-cubeb-again (diff)
downloadyuzu-415c78b87c008f0d963679ea9bc06c8aa566b506.tar.gz
yuzu-415c78b87c008f0d963679ea9bc06c8aa566b506.tar.xz
yuzu-415c78b87c008f0d963679ea9bc06c8aa566b506.zip
textures: add BC1 and BC3 compressors and recompression setting
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index f6e6f2736..b49f78bc9 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -1001,6 +1001,11 @@ u64 Device::GetDeviceMemoryUsage() const {
1001} 1001}
1002 1002
1003void Device::CollectPhysicalMemoryInfo() { 1003void Device::CollectPhysicalMemoryInfo() {
1004 // Account for resolution scaling in memory limits
1005 const size_t normal_memory = 6_GiB;
1006 const size_t scaler_memory = 1_GiB * Settings::values.resolution_info.ScaleUp(1);
1007
1008 // Calculate limits using memory budget
1004 VkPhysicalDeviceMemoryBudgetPropertiesEXT budget{}; 1009 VkPhysicalDeviceMemoryBudgetPropertiesEXT budget{};
1005 budget.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; 1010 budget.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT;
1006 const auto mem_info = 1011 const auto mem_info =
@@ -1030,6 +1035,7 @@ void Device::CollectPhysicalMemoryInfo() {
1030 if (!is_integrated) { 1035 if (!is_integrated) {
1031 const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 1_GiB); 1036 const u64 reserve_memory = std::min<u64>(device_access_memory / 8, 1_GiB);
1032 device_access_memory -= reserve_memory; 1037 device_access_memory -= reserve_memory;
1038 device_access_memory = std::min<u64>(device_access_memory, normal_memory + scaler_memory);
1033 return; 1039 return;
1034 } 1040 }
1035 const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage); 1041 const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);