tests: Fix VkLayerTest on Intel Mesa 17.0.3
authorMark Young <marky@lunarg.com>
Fri, 7 Apr 2017 14:59:56 +0000 (08:59 -0600)
committerMark Young <marky@lunarg.com>
Fri, 7 Apr 2017 16:05:34 +0000 (10:05 -0600)
VkLayerTest portion of layer_validation_tests was seg faulting
because we attempted to create depth surfaces without suggesting
they be optimal tiling.

Change-Id: I2122084be0ca0aceb4e85b77278b19c111823d88

tests/layer_validation_tests.cpp

index 6a94648..50f256f 100644 (file)
@@ -17118,7 +17118,7 @@ TEST_F(VkLayerTest, CopyImageDepthStencilFormatMismatch) {
     image_create_info.mipLevels = 1;
     image_create_info.arrayLayers = 1;
     image_create_info.samples = VK_SAMPLE_COUNT_1_BIT;
-    image_create_info.tiling = VK_IMAGE_TILING_LINEAR;
+    image_create_info.tiling = VK_IMAGE_TILING_OPTIMAL;
     image_create_info.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
     image_create_info.flags = 0;
     VkFormatProperties properties;
@@ -17300,7 +17300,8 @@ TEST_F(VkLayerTest, CopyImageAspectMismatch) {
     }
     VkImageObj color_image(m_device), ds_image(m_device), depth_image(m_device);
     color_image.Init(128, 128, 1, VK_FORMAT_R32_SFLOAT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT);
-    depth_image.Init(128, 128, 1, VK_FORMAT_D32_SFLOAT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT);
+    depth_image.Init(128, 128, 1, VK_FORMAT_D32_SFLOAT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT,
+                  VK_IMAGE_TILING_OPTIMAL, 0);
     ds_image.Init(128, 128, 1, ds_format, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT,
                   VK_IMAGE_TILING_OPTIMAL, 0);
     ASSERT_TRUE(color_image.initialized());