early-access version 2415

This commit is contained in:
pineappleEA
2022-01-19 04:17:57 +01:00
parent 495ed56df7
commit afb206da79
11 changed files with 83 additions and 26 deletions

View File

@@ -488,8 +488,8 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, ProgramManager&
device_access_memory = []() -> u64 {
if (GLAD_GL_NVX_gpu_memory_info) {
GLint cur_avail_mem_kb = 0;
glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &cur_avail_mem_kb);
return static_cast<u64>(cur_avail_mem_kb) * 1_KiB;
glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &cur_avail_mem_kb);
return static_cast<u64>(cur_avail_mem_kb) * 1_KiB + 512_MiB;
}
return 2_GiB; // Return minimum requirements
}();

View File

@@ -587,10 +587,10 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
}
logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld);
is_integrated = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU) != 0;
is_virtual = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU) != 0;
is_non_gpu = (properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_OTHER) != 0 ||
(properties.deviceType & VK_PHYSICAL_DEVICE_TYPE_CPU) != 0;
is_integrated = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
is_virtual = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU;
is_non_gpu = properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_OTHER ||
properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU;
CollectPhysicalMemoryInfo();
CollectTelemetryParameters();
@@ -1270,7 +1270,7 @@ void Device::CollectPhysicalMemoryInfo() {
u64 local_memory = 0;
for (size_t element = 0; element < num_properties; ++element) {
const bool is_heap_local =
mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT != 0;
(mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0;
if (!is_integrated && !is_heap_local) {
continue;
}