MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / findMemoryType

Method findMemoryType

src/Renderer/vkRenderer.cpp:724–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722}
723
724uint32_t vkRenderer::findMemoryType(uint32_t typeFilter, VkMemoryPropertyFlags properties) {
725 VkPhysicalDeviceMemoryProperties memProperties;
726 vkGetPhysicalDeviceMemoryProperties(physicalDevice, &memProperties);
727
728 for (uint32_t i = 0; i < memProperties.memoryTypeCount; i++) {
729 if ((typeFilter & (1 << i)) && (memProperties.memoryTypes[i].propertyFlags & properties) == properties) {
730 return i;
731 }
732 }
733
734 throw std::runtime_error("failed to find suitable memory type!");
735}
736
737void vkRenderer::createCommandBuffers() {
738 commandBuffers.resize(swapChainFramebuffers.size());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected