Merge pull request #4542 from ReinUsesLisp/gpu-init-base

video_core: Initialize renderer with a GPU
This commit is contained in:
bunnei 2020-08-24 22:56:11 -04:00 committed by GitHub
commit bb752df736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 172 additions and 119 deletions

View file

@ -237,8 +237,10 @@ std::string BuildCommaSeparatedExtensions(std::vector<std::string> available_ext
} // Anonymous namespace
RendererVulkan::RendererVulkan(Core::Frontend::EmuWindow& window, Core::System& system)
: RendererBase(window), system{system} {}
RendererVulkan::RendererVulkan(Core::System& system_, Core::Frontend::EmuWindow& emu_window,
Tegra::GPU& gpu_,
std::unique_ptr<Core::Frontend::GraphicsContext> context)
: RendererBase{emu_window, std::move(context)}, system{system_}, gpu{gpu_} {}
RendererVulkan::~RendererVulkan() {
ShutDown();

View file

@ -38,7 +38,9 @@ struct VKScreenInfo {
class RendererVulkan final : public VideoCore::RendererBase {
public:
explicit RendererVulkan(Core::Frontend::EmuWindow& window, Core::System& system);
explicit RendererVulkan(Core::System& system, Core::Frontend::EmuWindow& emu_window,
Tegra::GPU& gpu,
std::unique_ptr<Core::Frontend::GraphicsContext> context);
~RendererVulkan() override;
bool Init() override;
@ -58,6 +60,7 @@ private:
void Report() const;
Core::System& system;
Tegra::GPU& gpu;
Common::DynamicLibrary library;
vk::InstanceDispatch dld;