MCPcopy Create free account
hub / github.com/alibaba/MNN / createImageView

Method createImageView

source/backend/vulkan/component/VulkanDevice.cpp:468–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468const VkResult VulkanDevice::createImageView(VkImageView& view, const VkImage& image, const VkImageViewType& viewType,
469 const VkFormat& format, const VkAllocationCallbacks* allocator) const {
470 VkImageViewCreateInfo info = {};
471 info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
472 info.image = image;
473 info.viewType = viewType;
474 info.format = format;
475 info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
476 info.subresourceRange.baseMipLevel = 0;
477 info.subresourceRange.levelCount = 1;
478 info.subresourceRange.baseArrayLayer = 0;
479 info.subresourceRange.layerCount = 1;
480
481 return vkCreateImageView(mDevice, &info, allocator, &view);
482}
483
484const void VulkanDevice::destroyImageView(const VkImageView& imageView, const VkAllocationCallbacks* allocator) const {
485 vkDestroyImageView(mDevice, imageView, allocator);

Callers 1

VulkanImageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected