mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Add missing check to Vulkan init. Disable validation on android-x86-64
The latter is broken in the Android SDK emulator.
This commit is contained in:
@@ -614,6 +614,7 @@ VkResult VulkanContext::CreateDevice(int physical_device) {
|
||||
WARN_LOG(Log::G3D, "CheckLayers for device %d failed", physical_device);
|
||||
}
|
||||
|
||||
queue_count = 0;
|
||||
vkGetPhysicalDeviceQueueFamilyProperties(physical_devices_[physical_device_], &queue_count, nullptr);
|
||||
_dbg_assert_(queue_count >= 1);
|
||||
|
||||
@@ -1250,13 +1251,14 @@ VkResult VulkanContext::ReinitSurface() {
|
||||
|
||||
// Query presentation modes. We need to know which ones are available for InitSwapchain().
|
||||
availablePresentModes_.clear();
|
||||
uint32_t presentModeCount;
|
||||
uint32_t presentModeCount = 0;
|
||||
VkResult res = vkGetPhysicalDeviceSurfacePresentModesKHR(physical_devices_[physical_device_], surface_, &presentModeCount, nullptr);
|
||||
availablePresentModes_.resize(presentModeCount);
|
||||
_dbg_assert_(res == VK_SUCCESS);
|
||||
res = vkGetPhysicalDeviceSurfacePresentModesKHR(physical_devices_[physical_device_], surface_, &presentModeCount, availablePresentModes_.data());
|
||||
_dbg_assert_(res == VK_SUCCESS);
|
||||
|
||||
if (res == VK_SUCCESS) {
|
||||
availablePresentModes_.resize(presentModeCount);
|
||||
res = vkGetPhysicalDeviceSurfacePresentModesKHR(physical_devices_[physical_device_], surface_, &presentModeCount, availablePresentModes_.data());
|
||||
_dbg_assert_(res == VK_SUCCESS);
|
||||
}
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
#include "Core/FrameTiming.h"
|
||||
#include "GPU/Vulkan/VulkanUtil.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
// Disable this on x64 android, causes problems.
|
||||
|
||||
#if defined(_DEBUG) && !(PPSSPP_PLATFORM(ANDROID) && PPSSPP_ARCH(AMD64))
|
||||
static const bool g_Validate = true;
|
||||
#else
|
||||
static const bool g_Validate = false;
|
||||
@@ -54,6 +56,7 @@ VkPresentModeKHR ConfigPresentModeToVulkan(Draw::DrawContext *draw) {
|
||||
// TODO: Share this between backends.
|
||||
static VulkanInitFlags VulkanInitFlagsFromConfig() {
|
||||
VulkanInitFlags flags = (VulkanInitFlags)0;
|
||||
|
||||
if (g_Validate) {
|
||||
flags |= VulkanInitFlags::VALIDATE;
|
||||
}
|
||||
|
||||
@@ -1096,7 +1096,7 @@ void ImMemWindow::Draw(MIPSDebugInterface *mipsDebug, ImConfig &cfg, ImControl &
|
||||
ImGui::SetKeyboardFocusHere(0);
|
||||
focusSearchValueInput_ = false;
|
||||
}
|
||||
if (ImGui::InputText("data", searchStr_, IM_ARRAYSIZE(searchStr_), ImGuiInputTextFlags_EnterReturnsTrue) | ImGui::Button("Search")) {
|
||||
if (ImGui::InputText("data", searchStr_, IM_ARRAYSIZE(searchStr_), ImGuiInputTextFlags_EnterReturnsTrue) || ImGui::Button("Search")) {
|
||||
memView_.initSearch(searchStr_, selectedSearchType_);
|
||||
// TODO: transfer focus on the memview.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user