mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix SDL build
This commit is contained in:
parent
3fd216ad3a
commit
7ccf23542d
2 changed files with 11 additions and 9 deletions
|
@ -505,15 +505,18 @@ void VulkanContext::ChooseDevice(int physical_device) {
|
|||
ELOG("Could not find a usable depth stencil format.");
|
||||
}
|
||||
|
||||
// This is as good a place as any to do this
|
||||
// This is as good a place as any to do this.
|
||||
vkGetPhysicalDeviceMemoryProperties(physical_devices_[physical_device_], &memory_properties);
|
||||
ILOG("Memory Types (%d):", memory_properties.memoryTypeCount);
|
||||
for (int i = 0; i < (int)memory_properties.memoryTypeCount; i++) {
|
||||
// Don't bother printing dummy memory types.
|
||||
if (!memory_properties.memoryTypes[i].propertyFlags)
|
||||
continue;
|
||||
ILOG(" %d: Heap %d; Flags: %s%s%s%s ", i, memory_properties.memoryTypes[i].heapIndex,
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) ? "DEVICE_LOCAL_BIT" : "",
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) ? "HOST_VISIBLE_BIT" : "",
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) ? "HOST_CACHED_BIT" : "",
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) ? "HOST_COHERENT_BIT" : "");
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) ? "DEVICE_LOCAL " : "",
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) ? "HOST_VISIBLE " : "",
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) ? "HOST_CACHED " : "",
|
||||
(memory_properties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) ? "HOST_COHERENT " : "");
|
||||
}
|
||||
|
||||
// Optional features
|
||||
|
|
|
@ -63,16 +63,15 @@ bool SDLVulkanGraphicsContext::Init(SDL_Window *&window, int x, int y, int mode,
|
|||
case SDL_SYSWM_X11:
|
||||
#if defined(VK_USE_PLATFORM_XLIB_KHR)
|
||||
vulkan_->InitSurface(WINDOWSYSTEM_XLIB, (void*)sys_info.info.x11.display,
|
||||
(void *)(intptr_t)sys_info.info.x11.window, pixel_xres, pixel_yres);
|
||||
(void *)(intptr_t)sys_info.info.x11.window);
|
||||
#elif defined(VK_USE_PLATFORM_XCB_KHR)
|
||||
vulkan_->InitSurface(WINDOWSYSTEM_XCB, (void*)XGetXCBConnection(sys_info.info.x11.display),
|
||||
(void *)(intptr_t)sys_info.info.x11.window, pixel_xres, pixel_yres);
|
||||
(void *)(intptr_t)sys_info.info.x11.window);
|
||||
#endif
|
||||
break;
|
||||
#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
|
||||
case SDL_SYSWM_WAYLAND:
|
||||
vulkan_->InitSurface(WINDOWSYSTEM_WAYLAND, (void*)sys_info.info.wl.display,
|
||||
(void *)sys_info.info.wl.surface, pixel_xres, pixel_yres);
|
||||
vulkan_->InitSurface(WINDOWSYSTEM_WAYLAND, (void*)sys_info.info.wl.display, (void *)sys_info.info.wl.surface);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue