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.
This commit is contained in:
parent
19156292a3
commit
75ccd9959c
27 changed files with 176 additions and 232 deletions
|
@ -23,7 +23,7 @@ enum class FormatType { Linear, Optimal, Buffer };
|
|||
const u32 GuestWarpSize = 32;
|
||||
|
||||
/// Handles data specific to a physical device.
|
||||
class Device final {
|
||||
class Device {
|
||||
public:
|
||||
explicit Device(VkInstance instance, vk::PhysicalDevice physical, VkSurfaceKHR surface,
|
||||
const vk::InstanceDispatch& dld);
|
||||
|
|
|
@ -344,6 +344,9 @@ public:
|
|||
/// Construct an empty handle.
|
||||
Handle() = default;
|
||||
|
||||
/// Construct an empty handle.
|
||||
Handle(std::nullptr_t) {}
|
||||
|
||||
/// Copying Vulkan objects is not supported and will never be.
|
||||
Handle(const Handle&) = delete;
|
||||
Handle& operator=(const Handle&) = delete;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue