layers: Add checks&tests to Img-Buf copy - GH284
Added 16 VU checks for CmdCopyImageToBuffer and CmdCopyBufferToImage
Fixed 1 test in MiscImageLayerTests
Added 12 test in ImageBufferCopyTests
Individual commits:
GH284 add VUs 1240, 1241, 1258, 1259
GH284 add VUs 1238, 1244
GH284 add 1271 1272 1273 1274 1279 1281 1746 1747 remove 1238 1244 1262 1269
GH284 add 1227 1228 1245 1246
GH284 fix validation test MiscImageLayerTests for VU 1269/1747 swap
GH284 update database with new VU checks
GH284 redo VUs 1227 1246, move them into core validation
GH284 final checks and tests
GH284 fix a rebase merge error
GH284 fix uint64 format specifier that broke the Android build
Change-Id: I5b69eddab945fb09d4cf3645349fa45a61576355
diff --git a/layers/vk_layer_utils.h b/layers/vk_layer_utils.h
index 943f846..4151ffe 100644
--- a/layers/vk_layer_utils.h
+++ b/layers/vk_layer_utils.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2015-2016 The Khronos Group Inc.
- * Copyright (c) 2015-2016 Valve Corporation
- * Copyright (c) 2015-2016 LunarG, Inc.
+/* Copyright (c) 2015-2017 The Khronos Group Inc.
+ * Copyright (c) 2015-2017 Valve Corporation
+ * Copyright (c) 2015-2017 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
*
* Author: Mark Lobodzinski <mark@lunarg.com>
* Author: Courtney Goeltzenleuchter <courtney@LunarG.com>
+ * Author: Dave Houlton <daveh@lunarg.com>
*/
#pragma once
@@ -104,6 +105,14 @@
return !(vk_format_is_undef(format) || vk_format_is_depth_or_stencil(format));
}
+static inline bool vk_format_has_depth(VkFormat format) {
+ return (vk_format_is_depth_only(format) || vk_format_is_depth_and_stencil(format));
+}
+
+static inline bool vk_format_has_stencil(VkFormat format) {
+ return (vk_format_is_stencil_only(format) || vk_format_is_depth_and_stencil(format));
+}
+
VK_LAYER_EXPORT bool vk_format_is_norm(VkFormat format);
VK_LAYER_EXPORT bool vk_format_is_int(VkFormat format);
VK_LAYER_EXPORT bool vk_format_is_sint(VkFormat format);