aboutsummaryrefslogtreecommitdiff
path: root/cube
diff options
context:
space:
mode:
authorTony-LunarG <tony@lunarg.com>2018-10-22 11:42:03 -0600
committerTony Barbour <tony@lunarg.com>2018-10-26 13:35:11 -0600
commit4e46af9c54e64446ed5e373a5d0e58603ab2b87c (patch)
tree039d82995f245f5a410c285fbe015598fcec2a30 /cube
parent2e8d601de618eddf2bab8597fd140b2824a060b2 (diff)
downloadusermoji-4e46af9c54e64446ed5e373a5d0e58603ab2b87c.tar.xz
repo: Remove MIR specific code.
Still need to remove MIR from scripts/common_codegen.py and from the Vulkan wrapper. Change-Id: Ib00cbe10b3e80878fb5e15c1e628685f33d31331
Diffstat (limited to 'cube')
-rw-r--r--cube/CMakeLists.txt14
-rw-r--r--cube/cube.c14
-rw-r--r--cube/cube.cpp16
3 files changed, 1 insertions, 43 deletions
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
index b2924bbf..7481f383 100644
--- a/cube/CMakeLists.txt
+++ b/cube/CMakeLists.txt
@@ -46,8 +46,7 @@ if(UNIX AND NOT APPLE) # i.e. Linux
option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
option(BUILD_WSI_WAYLAND_SUPPORT "Build Wayland WSI support" ON)
- option(BUILD_WSI_MIR_SUPPORT "Build Mir WSI support" OFF)
- set(CUBE_WSI_SELECTION "XCB" CACHE STRING "Select WSI target for cube (XCB, XLIB, WAYLAND, MIR, DISPLAY)")
+ set(CUBE_WSI_SELECTION "XCB" CACHE STRING "Select WSI target for cube (XCB, XLIB, WAYLAND, DISPLAY)")
if(BUILD_WSI_XCB_SUPPORT)
find_package(XCB REQUIRED)
@@ -61,11 +60,6 @@ if(UNIX AND NOT APPLE) # i.e. Linux
find_package(Wayland REQUIRED)
include_directories(${WAYLAND_CLIENT_INCLUDE_DIR})
endif()
-
- if(BUILD_WSI_MIR_SUPPORT)
- find_package(Mir REQUIRED)
- endif()
-
endif()
if(WIN32)
@@ -107,12 +101,6 @@ elseif(UNIX AND NOT APPLE) # i.e. Linux
set(CUBE_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIR} ${CUBE_INCLUDE_DIRS})
link_libraries(${WAYLAND_CLIENT_LIBRARIES})
add_definitions(-DVK_USE_PLATFORM_WAYLAND_KHR)
- elseif(CUBE_WSI_SELECTION STREQUAL "MIR")
- if(NOT BUILD_WSI_MIR_SUPPORT)
- message(FATAL_ERROR "Selected MIR for cube build but not building Mir support")
- endif()
- add_definitions(-DVK_USE_PLATFORM_MIR_KHR)
- set(CUBE_INCLUDE_DIRS ${MIR_INCLUDE_DIR} ${CUBE_INCLUDE_DIRS})
elseif(CUBE_WSI_SELECTION STREQUAL "DISPLAY")
add_definitions(-DVK_USE_PLATFORM_DISPLAY_KHR)
else()
diff --git a/cube/cube.c b/cube/cube.c
index ef54fd34..e88fdc2c 100644
--- a/cube/cube.c
+++ b/cube/cube.c
@@ -44,10 +44,6 @@
#define APP_NAME_STR_LEN 80
#endif // _WIN32
-#if defined(VK_USE_PLATFORM_MIR_KHR)
-#warning "Cube does not have code for Mir at this time"
-#endif
-
#ifdef ANDROID
#include "vulkan_wrapper.h"
#else
@@ -330,7 +326,6 @@ struct demo {
struct wl_seat *seat;
struct wl_pointer *pointer;
struct wl_keyboard *keyboard;
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_ANDROID_KHR)
struct ANativeWindow *window;
#elif (defined(VK_USE_PLATFORM_IOS_MVK) || defined(VK_USE_PLATFORM_MACOS_MVK))
@@ -2331,7 +2326,6 @@ static void demo_cleanup(struct demo *demo) {
wl_compositor_destroy(demo->compositor);
wl_registry_destroy(demo->registry);
wl_display_disconnect(demo->display);
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
vkDestroyInstance(demo->inst, NULL);
@@ -2732,7 +2726,6 @@ static void demo_run(struct demo *demo) {
demo->quit = TRUE;
}
}
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
static VkResult demo_create_display_surface(struct demo *demo) {
VkResult U_ASSERT_ONLY err;
@@ -2999,7 +2992,6 @@ static void demo_init_vk(struct demo *demo) {
platformSurfaceExtFound = 1;
demo->extension_names[demo->enabled_extension_count++] = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME;
}
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
if (!strcmp(VK_KHR_DISPLAY_EXTENSION_NAME, instance_extensions[i].extensionName)) {
platformSurfaceExtFound = 1;
@@ -3070,7 +3062,6 @@ static void demo_init_vk(struct demo *demo) {
"Do you have a compatible Vulkan installable client driver (ICD) installed?\n"
"Please look at the Getting Started guide for additional information.\n",
"vkCreateInstance Failure");
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
ERR_EXIT("vkEnumerateInstanceExtensionProperties failed to find the " VK_KHR_DISPLAY_EXTENSION_NAME
" extension.\n\n"
@@ -3356,7 +3347,6 @@ static void demo_init_vk_swapchain(struct demo *demo) {
createInfo.surface = demo->window;
err = vkCreateWaylandSurfaceKHR(demo->inst, &createInfo, NULL, &demo->surface);
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_ANDROID_KHR)
VkAndroidSurfaceCreateInfoKHR createInfo;
createInfo.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR;
@@ -3620,7 +3610,6 @@ static void registry_handle_global(void *data, struct wl_registry *registry, uin
static void registry_handle_global_remove(void *data UNUSED, struct wl_registry *registry UNUSED, uint32_t name UNUSED) {}
static const struct wl_registry_listener registry_listener = {registry_handle_global, registry_handle_global_remove};
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
static void demo_init_connection(struct demo *demo) {
@@ -3660,7 +3649,6 @@ static void demo_init_connection(struct demo *demo) {
demo->registry = wl_display_get_registry(demo->display);
wl_registry_add_listener(demo->registry, &registry_listener, demo);
wl_display_dispatch(demo->display);
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
}
@@ -3950,7 +3938,6 @@ int main(int argc, char **argv) {
demo_create_xlib_window(&demo);
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
demo_create_window(&demo);
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
demo_init_vk_swapchain(&demo);
@@ -3963,7 +3950,6 @@ int main(int argc, char **argv) {
demo_run_xlib(&demo);
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
demo_run(&demo);
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
demo_run_display(&demo);
#endif
diff --git a/cube/cube.cpp b/cube/cube.cpp
index 5d0313ee..28efad6a 100644
--- a/cube/cube.cpp
+++ b/cube/cube.cpp
@@ -32,10 +32,6 @@
#include <csignal>
#include <memory>
-#if defined(VK_USE_PLATFORM_MIR_KHR)
-#warning "Cubepp does not have code for Mir at this time"
-#endif
-
#define VULKAN_HPP_NO_SMART_HANDLE
#define VULKAN_HPP_NO_EXCEPTIONS
#include <vulkan/vulkan.hpp>
@@ -265,7 +261,6 @@ struct Demo {
void create_window();
#elif defined(VK_USE_PLATFORM_MACOS_MVK)
void run();
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
vk::Result create_display_surface();
void run_display();
@@ -295,7 +290,6 @@ struct Demo {
wl_seat *seat;
wl_pointer *pointer;
wl_keyboard *keyboard;
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif (defined(VK_USE_PLATFORM_IOS_MVK) || defined(VK_USE_PLATFORM_MACOS_MVK))
void *window;
#endif
@@ -504,7 +498,6 @@ static void registry_handle_global(void *data, wl_registry *registry, uint32_t i
static void registry_handle_global_remove(void *data, wl_registry *registry, uint32_t name) {}
static const wl_registry_listener registry_listener = {registry_handle_global, registry_handle_global_remove};
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
Demo::Demo()
@@ -533,7 +526,6 @@ Demo::Demo()
seat{nullptr},
pointer{nullptr},
keyboard{nullptr},
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
prepared{false},
use_staging_buffer{false},
@@ -678,7 +670,6 @@ void Demo::cleanup() {
wl_compositor_destroy(compositor);
wl_registry_destroy(registry);
wl_display_disconnect(display);
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
inst.destroy(nullptr);
@@ -1011,7 +1002,6 @@ void Demo::init_connection() {
registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, this);
wl_display_dispatch(display);
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
}
@@ -1106,7 +1096,6 @@ void Demo::init_vk() {
platformSurfaceExtFound = 1;
extension_names[enabled_extension_count++] = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME;
}
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
if (!strcmp(VK_KHR_DISPLAY_EXTENSION_NAME, instance_extensions[i].extensionName)) {
platformSurfaceExtFound = 1;
@@ -1155,7 +1144,6 @@ void Demo::init_vk() {
"Do you have a compatible Vulkan installable client driver (ICD) installed?\n"
"Please look at the Getting Started guide for additional information.\n",
"vkCreateInstance Failure");
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_XLIB_KHR)
ERR_EXIT("vkEnumerateInstanceExtensionProperties failed to find the " VK_KHR_XLIB_SURFACE_EXTENSION_NAME
" extension.\n\n"
@@ -1298,7 +1286,6 @@ void Demo::init_vk_swapchain() {
auto result = inst.createWaylandSurfaceKHR(&createInfo, nullptr, &surface);
VERIFY(result == vk::Result::eSuccess);
}
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_XLIB_KHR)
{
auto const createInfo = vk::XlibSurfaceCreateInfoKHR().setDpy(display).setWindow(xlib_window);
@@ -2706,7 +2693,6 @@ void Demo::run() {
quit = true;
}
}
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
vk::Result Demo::create_display_surface() {
@@ -2987,7 +2973,6 @@ int main(int argc, char **argv) {
demo.create_xlib_window();
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
demo.create_window();
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#endif
demo.init_vk_swapchain();
@@ -3000,7 +2985,6 @@ int main(int argc, char **argv) {
demo.run_xlib();
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
demo.run();
-#elif defined(VK_USE_PLATFORM_MIR_KHR)
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
demo.run_display();
#endif