aboutsummaryrefslogtreecommitdiff
path: root/layers/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/image.cpp')
-rw-r--r--layers/image.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/layers/image.cpp b/layers/image.cpp
index 4fe04d23..31a28e20 100644
--- a/layers/image.cpp
+++ b/layers/image.cpp
@@ -344,44 +344,6 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V
}
}
-VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource,
- VkSubresourceLayout *pLayout) {
- bool skipCall = false;
- layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
- VkFormat format;
-
- auto imageEntry = getImageState(device_data, image);
-
- // Validate that image aspects match formats
- if (imageEntry) {
- format = imageEntry->format;
- if (vk_format_is_color(format)) {
- if (pSubresource->aspectMask != VK_IMAGE_ASPECT_COLOR_BIT) {
- std::stringstream ss;
- ss << "vkGetImageSubresourceLayout: For color formats, the aspectMask field of VkImageSubresource must be "
- "VK_IMAGE_ASPECT_COLOR.";
- skipCall |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
- (uint64_t)image, __LINE__, VALIDATION_ERROR_00741, "IMAGE", "%s. %s", ss.str().c_str(),
- validation_error_map[VALIDATION_ERROR_00741]);
- }
- } else if (vk_format_is_depth_or_stencil(format)) {
- if ((pSubresource->aspectMask != VK_IMAGE_ASPECT_DEPTH_BIT) &&
- (pSubresource->aspectMask != VK_IMAGE_ASPECT_STENCIL_BIT)) {
- std::stringstream ss;
- ss << "vkGetImageSubresourceLayout: For depth/stencil formats, the aspectMask selects either the depth or stencil "
- "image aspectMask.";
- skipCall |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
- (uint64_t)image, __LINE__, VALIDATION_ERROR_00741, "IMAGE", "%s. %s", ss.str().c_str(),
- validation_error_map[VALIDATION_ERROR_00741]);
- }
- }
- }
-
- if (!skipCall) {
- device_data->device_dispatch_table->GetImageSubresourceLayout(device, image, pSubresource, pLayout);
- }
-}
-
VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties) {
layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map);
phy_dev_data->instance_dispatch_table->GetPhysicalDeviceProperties(physicalDevice, pProperties);
@@ -496,7 +458,6 @@ static PFN_vkVoidFunction intercept_core_device_command(const char *name) {
{"vkDestroyImage", reinterpret_cast<PFN_vkVoidFunction>(DestroyImage)},
{"vkCmdCopyImageToBuffer", reinterpret_cast<PFN_vkVoidFunction>(CmdCopyImageToBuffer)},
{"vkCmdCopyBufferToImage", reinterpret_cast<PFN_vkVoidFunction>(CmdCopyBufferToImage)},
- {"vkGetImageSubresourceLayout", reinterpret_cast<PFN_vkVoidFunction>(GetImageSubresourceLayout)},
};
for (size_t i = 0; i < ARRAY_SIZE(core_device_commands); i++) {