icd/api/vk_memory.cpp
void Memory::ElevatePriority(
    MemoryPriority priority)
{
    // Update PAL memory object's priority using a double-checked lock if the current priority is lower than
    // the new given priority.
    if (m_priority < priority)
    {
        Util::MutexAuto lock(m_pDevice->GetMemoryMutex());

        if (m_priority < priority)
        {
            for (uint32_t deviceIdx = 0; deviceIdx < m_pDevice->NumPalDevices(); deviceIdx++)
            {
                if ((PalMemory(deviceIdx) != nullptr) &&
                    (PalMemory(deviceIdx)->SetPriority(priority.PalPriority(), priority.PalOffset()) ==
                        Pal::Result::Success))
                {
                    m_priority = priority;
                }
            }
        }
    }
}
// =====================================================================================================================
// This function increases the priority of this memory's allocation to be at least that of the given priority.  This
// function may be called e.g. when this memory is bound to a high-priority VkImage.
This function increases the priority of this memory's allocation to be at least that of the given priority.  This
function may be called e.g. when this memory is bound to a high-priority VkImage.
This function increases the priority of this memory ' s allocation to be at least that of the given priority . This function may be called e . g . when this memory is bound to a high - priority VkImage .
void Memory::ElevatePriority(
    MemoryPriority priority)
{
    if (m_priority < priority)
    {
        Util::MutexAuto lock(m_pDevice->GetMemoryMutex());
        if (m_priority < priority)
        {
            for (uint32_t deviceIdx = 0; deviceIdx < m_pDevice->NumPalDevices(); deviceIdx++)
            {
                if ((PalMemory(deviceIdx) != nullptr) &&
                    (PalMemory(deviceIdx)->SetPriority(priority.PalPriority(), priority.PalOffset()) ==
                        Pal::Result::Success))
                {
                    m_priority = priority;
                }
            }
        }
    }
}
void Memory :: ElevatePriority ( MemoryPriority priority ) { if ( m_priority < priority ) { Util :: MutexAuto lock ( m_pDevice -> GetMemoryMutex ( ) ) ; if ( m_priority < priority ) { for ( uint32_t deviceIdx = 0 ; deviceIdx < m_pDevice -> NumPalDevices ( ) ; deviceIdx ++ ) { if ( ( PalMemory ( deviceIdx ) != nullptr ) && ( PalMemory ( deviceIdx ) -> SetPriority ( priority . PalPriority ( ) , priority . PalOffset ( ) ) == Pal :: Result :: Success ) ) { m_priority = priority ; } } } } }
This function increases the priority of this memory's allocation to be at least that of the given priority.
This function increases the priority of this memory ' s allocation to be at least that of the given priority .
// Update PAL memory object's priority using a double-checked lock if the current priority is lower than // the new given priority.