skyline/app/src/main/cpp/skyline/gpu.h
Billy Laws 175ba11f07 Integrate BCeNabler support into QuirkManager
Allows using BCn format textures on devices where they are unsupported by the driver.
2022-04-14 14:14:52 +05:30

47 lines
1.5 KiB
C++

// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include "gpu/quirk_manager.h"
#include "gpu/memory_manager.h"
#include "gpu/command_scheduler.h"
#include "gpu/presentation_engine.h"
#include "gpu/texture_manager.h"
#include "gpu/buffer_manager.h"
#include "gpu/descriptor_allocator.h"
#include "gpu/shader_manager.h"
namespace skyline::gpu {
static constexpr u32 VkApiVersion{VK_API_VERSION_1_1}; //!< The version of core Vulkan that we require
/**
* @brief An interface to host GPU structures, anything concerning host GPU/Presentation APIs is encapsulated by this
*/
class GPU {
public:
vk::raii::Context vkContext;
vk::raii::Instance vkInstance;
vk::raii::DebugReportCallbackEXT vkDebugReportCallback; //!< An RAII Vulkan debug report manager which calls into 'GPU::DebugCallback'
vk::raii::PhysicalDevice vkPhysicalDevice;
u32 vkQueueFamilyIndex{};
vk::raii::Device vkDevice;
std::mutex queueMutex; //!< Synchronizes access to the queue as it is externally synchronized
vk::raii::Queue vkQueue; //!< A Vulkan Queue supporting graphics and compute operations
QuirkManager quirks;
memory::MemoryManager memory;
CommandScheduler scheduler;
PresentationEngine presentation;
TextureManager texture;
BufferManager buffer;
DescriptorAllocator descriptor;
ShaderManager shader;
GPU(const DeviceState &state);
};
}