GPUOpen-LibrariesAndSDKs / LiquidVR

The LiquidVR™ SDK is a platform based on DirectX 11 designed to simplify and optimize VR development
MIT License
105 stars 34 forks source link

VulcanRenderer.cpp bug #7

Open gigadude opened 7 years ago

gigadude commented 7 years ago

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;
            }
        }
    }