code: Add additional logging during init
This commit is contained in:
parent
7c7e9427ba
commit
410ba37ec2
|
@ -2462,6 +2462,7 @@ int PS4_SYSV_ABI Func_F916890425496553() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterlibSceGnmDriver(Core::Loader::SymbolsResolver* sym) {
|
void RegisterlibSceGnmDriver(Core::Loader::SymbolsResolver* sym) {
|
||||||
|
LOG_INFO(Lib_GnmDriver, "Initializing renderer");
|
||||||
liverpool = std::make_unique<AmdGpu::Liverpool>();
|
liverpool = std::make_unique<AmdGpu::Liverpool>();
|
||||||
renderer = std::make_unique<Vulkan::RendererVulkan>(*g_window, liverpool.get());
|
renderer = std::make_unique<Vulkan::RendererVulkan>(*g_window, liverpool.get());
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
namespace Libraries {
|
namespace Libraries {
|
||||||
|
|
||||||
void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
|
void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
|
||||||
|
LOG_INFO(Lib_Kernel, "Initializing HLE libraries");
|
||||||
Libraries::Kernel::LibKernel_Register(sym);
|
Libraries::Kernel::LibKernel_Register(sym);
|
||||||
Libraries::VideoOut::RegisterLib(sym);
|
Libraries::VideoOut::RegisterLib(sym);
|
||||||
Libraries::GnmDriver::RegisterlibSceGnmDriver(sym);
|
Libraries::GnmDriver::RegisterlibSceGnmDriver(sym);
|
||||||
|
|
|
@ -20,6 +20,9 @@ MemoryManager::MemoryManager() {
|
||||||
const VAddr virtual_base = impl.VirtualBase();
|
const VAddr virtual_base = impl.VirtualBase();
|
||||||
const size_t virtual_size = impl.VirtualSize();
|
const size_t virtual_size = impl.VirtualSize();
|
||||||
vma_map.emplace(virtual_base, VirtualMemoryArea{virtual_base, virtual_size});
|
vma_map.emplace(virtual_base, VirtualMemoryArea{virtual_base, virtual_size});
|
||||||
|
|
||||||
|
// Log initialization.
|
||||||
|
LOG_INFO(Kernel_Vmm, "Usable memory address space {}_GB", virtual_size >> 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryManager::~MemoryManager() = default;
|
MemoryManager::~MemoryManager() = default;
|
||||||
|
|
|
@ -29,12 +29,10 @@ namespace Core {
|
||||||
static constexpr s32 WindowWidth = 1280;
|
static constexpr s32 WindowWidth = 1280;
|
||||||
static constexpr s32 WindowHeight = 720;
|
static constexpr s32 WindowHeight = 720;
|
||||||
|
|
||||||
Emulator::Emulator() : window{WindowWidth, WindowHeight, controller} {
|
Emulator::Emulator() : memory{Core::Memory::Instance()},
|
||||||
|
window{WindowWidth, WindowHeight, controller} {
|
||||||
g_window = &window;
|
g_window = &window;
|
||||||
|
|
||||||
// Initialize memory system as early as possible to reserve mappings.
|
|
||||||
[[maybe_unused]] const auto* memory = Core::Memory::Instance();
|
|
||||||
|
|
||||||
// Read configuration file.
|
// Read configuration file.
|
||||||
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||||
Config::load(config_dir / "config.toml");
|
Config::load(config_dir / "config.toml");
|
||||||
|
|
|
@ -29,6 +29,8 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void LoadSystemModules(const std::filesystem::path& file);
|
void LoadSystemModules(const std::filesystem::path& file);
|
||||||
|
|
||||||
|
Core::MemoryManager* memory;
|
||||||
Input::GameController* controller = Common::Singleton<Input::GameController>::Instance();
|
Input::GameController* controller = Common::Singleton<Input::GameController>::Instance();
|
||||||
Core::Linker* linker = Common::Singleton<Core::Linker>::Instance();
|
Core::Linker* linker = Common::Singleton<Core::Linker>::Instance();
|
||||||
Frontend::WindowSDL window;
|
Frontend::WindowSDL window;
|
||||||
|
|
|
@ -49,6 +49,7 @@ Instance::Instance(Frontend::WindowSDL& window, s32 physical_device_index,
|
||||||
}
|
}
|
||||||
const std::size_t num_physical_devices = static_cast<u16>(physical_devices.size());
|
const std::size_t num_physical_devices = static_cast<u16>(physical_devices.size());
|
||||||
ASSERT_MSG(num_physical_devices > 0, "No physical devices found");
|
ASSERT_MSG(num_physical_devices > 0, "No physical devices found");
|
||||||
|
LOG_INFO(Render_Vulkan, "Found {} physical devices", num_physical_devices);
|
||||||
|
|
||||||
if (physical_device_index < 0) {
|
if (physical_device_index < 0) {
|
||||||
std::vector<std::pair<size_t, vk::PhysicalDeviceProperties2>> properties2{};
|
std::vector<std::pair<size_t, vk::PhysicalDeviceProperties2>> properties2{};
|
||||||
|
@ -73,12 +74,10 @@ Instance::Instance(Frontend::WindowSDL& window, s32 physical_device_index,
|
||||||
|
|
||||||
available_extensions = GetSupportedExtensions(physical_device);
|
available_extensions = GetSupportedExtensions(physical_device);
|
||||||
properties = physical_device.getProperties();
|
properties = physical_device.getProperties();
|
||||||
if (properties.apiVersion < TargetVulkanApiVersion) {
|
ASSERT_MSG(properties.apiVersion >= TargetVulkanApiVersion,
|
||||||
throw std::runtime_error(fmt::format(
|
"Vulkan {}.{} is required, but only {}.{} is supported by device!",
|
||||||
"Vulkan {}.{} is required, but only {}.{} is supported by device!",
|
VK_VERSION_MAJOR(TargetVulkanApiVersion), VK_VERSION_MINOR(TargetVulkanApiVersion),
|
||||||
VK_VERSION_MAJOR(TargetVulkanApiVersion), VK_VERSION_MINOR(TargetVulkanApiVersion),
|
VK_VERSION_MAJOR(properties.apiVersion), VK_VERSION_MINOR(properties.apiVersion));
|
||||||
VK_VERSION_MAJOR(properties.apiVersion), VK_VERSION_MINOR(properties.apiVersion)));
|
|
||||||
}
|
|
||||||
|
|
||||||
CollectDeviceParameters();
|
CollectDeviceParameters();
|
||||||
CreateDevice();
|
CreateDevice();
|
||||||
|
|
|
@ -168,6 +168,8 @@ std::vector<const char*> GetInstanceExtensions(Frontend::WindowSystemType window
|
||||||
|
|
||||||
vk::UniqueInstance CreateInstance(vk::DynamicLoader& dl, Frontend::WindowSystemType window_type,
|
vk::UniqueInstance CreateInstance(vk::DynamicLoader& dl, Frontend::WindowSystemType window_type,
|
||||||
bool enable_validation, bool dump_command_buffers) {
|
bool enable_validation, bool dump_command_buffers) {
|
||||||
|
LOG_INFO(Render_Vulkan, "Creating vulkan instance");
|
||||||
|
|
||||||
auto vkGetInstanceProcAddr =
|
auto vkGetInstanceProcAddr =
|
||||||
dl.getProcAddress<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
|
dl.getProcAddress<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
|
||||||
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
|
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
|
||||||
|
@ -176,12 +178,10 @@ vk::UniqueInstance CreateInstance(vk::DynamicLoader& dl, Frontend::WindowSystemT
|
||||||
? vk::enumerateInstanceVersion()
|
? vk::enumerateInstanceVersion()
|
||||||
: VK_API_VERSION_1_0;
|
: VK_API_VERSION_1_0;
|
||||||
|
|
||||||
if (available_version < TargetVulkanApiVersion) {
|
ASSERT_MSG(available_version >= TargetVulkanApiVersion,
|
||||||
throw std::runtime_error(fmt::format(
|
"Vulkan {}.{} is required, but only {}.{} is supported by instance!",
|
||||||
"Vulkan {}.{} is required, but only {}.{} is supported by instance!",
|
VK_VERSION_MAJOR(TargetVulkanApiVersion), VK_VERSION_MINOR(TargetVulkanApiVersion),
|
||||||
VK_VERSION_MAJOR(TargetVulkanApiVersion), VK_VERSION_MINOR(TargetVulkanApiVersion),
|
VK_VERSION_MAJOR(available_version), VK_VERSION_MINOR(available_version));
|
||||||
VK_VERSION_MAJOR(available_version), VK_VERSION_MINOR(available_version)));
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto extensions = GetInstanceExtensions(window_type, true);
|
const auto extensions = GetInstanceExtensions(window_type, true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue