From c68df9cd7c308ea5484b3309e99bd5ad933943c8 Mon Sep 17 00:00:00 2001 From: Michael Lentine Date: Fri, 11 Dec 2015 10:49:51 -0800 Subject: layers: MR89, Fix gtests for android Conflicts: layers/draw_state.cpp layers/image.cpp layers/mem_tracker.cpp --- buildAndroid/jni/Android.mk | 12 ++++++++++++ buildAndroid/jni/Application.mk | 2 +- layers/apidump.h | 4 ++-- layers/basic.cpp | 2 +- layers/device_limits.cpp | 5 +++-- layers/draw_state.cpp | 2 +- layers/generic.h | 5 +++-- layers/image.cpp | 5 +++-- layers/mem_tracker.cpp | 2 +- layers/swapchain.h | 5 +++-- vk-layer-generate.py | 4 +++- 11 files changed, 33 insertions(+), 15 deletions(-) diff --git a/buildAndroid/jni/Android.mk b/buildAndroid/jni/Android.mk index 167509d2..f8d93713 100644 --- a/buildAndroid/jni/Android.mk +++ b/buildAndroid/jni/Android.mk @@ -62,6 +62,18 @@ LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR LOCAL_LDLIBS := -llog include $(BUILD_SHARED_LIBRARY) +include $(CLEAR_VARS) +LOCAL_MODULE := VKLayerDeviceLimits +LOCAL_SRC_FILES += $(SRC_DIR)/layers/device_limits.cpp +LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_debug_marker_table.cpp +LOCAL_C_INCLUDES += $(SRC_DIR)/include \ + $(SRC_DIR)/buildAndroid/generated \ + $(SRC_DIR)/loader +LOCAL_STATIC_LIBRARIES += layer_utils +LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR +LOCAL_LDLIBS := -llog +include $(BUILD_SHARED_LIBRARY) + include $(CLEAR_VARS) LOCAL_MODULE := VKLayerImage LOCAL_SRC_FILES += $(SRC_DIR)/layers/image.cpp diff --git a/buildAndroid/jni/Application.mk b/buildAndroid/jni/Application.mk index d89707fe..f5aa22cb 100644 --- a/buildAndroid/jni/Application.mk +++ b/buildAndroid/jni/Application.mk @@ -15,6 +15,6 @@ APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 mips mips64 APP_PLATFORM := android-22 APP_STL := gnustl_static -APP_MODULES := layer_utils VKLayerBasic VKLayerDrawState VKLayerMemTracker VKLayerImage VKLayerParamChecker VKLayerGeneric VKLayerAPIDump VKLayerObjectTracker VKLayerThreading VKLayerValidationTests +APP_MODULES := layer_utils VKLayerBasic VKLayerDrawState VKLayerMemTracker VKLayerDeviceLimits VKLayerImage VKLayerParamChecker VKLayerGeneric VKLayerAPIDump VKLayerObjectTracker VKLayerThreading VKLayerValidationTests APP_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES NDK_TOOLCHAIN_VERSION := 4.8 diff --git a/layers/apidump.h b/layers/apidump.h index fb13170b..ce49431d 100644 --- a/layers/apidump.h +++ b/layers/apidump.h @@ -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", diff --git a/layers/basic.cpp b/layers/basic.cpp index 3c3c809c..1e054759 100644 --- a/layers/basic.cpp +++ b/layers/basic.cpp @@ -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", diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index e89dd668..f6bbacef 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -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", diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index a4385ed2..fc42886d 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -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", diff --git a/layers/generic.h b/layers/generic.h index 6b5fc075..955ea7d6 100644 --- a/layers/generic.h +++ b/layers/generic.h @@ -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", diff --git a/layers/image.cpp b/layers/image.cpp index cf7d6302..a3acbc88 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -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", } }; diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp index 538d89aa..d3e9a92a 100644 --- a/layers/mem_tracker.cpp +++ b/layers/mem_tracker.cpp @@ -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", diff --git a/layers/swapchain.h b/layers/swapchain.h index d1896d79..21585d9b 100644 --- a/layers/swapchain.h +++ b/layers/swapchain.h @@ -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", diff --git a/vk-layer-generate.py b/vk-layer-generate.py index f05dbd2a..0be89247 100755 --- a/vk-layer-generate.py +++ b/vk-layer-generate.py @@ -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) -- cgit v1.2.3