layers: Adds createSampler VUID/test for IMG_CUBIC

Added VUID check to parameter_validation_layer and matching test for
VUID 12600872 (must disable anisotropy for CUBIC_IMG filters)

Change-Id: I3d0f9449413637292c2726480ca7ce0e6b793e21
diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp
index 959f344..24a6f41 100644
--- a/layers/parameter_validation_utils.cpp
+++ b/layers/parameter_validation_utils.cpp
@@ -1539,6 +1539,19 @@
                         "but the VK_KHR_sampler_mirror_clamp_to_edge extension has not been enabled. %s",
                         validation_error_map[VALIDATION_ERROR_1260086e]);
         }
+
+        // Checks for the IMG cubic filtering extension
+        if (device_data->extensions.vk_img_filter_cubic) {
+            if ((pCreateInfo->anisotropyEnable == VK_TRUE) &&
+                ((pCreateInfo->minFilter == VK_FILTER_CUBIC_IMG) || (pCreateInfo->magFilter == VK_FILTER_CUBIC_IMG))) {
+                skip |=
+                    log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
+                            VALIDATION_ERROR_12600872, LayerName,
+                            "vkCreateSampler(): Anisotropic sampling must not be VK_TRUE when either minFilter or magFilter are "
+                            "VK_FILTER_CUBIC_IMG. %s",
+                            validation_error_map[VALIDATION_ERROR_12600872]);
+            }
+        }
     }
 
     return skip;