LiquidVR icon indicating copy to clipboard operation
LiquidVR copied to clipboard

VulcanRenderer.cpp bug

Open gigadude opened this issue 8 years ago • 0 comments

In VulcanRenderer.cpp MakeBuffer:

    uint32_t memType = -1;
    for (uint32_t i = 0; i < memProps.memoryTypeCount; i++)
    {
        if (memProps.memoryTypes[i].propertyFlags & (VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT))
        {
            if ((memProps.memoryTypes[i].propertyFlags & memReqs.memoryTypeBits))
            {
	        memType = i;
	        break;
            }
        }
    }

should be:

    uint32_t memType = -1;
    for (uint32_t i = 0; i < memProps.memoryTypeCount; i++)
    {
        if (memReqs.memoryTypeBits & (1 << i))
        {
            if ((memProps.memoryTypes[i].propertyFlags & props) == props)
            {
	        memType = i;
	        break;
            }
        }
    }

gigadude avatar Apr 01 '17 19:04 gigadude