Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

127 Neutral

About Mete

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. There are a couple of different ways to load mipmapped textures in Vulkan. I use this way: create a buffer that is big enough to contain all mipmap levels bind it to pre-allocated scratch memory that is VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT copy the mipmaps into the buffer using vkMapMemory, memcpy, vkUnmapMemory create an image with VK_IMAGE_TILING_OPTIMAL and bind it to VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT memory use vkCmdCopyBufferToImage with VkBufferImageCopy entries for each mipmap that contain the offset into the buffer to point to the mip data. Also make sure to use vkGetBufferMemoryRequirements and vkGetImageMemoryRequirements. The scratch host visible memory size is 6mb, which is enough for most textures and all the device local textures go into one huge memory.   This works well for mipmapped textures and also mipmapped cube maps.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!