[Vulkan] Remove old Vulkan code, change shaders directory, create empty Vulkan backend
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2016 Ben Vanik. All rights reserved. *
|
||||
* Copyright 2020 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
@@ -13,51 +13,39 @@
|
||||
#include <memory>
|
||||
|
||||
#include "xenia/ui/graphics_context.h"
|
||||
#include "xenia/ui/vulkan/vulkan.h"
|
||||
#include "xenia/ui/vulkan/vulkan_immediate_drawer.h"
|
||||
#include "xenia/ui/vulkan/vulkan_provider.h"
|
||||
|
||||
namespace xe {
|
||||
namespace ui {
|
||||
namespace vulkan {
|
||||
|
||||
class VulkanDevice;
|
||||
class VulkanImmediateDrawer;
|
||||
class VulkanInstance;
|
||||
class VulkanProvider;
|
||||
class VulkanSwapChain;
|
||||
|
||||
class VulkanContext : public GraphicsContext {
|
||||
public:
|
||||
~VulkanContext() override;
|
||||
|
||||
ImmediateDrawer* immediate_drawer() override;
|
||||
VulkanSwapChain* swap_chain() const { return swap_chain_.get(); }
|
||||
VulkanInstance* instance() const;
|
||||
VulkanDevice* device() const;
|
||||
|
||||
bool is_current() override;
|
||||
bool MakeCurrent() override;
|
||||
void ClearCurrent() override;
|
||||
|
||||
bool WasLost() override { return context_lost_; }
|
||||
// Returns true if the OS took away our context because we caused a TDR or
|
||||
// some other outstanding error. When this happens, this context, as well as
|
||||
// any other shared contexts are junk.
|
||||
// This context must be made current in order for this call to work properly.
|
||||
bool WasLost() override { return false; }
|
||||
|
||||
void BeginSwap() override;
|
||||
void EndSwap() override;
|
||||
|
||||
std::unique_ptr<RawImage> Capture() override;
|
||||
|
||||
protected:
|
||||
bool context_lost_ = false;
|
||||
VulkanProvider* GetVulkanProvider() const {
|
||||
return static_cast<VulkanProvider*>(provider_);
|
||||
}
|
||||
|
||||
private:
|
||||
friend class VulkanProvider;
|
||||
|
||||
explicit VulkanContext(VulkanProvider* provider, Window* target_window);
|
||||
|
||||
private:
|
||||
bool Initialize();
|
||||
|
||||
std::unique_ptr<VulkanSwapChain> swap_chain_;
|
||||
std::unique_ptr<VulkanImmediateDrawer> immediate_drawer_;
|
||||
private:
|
||||
std::unique_ptr<VulkanImmediateDrawer> immediate_drawer_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace vulkan
|
||||
|
||||
Reference in New Issue
Block a user