Rename backend::d3d12::ResourceUploader::UploadToBuffer to BufferSubData

This commit is contained in:
Austin Eng 2017-06-28 11:03:59 -04:00 committed by Austin Eng
parent 5e03aec75a
commit 6103c62489
3 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ namespace d3d12 {
} }
void Buffer::SetSubDataImpl(uint32_t start, uint32_t count, const uint32_t* data) { 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) { void Buffer::MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) {

View File

@ -23,7 +23,7 @@ namespace d3d12 {
ResourceUploader::ResourceUploader(Device* device) : device(device) { 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. // 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. // 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); UploadHandle uploadHandle = GetUploadBuffer(count);

View File

@ -28,7 +28,7 @@ namespace d3d12 {
public: public:
ResourceUploader(Device* device); 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: private:
struct UploadHandle { struct UploadHandle {