| 101 | } |
| 102 | |
| 103 | bool Tr2SuballocatedBuffer::OnPrepareResources() |
| 104 | { |
| 105 | if( m_buffer.IsValid() ) |
| 106 | { |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | USE_MAIN_THREAD_RENDER_CONTEXT(); |
| 111 | |
| 112 | uint32_t bufferSize = static_cast<uint32_t>( m_allocator.GetCurrentSize() ); |
| 113 | |
| 114 | Tr2BufferAL buffer; |
| 115 | Tr2BufferDescriptionAL desc( 4, bufferSize / 4, m_gpuUsage, Tr2CpuUsage::READ | Tr2CpuUsage::WRITE ); |
| 116 | buffer.Create( desc, nullptr, renderContext ); |
| 117 | |
| 118 | m_buffer = buffer; |
| 119 | |
| 120 | return true; |
| 121 | } |
| 122 | |
| 123 | ALResult Tr2SuballocatedBuffer::Expand() |
| 124 | { |
nothing calls this directly
no test coverage detected