diff options
| author | 2021-06-25 17:07:24 -0400 | |
|---|---|---|
| committer | 2021-06-25 17:07:24 -0400 | |
| commit | d9fb6dbd37200487424249042224ac4268b8752b (patch) | |
| tree | a0b7fce9b6389b2a51faae30f059a3241fda68be /src | |
| parent | Merge pull request #6496 from ameerj/astc-fixes (diff) | |
| parent | vulkan_device: Make device memory match the rest of the file (diff) | |
| download | yuzu-d9fb6dbd37200487424249042224ac4268b8752b.tar.gz yuzu-d9fb6dbd37200487424249042224ac4268b8752b.tar.xz yuzu-d9fb6dbd37200487424249042224ac4268b8752b.zip | |
Merge pull request #6528 from ReinUsesLisp/device-memory
vulkan_device: Make device memory match the rest of the file
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 33 |
2 files changed, 18 insertions, 19 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 707a8b8fb..23814afd2 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -821,9 +821,9 @@ void Device::CollectTelemetryParameters() { | |||
| 821 | 821 | ||
| 822 | void Device::CollectPhysicalMemoryInfo() { | 822 | void Device::CollectPhysicalMemoryInfo() { |
| 823 | const auto mem_properties = physical.GetMemoryProperties(); | 823 | const auto mem_properties = physical.GetMemoryProperties(); |
| 824 | const std::size_t num_properties = mem_properties.memoryHeapCount; | 824 | const size_t num_properties = mem_properties.memoryHeapCount; |
| 825 | device_access_memory = 0; | 825 | device_access_memory = 0; |
| 826 | for (std::size_t element = 0; element < num_properties; element++) { | 826 | for (size_t element = 0; element < num_properties; ++element) { |
| 827 | if ((mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0) { | 827 | if ((mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0) { |
| 828 | device_access_memory += mem_properties.memoryHeaps[element].size; | 828 | device_access_memory += mem_properties.memoryHeaps[element].size; |
| 829 | } | 829 | } |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index a1aba973b..88b298196 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -264,21 +264,22 @@ private: | |||
| 264 | bool IsFormatSupported(VkFormat wanted_format, VkFormatFeatureFlags wanted_usage, | 264 | bool IsFormatSupported(VkFormat wanted_format, VkFormatFeatureFlags wanted_usage, |
| 265 | FormatType format_type) const; | 265 | FormatType format_type) const; |
| 266 | 266 | ||
| 267 | VkInstance instance; ///< Vulkan instance. | 267 | VkInstance instance; ///< Vulkan instance. |
| 268 | vk::DeviceDispatch dld; ///< Device function pointers. | 268 | vk::DeviceDispatch dld; ///< Device function pointers. |
| 269 | vk::PhysicalDevice physical; ///< Physical device. | 269 | vk::PhysicalDevice physical; ///< Physical device. |
| 270 | VkPhysicalDeviceProperties properties; ///< Device properties. | 270 | VkPhysicalDeviceProperties properties; ///< Device properties. |
| 271 | vk::Device logical; ///< Logical device. | 271 | vk::Device logical; ///< Logical device. |
| 272 | vk::Queue graphics_queue; ///< Main graphics queue. | 272 | vk::Queue graphics_queue; ///< Main graphics queue. |
| 273 | vk::Queue present_queue; ///< Main present queue. | 273 | vk::Queue present_queue; ///< Main present queue. |
| 274 | u32 instance_version{}; ///< Vulkan onstance version. | 274 | u32 instance_version{}; ///< Vulkan onstance version. |
| 275 | u32 graphics_family{}; ///< Main graphics queue family index. | 275 | u32 graphics_family{}; ///< Main graphics queue family index. |
| 276 | u32 present_family{}; ///< Main present queue family index. | 276 | u32 present_family{}; ///< Main present queue family index. |
| 277 | VkDriverIdKHR driver_id{}; ///< Driver ID. | 277 | VkDriverIdKHR driver_id{}; ///< Driver ID. |
| 278 | VkShaderStageFlags guest_warp_stages{}; ///< Stages where the guest warp size can be forced.ed | 278 | VkShaderStageFlags guest_warp_stages{}; ///< Stages where the guest warp size can be forced. |
| 279 | bool is_optimal_astc_supported{}; ///< Support for native ASTC. | 279 | u64 device_access_memory{}; ///< Total size of device local memory in bytes. |
| 280 | bool is_float16_supported{}; ///< Support for float16 arithmetics. | 280 | bool is_optimal_astc_supported{}; ///< Support for native ASTC. |
| 281 | bool is_warp_potentially_bigger{}; ///< Host warp size can be bigger than guest. | 281 | bool is_float16_supported{}; ///< Support for float16 arithmetics. |
| 282 | bool is_warp_potentially_bigger{}; ///< Host warp size can be bigger than guest. | ||
| 282 | bool is_formatless_image_load_supported{}; ///< Support for shader image read without format. | 283 | bool is_formatless_image_load_supported{}; ///< Support for shader image read without format. |
| 283 | bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images. | 284 | bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images. |
| 284 | bool is_blit_depth_stencil_supported{}; ///< Support for blitting from and to depth stencil. | 285 | bool is_blit_depth_stencil_supported{}; ///< Support for blitting from and to depth stencil. |
| @@ -309,8 +310,6 @@ private: | |||
| 309 | 310 | ||
| 310 | /// Nsight Aftermath GPU crash tracker | 311 | /// Nsight Aftermath GPU crash tracker |
| 311 | std::unique_ptr<NsightAftermathTracker> nsight_aftermath_tracker; | 312 | std::unique_ptr<NsightAftermathTracker> nsight_aftermath_tracker; |
| 312 | |||
| 313 | u64 device_access_memory; | ||
| 314 | }; | 313 | }; |
| 315 | 314 | ||
| 316 | } // namespace Vulkan | 315 | } // namespace Vulkan |