aboutsummaryrefslogtreecommitdiff
path: root/layers/buffer_validation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/buffer_validation.cpp')
-rw-r--r--layers/buffer_validation.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp
index bf897260..355eba8e 100644
--- a/layers/buffer_validation.cpp
+++ b/layers/buffer_validation.cpp
@@ -675,6 +675,14 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo
validation_error_map[VALIDATION_ERROR_02143]);
}
+ if ((pCreateInfo->flags & VK_IMAGE_CREATE_SPARSE_ALIASED_BIT) && (!GetEnabledFeatures(device_data)->sparseResidencyAliased)) {
+ skip_call |=
+ log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
+ DRAWSTATE_INVALID_FEATURE, "DS",
+ "vkCreateImage(): the sparseResidencyAliased device feature is disabled: Images cannot be created with the "
+ "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT set.");
+ }
+
return skip_call;
}
@@ -2198,6 +2206,14 @@ bool PreCallValidateCreateBuffer(layer_data *device_data, const VkBufferCreateIn
"vkCreateBuffer(): the sparseResidencyBuffer device feature is disabled: Buffers cannot be created with the "
"VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set.");
}
+
+ if ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_ALIASED_BIT) && (!GetEnabledFeatures(device_data)->sparseResidencyAliased)) {
+ skip |=
+ log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__,
+ DRAWSTATE_INVALID_FEATURE, "DS",
+ "vkCreateBuffer(): the sparseResidencyAliased device feature is disabled: Buffers cannot be created with the "
+ "VK_BUFFER_CREATE_SPARSE_ALIASED_BIT set.");
+ }
return skip;
}