layers:Add pre-built DevSim layer
authorTobin Ehlis <tobine@google.com>
Wed, 15 Nov 2017 23:10:39 +0000 (16:10 -0700)
committerTobin Ehlis <tobine@google.com>
Fri, 17 Nov 2017 16:38:09 +0000 (09:38 -0700)
Checking-in DevSim binary for linux to use in Travis-CI testing along
with seven initial json profiles to be tested w/ DevSim on top of mock.

layers/CMakeLists.txt
layers/linux/VkLayer_device_simulation.json [new file with mode: 0644]
layers/linux/libVkLayer_device_simulation.so [new file with mode: 0755]

index f9f1333d32a3a3d2b96bcd8b7a76ac01c4b2ac9f..d0311710fd530c9f69fe5ab0374d6316b3dcb08e 100644 (file)
@@ -39,6 +39,14 @@ set(LAYER_JSON_FILES_NO_DEPENDENCIES
 
 set(LAYER_JSON_FILES ${LAYER_JSON_FILES_WITH_DEPENDENCIES} ${LAYER_JSON_FILES_NO_DEPENDENCIES})
 
+set(LAYER_BINARY_JSON_FILES
+    VkLayer_device_simulation
+    )
+
+set(LAYER_BINARY_FILES
+    libVkLayer_device_simulation
+    )
+
 if (WIN32)
     if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR))
         if (CMAKE_GENERATOR MATCHES "^Visual Studio.*")
@@ -77,6 +85,18 @@ else()
                 VERBATIM
                 )
         endforeach(config_file)
+        foreach (config_file ${LAYER_BINARY_JSON_FILES})
+            add_custom_target(${config_file}-json ALL
+                COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/linux/${config_file}.json
+                VERBATIM
+                )
+        endforeach(config_file)
+        foreach (config_file ${LAYER_BINARY_FILES})
+            add_custom_target(${config_file}-so ALL
+                COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/linux/${config_file}.so
+                VERBATIM
+                )
+        endforeach(config_file)
         # Add link to vk_validation_error_messages.h in build dir for scripts to pick up
         add_custom_target(vk_validation_error_messages ALL
             COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/vk_validation_error_messages.h
@@ -84,7 +104,7 @@ else()
             )
     endif()
 endif()
-# If a layer has a direcgt dependency on a project with the same name, use it.
+# If a layer has a direct dependency on a project with the same name, use it.
 foreach (config_file ${LAYER_JSON_FILES_WITH_DEPENDENCIES})
     add_dependencies(${config_file}-json ${config_file})
 endforeach(config_file)
@@ -92,7 +112,14 @@ endforeach(config_file)
 foreach (config_file ${LAYER_JSON_FILES_NO_DEPENDENCIES})
     add_dependencies(${config_file}-json VkLayer_utils)
 endforeach(config_file)
-
+if(UNIX)
+    foreach (config_file ${LAYER_BINARY_JSON_FILES})
+        add_dependencies(${config_file}-json VkLayer_utils)
+    endforeach(config_file)
+    foreach (config_file ${LAYER_BINARY_FILES})
+        add_dependencies(${config_file}-so VkLayer_utils)
+    endforeach(config_file)
+endif()
 
 # Add targets for JSON file install on Linux.
 # Need to remove the "./" from the library path before installing to /etc.
diff --git a/layers/linux/VkLayer_device_simulation.json b/layers/linux/VkLayer_device_simulation.json
new file mode 100644 (file)
index 0000000..81b8213
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "file_format_version" : "1.1.0",
+    "layer" : {
+        "name": "VK_LAYER_LUNARG_device_simulation",
+        "type": "GLOBAL",
+        "library_path": "./libVkLayer_device_simulation.so",
+        "api_version": "1.0.65",
+        "implementation_version": "1.2.0",
+        "description": "LunarG device simulation layer"
+    }
+}
diff --git a/layers/linux/libVkLayer_device_simulation.so b/layers/linux/libVkLayer_device_simulation.so
new file mode 100755 (executable)
index 0000000..3bfea56
Binary files /dev/null and b/layers/linux/libVkLayer_device_simulation.so differ