MCPcopy Create free account
hub / github.com/LibreVR/Revive / GetMemoryType

Method GetMemoryType

Revive/TextureVk.cpp:97–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool 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
114bool TextureVk::Init(ovrTextureType Type, int Width, int Height, int MipLevels, int SampleCount,
115 int ArraySize, ovrTextureFormat Format, unsigned int MiscFlags, unsigned int BindFlags)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected