aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-05-13 16:52:41 -0700
committerJason Ekstrand <[email protected]>2016-05-17 12:17:22 -0700
commitc87429c5f1d31d8a95e1173c432775001f8b38a0 (patch)
tree6e0b2cb053b70d366349e30095ed312eaba2c5c1
parent990a7420b6cd6408fb13aa84d9b2a159a11eafc4 (diff)
anv/image: Stop using anv_format for image create validation
-rw-r--r--src/intel/vulkan/anv_image.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 84e11c2a284..2f045f210d0 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -332,7 +332,6 @@ anv_validate_CreateImageView(VkDevice _device,
{
ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
const VkImageSubresourceRange *subresource;
- MAYBE_UNUSED const struct anv_format *view_format_info;
/* Validate structure type before dereferencing it. */
assert(pCreateInfo);
@@ -346,7 +345,6 @@ anv_validate_CreateImageView(VkDevice _device,
/* Validate format is in range before using it. */
assert(pCreateInfo->format >= VK_FORMAT_BEGIN_RANGE);
assert(pCreateInfo->format <= VK_FORMAT_END_RANGE);
- view_format_info = anv_format_for_vk_format(pCreateInfo->format);
/* Validate channel swizzles. */
assert(pCreateInfo->components.r >= VK_COMPONENT_SWIZZLE_BEGIN_RANGE);
@@ -379,16 +377,14 @@ anv_validate_CreateImageView(VkDevice _device,
assert(subresource->aspectMask == VK_IMAGE_ASPECT_COLOR_BIT);
assert(image->aspects == VK_IMAGE_ASPECT_COLOR_BIT);
assert(view_format_aspects == VK_IMAGE_ASPECT_COLOR_BIT);
- assert(view_format_info->isl_layout->bs ==
- image->format->isl_layout->bs);
} else if (subresource->aspectMask & ds_flags) {
assert((subresource->aspectMask & ~ds_flags) == 0);
+ assert(pCreateInfo->format == image->vk_format);
+
if (subresource->aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) {
assert(image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT);
assert(view_format_aspects & VK_IMAGE_ASPECT_DEPTH_BIT);
- assert(view_format_info->isl_layout->bs ==
- image->format->isl_layout->bs);
}
if (subresource->aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) {