Skip to content

Commit

Permalink
[GPU] Improve readability of initialization errors and remove referen…
Browse files Browse the repository at this point in the history
…ces to OpenGL.
  • Loading branch information
gibbed committed Jul 1, 2018
1 parent 94d1106 commit ba7dc6b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
12 changes: 8 additions & 4 deletions src/xenia/gpu/graphics_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ X_STATUS GraphicsSystem::Setup(cpu::Processor* processor,

if (!processor_context) {
xe::FatalError(
"Unable to initialize graphics context. Xenia requires OpenGL 4.5 or "
"Vulkan support. Ensure you have the latest drivers for your GPU and "
"that it supports OpenGL or Vulkan. See http://xenia.jp/faq/ for "
"more information.");
"Unable to initialize graphics context. Xenia requires Vulkan "
"support.\n"
"\n"
"Ensure you have the latest drivers for your GPU and "
"that it supports Vulkan.\n"
"\n"
"See http://xenia.jp/faq/ for more information and a list of "
"supported GPUs.");
return X_STATUS_UNSUCCESSFUL;
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/xenia/ui/vulkan/vulkan_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ std::unique_ptr<VulkanProvider> VulkanProvider::Create(Window* main_window) {
if (!provider->Initialize()) {
xe::FatalError(
"Unable to initialize Vulkan graphics subsystem.\n"
"\n"
"Ensure you have the latest drivers for your GPU and that it "
"supports Vulkan. See http://xenia.jp/faq/ for more information and a "
"list of supported GPUs.");
"supports Vulkan.\n"
"\n"
"See http://xenia.jp/faq/ for more information and a list of supported "
"GPUs.");
return nullptr;
}
return provider;
Expand Down
9 changes: 6 additions & 3 deletions src/xenia/ui/vulkan/vulkan_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,12 @@ const char* to_string(VkPresentModeKHR present_mode) {
void FatalVulkanError(std::string error) {
xe::FatalError(
error +
"\nEnsure you have the latest drivers for your GPU and that it supports "
"Vulkan. See http://xenia.jp/faq/ for more information and a list"
"of supported GPUs.");
"\n\n"
"Ensure you have the latest drivers for your GPU and that it supports "
"Vulkan.\n"
"\n"
"See http://xenia.jp/faq/ for more information and a list of supported "
"GPUs.");
}

void CheckResult(VkResult result, const char* action) {
Expand Down

0 comments on commit ba7dc6b

Please sign in to comment.