| 1554 | } |
| 1555 | |
| 1556 | static void PostDeleteTextures(NullContext* context, bool force_delete) |
| 1557 | { |
| 1558 | if (force_delete) |
| 1559 | { |
| 1560 | uint32_t size = context->m_SetTextureAsyncState.m_PostDeleteTextures.Size(); |
| 1561 | for (uint32_t i = 0; i < size; ++i) |
| 1562 | { |
| 1563 | void* texture = (void*) (size_t) context->m_SetTextureAsyncState.m_PostDeleteTextures[i]; |
| 1564 | DoDeleteTexture(context->m_JobContext, 0, context, texture); |
| 1565 | DoDeleteTextureComplete(context->m_JobContext, 0, JOBSYSTEM_STATUS_FINISHED, context, texture, 0); |
| 1566 | } |
| 1567 | context->m_SetTextureAsyncState.m_PostDeleteTextures.SetSize(0); |
| 1568 | return; |
| 1569 | } |
| 1570 | |
| 1571 | uint32_t i = 0; |
| 1572 | while(i < context->m_SetTextureAsyncState.m_PostDeleteTextures.Size()) |
| 1573 | { |
| 1574 | HTexture texture = context->m_SetTextureAsyncState.m_PostDeleteTextures[i]; |
| 1575 | if(!(dmGraphics::GetTextureStatusFlags((HContext) context, texture) & dmGraphics::TEXTURE_STATUS_DATA_PENDING)) |
| 1576 | { |
| 1577 | NullDeleteTextureAsync(context, texture); |
| 1578 | context->m_SetTextureAsyncState.m_PostDeleteTextures.EraseSwap(i); |
| 1579 | } |
| 1580 | else |
| 1581 | { |
| 1582 | ++i; |
| 1583 | } |
| 1584 | } |
| 1585 | } |
| 1586 | |
| 1587 | static void NullDeleteTexture(HContext _context, HTexture texture) |
| 1588 | { |
no test coverage detected