diff options
Diffstat (limited to 'src/vulkan/image.c')
-rw-r--r-- | src/vulkan/image.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/vulkan/image.c b/src/vulkan/image.c index 40d5024a0eb..b385be48917 100644 --- a/src/vulkan/image.c +++ b/src/vulkan/image.c @@ -108,6 +108,13 @@ VkResult anv_image_create( if (image == NULL) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); + /* XXX: We don't handle any of these */ + anv_assert(pCreateInfo->imageType == VK_IMAGE_TYPE_2D); + anv_assert(pCreateInfo->mipLevels == 1); + anv_assert(pCreateInfo->arraySize == 1); + anv_assert(pCreateInfo->samples == 1); + anv_assert(pCreateInfo->extent.depth == 1); + image->bo = NULL; image->offset = 0; image->type = pCreateInfo->imageType; @@ -204,6 +211,13 @@ anv_image_view_init(struct anv_surface_view *view, anv_format_for_vk_format(pCreateInfo->format); uint32_t tile_mode, format; + /* XXX: We don't handle any of these */ + anv_assert(pCreateInfo->viewType == VK_IMAGE_VIEW_TYPE_2D); + anv_assert(pCreateInfo->subresourceRange.baseMipLevel == 0); + anv_assert(pCreateInfo->subresourceRange.mipLevels == 1); + anv_assert(pCreateInfo->subresourceRange.baseArraySlice == 0); + anv_assert(pCreateInfo->subresourceRange.arraySize == 1); + view->bo = image->bo; switch (pCreateInfo->subresourceRange.aspect) { case VK_IMAGE_ASPECT_STENCIL: @@ -316,6 +330,12 @@ anv_color_attachment_view_init(struct anv_surface_view *view, const struct anv_format *format = anv_format_for_vk_format(pCreateInfo->format); + /* XXX: We don't handle any of these */ + anv_assert(pCreateInfo->mipLevel == 0); + anv_assert(pCreateInfo->baseArraySlice == 0); + anv_assert(pCreateInfo->arraySize == 1); + anv_assert(pCreateInfo->msaaResolveImage == 0); + view->bo = image->bo; view->offset = image->offset; view->extent = image->extent; @@ -410,6 +430,12 @@ VkResult anv_CreateDepthStencilView( if (view == NULL) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); + /* XXX: We don't handle any of these */ + anv_assert(pCreateInfo->mipLevel == 0); + anv_assert(pCreateInfo->baseArraySlice == 0); + anv_assert(pCreateInfo->arraySize == 1); + anv_assert(pCreateInfo->msaaResolveImage == 0); + view->bo = image->bo; view->depth_stride = image->stride; |