layers: MR89, Fix gtests for android
authorMichael Lentine <mlentine@google.com>
Fri, 11 Dec 2015 18:49:51 +0000 (10:49 -0800)
committerMark Lobodzinski <mark@lunarg.com>
Wed, 30 Dec 2015 00:12:14 +0000 (17:12 -0700)
Conflicts:
layers/draw_state.cpp
layers/image.cpp
layers/mem_tracker.cpp

buildAndroid/jni/Android.mk
buildAndroid/jni/Application.mk
layers/apidump.h
layers/basic.cpp
layers/device_limits.cpp
layers/draw_state.cpp
layers/generic.h
layers/image.cpp
layers/mem_tracker.cpp
layers/swapchain.h
vk-layer-generate.py

index 167509d24ad0fee3c9b0b27944943cfbf4116f81..f8d9371355d7cdf7d8a2abc388f14285d775e4e5 100644 (file)
@@ -62,6 +62,18 @@ LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR
 LOCAL_LDLIBS    := -llog\r
 include $(BUILD_SHARED_LIBRARY)\r
 \r
+include $(CLEAR_VARS)\r
+LOCAL_MODULE := VKLayerDeviceLimits\r
+LOCAL_SRC_FILES += $(SRC_DIR)/layers/device_limits.cpp\r
+LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_debug_marker_table.cpp\r
+LOCAL_C_INCLUDES += $(SRC_DIR)/include \\r
+                    $(SRC_DIR)/buildAndroid/generated \\r
+                    $(SRC_DIR)/loader\r
+LOCAL_STATIC_LIBRARIES += layer_utils\r
+LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR\r
+LOCAL_LDLIBS    := -llog\r
+include $(BUILD_SHARED_LIBRARY)\r
+\r
 include $(CLEAR_VARS)\r
 LOCAL_MODULE := VKLayerImage\r
 LOCAL_SRC_FILES += $(SRC_DIR)/layers/image.cpp\r
index d89707fe5e96fa404164a43d3ab9bbde775b22ca..f5aa22cb5a11383b92c717e89c40f9589239c0e9 100644 (file)
@@ -15,6 +15,6 @@
 APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 mips mips64\r
 APP_PLATFORM := android-22\r
 APP_STL := gnustl_static\r
-APP_MODULES := layer_utils VKLayerBasic VKLayerDrawState VKLayerMemTracker VKLayerImage VKLayerParamChecker VKLayerGeneric VKLayerAPIDump VKLayerObjectTracker VKLayerThreading VKLayerValidationTests\r
+APP_MODULES := layer_utils VKLayerBasic VKLayerDrawState VKLayerMemTracker VKLayerDeviceLimits VKLayerImage VKLayerParamChecker VKLayerGeneric VKLayerAPIDump VKLayerObjectTracker VKLayerThreading VKLayerValidationTests\r
 APP_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES\r
 NDK_TOOLCHAIN_VERSION := 4.8\r
index fb13170bb0ddadb9154df6445b30af2024015eea..ce49431d123d08d273ca0a9eda73e139de1aa706 100644 (file)
@@ -36,7 +36,7 @@
 #define LAYER_PROPS_ARRAY_SIZE 1
 static const VkLayerProperties layerProps[LAYER_PROPS_ARRAY_SIZE] = {
     {
-        "Generic",
+        "VK_LAYER_LUNARG_api_dump",
         VK_API_VERSION,                 // specVersion
         VK_MAKE_VERSION(0, 1, 0),       // implementationVersion
         "layer: APIDump",
@@ -46,7 +46,7 @@ static const VkLayerProperties layerProps[LAYER_PROPS_ARRAY_SIZE] = {
 #define LAYER_DEV_PROPS_ARRAY_SIZE 1
 static const VkLayerProperties layerDevProps[LAYER_DEV_PROPS_ARRAY_SIZE] = {
     {
-        "Generic",
+        "VK_LAYER_LUNARG_api_dump",
         VK_API_VERSION,                 // specVersion
         VK_MAKE_VERSION(0, 1, 0),       // implementationVersion
         "layer: APIDump",
index 3c3c809c03172730b72f52dde75aeee2331cce68..1e054759e078285ccc3f016b8271c26a43e75fe8 100644 (file)
@@ -51,7 +51,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkLayerExtension1(VkDevice device
 
 static const VkLayerProperties basic_physicaldevice_layers[] = {
     {
-        "Basic",
+        "VK_LAYER_LUNARG_basic",
         VK_API_VERSION,
         VK_MAKE_VERSION(0, 1, 0),
         "Sample layer: Basic, implements vkLayerExtension1",
index e89dd668d77772de6cac3deb33fc23e8c95c5d36..f6bbacefc102a7723f0248934538b7b309f2f3d2 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *
  * Copyright (C) 2015 Valve Corporation
+ * Copyright (C) 2015 Google Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -43,7 +44,7 @@
 #include "vk_struct_size_helper.h"
 #include "device_limits.h"
 #include "vk_layer_config.h"
-#include "vk_debug_marker_layer.h"
+#include "vulkan/vk_debug_marker_layer.h"
 #include "vk_layer_table.h"
 #include "vk_layer_debug_marker_table.h"
 #include "vk_layer_data.h"
@@ -164,7 +165,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionPrope
 
 static const VkLayerProperties dl_global_layers[] = {
     {
-        "DeviceLimits",
+        "VK_LAYER_LUNARG_device_limits",
         VK_API_VERSION,
         VK_MAKE_VERSION(0, 1, 0),
         "Validation layer: Device Limits",
index a4385ed2a66f59e71858fbf689b3f3b17fa19378..fc42886d22338b9eb5b34ebdaf5f11fd108fe005 100644 (file)
@@ -2884,7 +2884,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionPrope
 
 static const VkLayerProperties ds_global_layers[] = {
     {
-        "DrawState",
+        "VK_LAYER_LUNARG_draw_state",
         VK_API_VERSION,
         VK_MAKE_VERSION(0, 1, 0),
         "Validation layer: DrawState",
index 6b5fc075a8aa13e9c221e8d1d8333bb745eb6d4c..955ea7d62aff0c96999a1d846b258009902110b1 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *
  * Copyright (C) 2015 Valve Corporation
+ * Copyright (C) 2015 Google Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -46,7 +47,7 @@ struct layer_data {
 
 static const VkLayerProperties globalLayerProps[] = {
     {
-        "Generic",
+        "VK_LAYER_LUNARG_generic",
         VK_API_VERSION,                 // specVersion
         VK_MAKE_VERSION(0, 1, 0),       // implementationVersion
         "layer: Generic",
@@ -55,7 +56,7 @@ static const VkLayerProperties globalLayerProps[] = {
 
 static const VkLayerProperties deviceLayerProps[] = {
     {
-        "Generic",
+        "VK_LAYER_LUNARG_generic",
         VK_API_VERSION,                 // specVersion
         VK_MAKE_VERSION(0, 1, 0),       // implementationVersion
         "layer: Generic",
index cf7d630291330fb947e9ae3ee423df9ed4c0caa9..a3acbc887765dcab0411e62a27889359247dfb19 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *
  * Copyright (C) 2015 Valve Corporation
+ * Copyright (C) 2015 Google Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -221,10 +222,10 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionPrope
 
 static const VkLayerProperties pc_global_layers[] = {
     {
-        "Image",
+        "VK_LAYER_LUNARG_image",
         VK_API_VERSION,
         VK_MAKE_VERSION(0, 1, 0),
-        "Validation layer: Image ParamChecker",
+        "Validation layer: Image",
     }
 };
 
index 538d89aade89691f9184d9d9c33bedc29fdf6a49..d3e9a92a2b1e001ee4a697d7965211b440beaaa9 100644 (file)
@@ -1237,7 +1237,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionPrope
 
 static const VkLayerProperties mtGlobalLayers[] = {
     {
-        "MemTracker",
+        "VK_LAYER_LUNARG_mem_tracker",
         VK_API_VERSION,
         VK_MAKE_VERSION(0, 1, 0),
         "Validation layer: MemTracker",
index d1896d79a7c3206c19fec01f2ede1ed5185f2806..21585d9b777d1c9d8ea1746d63ccf02b8764b8a1 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *
  * Copyright (C) 2015 Valve Corporation
+ * Copyright (C) 2015 Google Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -36,7 +37,7 @@
 
 static const VkLayerProperties globalLayerProps[] = {
     {
-        "Swapchain",
+        "VK_LAYER_LUNARG_swapchain",
         VK_API_VERSION,                 // specVersion
         VK_MAKE_VERSION(0, 1, 0),       // implementationVersion
         "layer: Swapchain",
@@ -45,7 +46,7 @@ static const VkLayerProperties globalLayerProps[] = {
 
 static const VkLayerProperties deviceLayerProps[] = {
     {
-        "Swapchain",
+        "VK_LAYER_LUNARG_swapchain",
         VK_API_VERSION,                 // specVersion
         VK_MAKE_VERSION(0, 1, 0),       // implementationVersion
         "layer: Swapchain",
index f05dbd2a7ff8f5116601ce61f6b718581127f984..0be89247564293fad7287c13d18e8da0894d44e1 100755 (executable)
@@ -313,10 +313,12 @@ class Subcommand(object):
             # Do nothing, extension definition part of generic.h
             ggep_body.append('%s' % self.lineinfo.get())
         else:
+            layer_name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', layer)
+            layer_name = re.sub('([a-z0-9])([A-Z])', r'\1_\2', layer_name).lower()
             ggep_body.append('%s' % self.lineinfo.get())
             ggep_body.append('static const VkLayerProperties globalLayerProps[] = {')
             ggep_body.append('    {')
-            ggep_body.append('        "%s",' % layer)
+            ggep_body.append('        "VK_LAYER_LUNARG_%s",' % layer_name)
             ggep_body.append('        VK_API_VERSION, // specVersion')
             ggep_body.append('        VK_MAKE_VERSION(0, 1, 0), // implementationVersion')
             ggep_body.append('        "layer: %s",' % layer)