device(d)
{ }
-TransferQueue::PendingTransfer &TransferQueue::prepare_transfer(void *object, bool ordered, size_t size)
+TransferQueue::PendingTransfer &TransferQueue::prepare_transfer(const void *object, bool ordered, size_t size)
{
unsigned &order = next_orders[object];
order += !order;
std::size_t default_buffer_size = 16*1048576;
std::vector<StagingBuffer> buffers;
std::vector<PendingTransfer> transfers;
- std::map<void *, unsigned> next_orders;
+ std::map<const void *, unsigned> next_orders;
public:
TransferQueue(Device &);
template<typename S, typename T>
- void *prepare_transfer(void *, bool, std::size_t, S &&, T &&);
+ void *prepare_transfer(const void *, bool, std::size_t, S &&, T &&);
private:
- PendingTransfer &prepare_transfer(void *, bool, std::size_t);
+ PendingTransfer &prepare_transfer(const void *, bool, std::size_t);
public:
void dispatch_transfers(VkCommandBuffer);
};
template<typename S, typename T>
-void *TransferQueue::prepare_transfer(void *object, bool ordered, std::size_t size, S &&synchronize, T &&transfer)
+void *TransferQueue::prepare_transfer(const void *object, bool ordered, std::size_t size, S &&synchronize, T &&transfer)
{
PendingTransfer &pt = prepare_transfer(object, ordered, size);
pt.synchronize = std::forward<S>(synchronize);