| 332 | } |
| 333 | |
| 334 | void* Buffer::map() const |
| 335 | { |
| 336 | FALCOR_CHECK( |
| 337 | mMemoryType == MemoryType::Upload || mMemoryType == MemoryType::ReadBack, |
| 338 | "Trying to map a buffer that wasn't created with the upload or readback flags." |
| 339 | ); |
| 340 | |
| 341 | if (!mMappedPtr) |
| 342 | FALCOR_GFX_CALL(mGfxBufferResource->map(nullptr, &mMappedPtr)); |
| 343 | |
| 344 | return mMappedPtr; |
| 345 | } |
| 346 | |
| 347 | void Buffer::unmap() const |
| 348 | { |
no outgoing calls