| 95 | } |
| 96 | |
| 97 | bool TextureVk::GetMemoryType(uint32_t typeBits, VkFlags requirements_mask, uint32_t* typeIndex) |
| 98 | { |
| 99 | // Search memtypes to find first index with those properties |
| 100 | for (uint32_t i = 0; i < m_memoryProperties.memoryTypeCount; i++) { |
| 101 | if ((typeBits & 1) == 1) { |
| 102 | // Type is available, does it match user properties? |
| 103 | if ((m_memoryProperties.memoryTypes[i].propertyFlags & requirements_mask) == requirements_mask) { |
| 104 | *typeIndex = i; |
| 105 | return true; |
| 106 | } |
| 107 | } |
| 108 | typeBits >>= 1; |
| 109 | } |
| 110 | // No memory types matched, return failure |
| 111 | return false; |
| 112 | } |
| 113 | |
| 114 | bool TextureVk::Init(ovrTextureType Type, int Width, int Height, int MipLevels, int SampleCount, |
| 115 | int ArraySize, ovrTextureFormat Format, unsigned int MiscFlags, unsigned int BindFlags) |
nothing calls this directly
no outgoing calls
no test coverage detected