repo: Remove MIR specific code.
authorTony-LunarG <tony@lunarg.com>
Mon, 22 Oct 2018 17:42:03 +0000 (11:42 -0600)
committerTony Barbour <tony@lunarg.com>
Fri, 26 Oct 2018 19:35:11 +0000 (13:35 -0600)
Still need to remove MIR from scripts/common_codegen.py
and from the Vulkan wrapper.

Change-Id: Ib00cbe10b3e80878fb5e15c1e628685f33d31331

BUILD.md
cmake/FindMir.cmake [deleted file]
cube/CMakeLists.txt
cube/cube.c
cube/cube.cpp
icd/CMakeLists.txt
scripts/mock_icd_generator.py
vulkaninfo/vulkaninfo.c

index 5e3817a..3f06f5f 100644 (file)
--- a/BUILD.md
+++ b/BUILD.md
@@ -173,7 +173,6 @@ on/off options currently supported by this repository:
 | BUILD_WSI_XCB_SUPPORT | Linux | `ON` | Build the components with XCB support. |
 | BUILD_WSI_XLIB_SUPPORT | Linux | `ON` | Build the components with Xlib support. |
 | BUILD_WSI_WAYLAND_SUPPORT | Linux | `ON` | Build the components with Wayland support. |
-| BUILD_WSI_MIR_SUPPORT | Linux | `OFF` | Build the components with Mir support. |
 | USE_CCACHE | Linux | `OFF` | Enable caching with the CCache program. |
 
 The following is a table of all string options currently supported by this repository:
@@ -348,7 +347,7 @@ repository to other Linux distributions.
 #### Required Package List
 
     sudo apt-get install git cmake build-essential libx11-xcb-dev \
-        libxkbcommon-dev libmirclient-dev libwayland-dev libxrandr-dev
+        libxkbcommon-dev libwayland-dev libxrandr-dev
 
 ### Linux Build
 
diff --git a/cmake/FindMir.cmake b/cmake/FindMir.cmake
deleted file mode 100644 (file)
index 3f1fb0b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Try to find Mir on a Unix system
-#
-# This will define:
-#
-#   MIR_FOUND       - System has Mir
-#   MIR_LIBRARIES   - Link these to use Mir
-#   MIR_INCLUDE_DIR - Include directory for Mir
-#   MIR_DEFINITIONS - Compiler switches required for using Mir
-
-if (NOT WIN32)
-
-  find_package (PkgConfig)
-  pkg_check_modules (PKG_MIR QUIET mirclient)
-  set(MIR_DEFINITIONS ${PKG_MIR_CFLAGS_OTHER})
-
-  find_path(MIR_INCLUDE_DIR
-      NAMES xkbcommon/xkbcommon.h
-      HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
-  )
-
-  find_library(MIR_LIBRARY
-      NAMES mirclient
-      HINTS ${PKG_MIR_LIBRARIES} ${MIR_LIBRARY_DIRS}
-  )
-
-  set (MIR_INCLUDE_DIR ${PKG_MIR_INCLUDE_DIRS})
-  set (MIR_LIBRARIES   ${MIR_LIBRARY})
-
-  include (FindPackageHandleStandardArgs)
-  find_package_handle_standard_args (MIR DEFAULT_MSG
-      MIR_LIBRARIES
-      MIR_INCLUDE_DIR
-  )
-
-  mark_as_advanced (MIR_LIBRARIES MIR_INCLUDE_DIR)
-
-endif ()
index b2924bb..7481f38 100644 (file)
@@ -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()
index ef54fd3..e88fdc2 100644 (file)
 #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
index 5d0313e..28efad6 100644 (file)
 #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
index 8c3aa6b..21abf1c 100644 (file)
@@ -47,11 +47,6 @@ elseif(UNIX AND NOT APPLE) # i.e. Linux
     if(BUILD_WSI_WAYLAND_SUPPORT)
         add_definitions(-DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_WAYLAND_KHX)
     endif()
-
-    if(BUILD_WSI_MIR_SUPPORT)
-        add_definitions(-DVK_USE_PLATFORM_MIR_KHR -DVK_USE_PLATFORM_MIR_KHX)
-        include_directories(${MIR_INCLUDE_DIR})
-    endif()
 else()
     message(FATAL_ERROR "Unsupported Platform!")
 endif()
index 10cef30..a7a342a 100644 (file)
@@ -322,18 +322,6 @@ EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
 }
 #endif /* VK_USE_PLATFORM_WAYLAND_KHR */
 
-#ifdef VK_USE_PLATFORM_MIR_KHR
-
-EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
-    VkInstance                                  instance,
-    const VkMirSurfaceCreateInfoKHR*            pCreateInfo,
-    const VkAllocationCallbacks*                pAllocator,
-    VkSurfaceKHR*                               pSurface)
-{
-    return vkmock::CreateMirSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
-}
-#endif /* VK_USE_PLATFORM_MIR_KHR */
-
 #ifdef VK_USE_PLATFORM_ANDROID_KHR
 
 EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
index d786fdf..95c99f9 100644 (file)
 #include <X11/Xutil.h>
 #endif
 
-#if defined(VK_USE_PLATFORM_MIR_KHR)
-#warning "Vulkaninfo does not have code for Mir at this time"
-#endif
-
 #if defined(VK_USE_PLATFORM_MACOS_MVK)
 #include "metal_view.h"
 #endif
@@ -3610,7 +3606,7 @@ int main(int argc, char **argv) {
     }
 #endif
 
-    // TODO: Android / Wayland / MIR
+    // TODO: Android / Wayland
     if (!format_count && !present_mode_count) {
         if (html_output) {
             fprintf(out, "\t\t\t\t<details><summary>None found</summary></details>\n");