Rename backend::d3d12::ResourceUploader::UploadToBuffer to BufferSubData
This commit is contained in:
parent
5e03aec75a
commit
6103c62489
|
@ -100,7 +100,7 @@ namespace d3d12 {
|
|||
}
|
||||
|
||||
void Buffer::SetSubDataImpl(uint32_t start, uint32_t count, const uint32_t* data) {
|
||||
device->GetResourceUploader()->UploadToBuffer(resource, start * sizeof(uint32_t), count * sizeof(uint32_t), reinterpret_cast<const uint8_t*>(data));
|
||||
device->GetResourceUploader()->BufferSubData(resource, start * sizeof(uint32_t), count * sizeof(uint32_t), data);
|
||||
}
|
||||
|
||||
void Buffer::MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) {
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace d3d12 {
|
|||
ResourceUploader::ResourceUploader(Device* device) : device(device) {
|
||||
}
|
||||
|
||||
void ResourceUploader::UploadToBuffer(ComPtr<ID3D12Resource> resource, uint32_t start, uint32_t count, const uint8_t* data) {
|
||||
void ResourceUploader::BufferSubData(ComPtr<ID3D12Resource> resource, uint32_t start, uint32_t count, const void* data) {
|
||||
// TODO(enga@google.com): Use a handle to a subset of a large ring buffer. On Release, decrease reference count on the ring buffer and free when 0.
|
||||
// Alternatively, the SerialQueue could be used to track which last point of the ringbuffer is in use, and start reusing chunks of it that aren't in flight.
|
||||
UploadHandle uploadHandle = GetUploadBuffer(count);
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace d3d12 {
|
|||
public:
|
||||
ResourceUploader(Device* device);
|
||||
|
||||
void UploadToBuffer(ComPtr<ID3D12Resource> resource, uint32_t start, uint32_t count, const uint8_t* data);
|
||||
void BufferSubData(ComPtr<ID3D12Resource> resource, uint32_t start, uint32_t count, const void* data);
|
||||
|
||||
private:
|
||||
struct UploadHandle {
|
||||
|
|
Loading…
Reference in New Issue