diff options
| author | 2021-01-05 04:09:39 -0300 | |
|---|---|---|
| committer | 2021-02-13 02:16:19 -0300 | |
| commit | 75ccd9959ca7aa78b71fbb800ed2127d8613e9dc (patch) | |
| tree | 3b9b5c0779cff69ef135bb3394ae70a0d3a9804d /src/video_core/vulkan_common | |
| parent | tests/buffer_base: Add cached CPU writes tests (diff) | |
| download | yuzu-75ccd9959ca7aa78b71fbb800ed2127d8613e9dc.tar.gz yuzu-75ccd9959ca7aa78b71fbb800ed2127d8613e9dc.tar.xz yuzu-75ccd9959ca7aa78b71fbb800ed2127d8613e9dc.zip | |
gpu: Report renderer errors with exceptions
Instead of using a two step initialization to report errors, initialize
the GPU renderer and rasterizer on the constructor and report errors
through std::runtime_error.
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 2 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_wrapper.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 4b66dba7a..f1697b79a 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -23,7 +23,7 @@ enum class FormatType { Linear, Optimal, Buffer }; | |||
| 23 | const u32 GuestWarpSize = 32; | 23 | const u32 GuestWarpSize = 32; |
| 24 | 24 | ||
| 25 | /// Handles data specific to a physical device. | 25 | /// Handles data specific to a physical device. |
| 26 | class Device final { | 26 | class Device { |
| 27 | public: | 27 | public: |
| 28 | explicit Device(VkInstance instance, vk::PhysicalDevice physical, VkSurfaceKHR surface, | 28 | explicit Device(VkInstance instance, vk::PhysicalDevice physical, VkSurfaceKHR surface, |
| 29 | const vk::InstanceDispatch& dld); | 29 | const vk::InstanceDispatch& dld); |
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 9689de0cb..4d8f14357 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h | |||
| @@ -344,6 +344,9 @@ public: | |||
| 344 | /// Construct an empty handle. | 344 | /// Construct an empty handle. |
| 345 | Handle() = default; | 345 | Handle() = default; |
| 346 | 346 | ||
| 347 | /// Construct an empty handle. | ||
| 348 | Handle(std::nullptr_t) {} | ||
| 349 | |||
| 347 | /// Copying Vulkan objects is not supported and will never be. | 350 | /// Copying Vulkan objects is not supported and will never be. |
| 348 | Handle(const Handle&) = delete; | 351 | Handle(const Handle&) = delete; |
| 349 | Handle& operator=(const Handle&) = delete; | 352 | Handle& operator=(const Handle&) = delete; |