layers: Add textureCompressionBC feature check

Change-Id: I4eca8c73a1cc2549402b436f8634fa9e72b9b9ce
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp
index 76c69cd..3ff9659 100644
--- a/layers/parameter_validation.cpp
+++ b/layers/parameter_validation.cpp
@@ -2561,6 +2561,15 @@
                         string_VkFormat(pCreateInfo->format));
         }
 
+        if ((device_data->physical_device_features.textureCompressionBC == false) &&
+            vk_format_is_compressed_BC(pCreateInfo->format)) {
+            skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
+                            DEVICE_FEATURE, LayerName,
+                            "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionBC feature is "
+                            "not enabled: BC compressed formats cannot be used to create images.",
+                            string_VkFormat(pCreateInfo->format));
+        }
+
         // Validation for parameters excluded from the generated validation code due to a 'noautovalidity' tag in vk.xml
         if (pCreateInfo->sharingMode == VK_SHARING_MODE_CONCURRENT) {
             // If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1