diff options
author | Chad Versace <[email protected]> | 2015-12-02 18:27:35 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-12-03 15:29:52 -0800 |
commit | 594e673fcc777ed8d8579db75a920aa35af048be (patch) | |
tree | c37c33a74293312909a17cbfef4cdee8e8ebbf7f /src/vulkan | |
parent | b36938964063a4072abfd779f5607743dbc3b6f1 (diff) |
anv/image: Drop assertions on SURFTYPE extent limits
In anv_image_create(), stop asserting that VkImageCreateInfo::extent
does not exceed the hardware limits for the given SURFTYPE. The
assertions were incorrect because they did not take into account the
hardware gen. Anyways, these types of assertions belong in isl, not
anvil.
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/anv_image.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index 2bfe19f3609..69103209022 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -71,19 +71,6 @@ anv_image_view_info_for_vk_image_view_type(VkImageViewType type) return anv_image_view_info_table[type]; } -static const struct anv_surf_type_limits { - int32_t width; - int32_t height; - int32_t depth; -} anv_surf_type_limits[] = { - [SURFTYPE_1D] = {16384, 1, 2048}, - [SURFTYPE_2D] = {16384, 16384, 2048}, - [SURFTYPE_3D] = {2048, 2048, 2048}, - [SURFTYPE_CUBE] = {16384, 16384, 340}, - [SURFTYPE_BUFFER] = {128, 16384, 64}, - [SURFTYPE_STRBUF] = {128, 16384, 64}, -}; - static isl_tiling_flags_t choose_isl_tiling_flags(const struct anv_image_create_info *anv_info) { @@ -228,7 +215,6 @@ anv_image_create(VkDevice _device, { ANV_FROM_HANDLE(anv_device, device, _device); const VkImageCreateInfo *pCreateInfo = create_info->vk_info; - const VkExtent3D *restrict extent = &pCreateInfo->extent; struct anv_image *image = NULL; VkResult r; @@ -245,14 +231,6 @@ anv_image_create(VkDevice _device, const uint8_t surf_type = anv_surf_type_from_image_type[pCreateInfo->imageType]; - const struct anv_surf_type_limits *limits = - &anv_surf_type_limits[surf_type]; - - /* Errors should be caught by VkImageFormatProperties. */ - assert(extent->width <= limits->width); - assert(extent->height <= limits->height); - assert(extent->depth <= limits->depth); - image = anv_alloc2(&device->alloc, alloc, sizeof(*image), 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (!image) |