aboutsummaryrefslogtreecommitdiff
path: root/src/vulkan/graphics_pipeline.cc
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2019-03-22 09:40:20 -0700
committerGitHub <noreply@github.com>2019-03-22 09:40:20 -0700
commite1a291206683118d5324f5d671f13d29aae60aa5 (patch)
treef807aacb6964e948b40b7b8a8a8083b9be996098 /src/vulkan/graphics_pipeline.cc
parentb783263992229f5c7d8b422beec09cdd4b02b31a (diff)
downloadamber-e1a291206683118d5324f5d671f13d29aae60aa5.tar.gz
Convert buffer data earlier (#394)
This CL removes the data_ pointer in the amber::Buffer object. The data is transferred into the values_ list as early as possible.
Diffstat (limited to 'src/vulkan/graphics_pipeline.cc')
-rw-r--r--src/vulkan/graphics_pipeline.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vulkan/graphics_pipeline.cc b/src/vulkan/graphics_pipeline.cc
index 9b2d1cc..c7f64e4 100644
--- a/src/vulkan/graphics_pipeline.cc
+++ b/src/vulkan/graphics_pipeline.cc
@@ -713,7 +713,7 @@ Result GraphicsPipeline::SendVertexBufferDataIfNeeded(
return vertex_buffer->SendVertexData(command_.get(), memory_properties_);
}
-Result GraphicsPipeline::SetIndexBuffer(const std::vector<Value>& values) {
+Result GraphicsPipeline::SetIndexBuffer(Buffer* buffer) {
if (index_buffer_) {
return Result(
"GraphicsPipeline::SetIndexBuffer must be called once when "
@@ -727,7 +727,7 @@ Result GraphicsPipeline::SetIndexBuffer(const std::vector<Value>& values) {
return guard.GetResult();
Result r =
- index_buffer_->SendIndexData(command_.get(), memory_properties_, values);
+ index_buffer_->SendIndexData(command_.get(), memory_properties_, buffer);
if (!r.IsSuccess())
return r;