Remove usage of magma_buffer_get_id
Bug: 121902
Change-Id: I87377951817f8ab9614c01514e2d89b02848b38e
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/github.com/ARM-software/HWCPipe/+/807567
Reviewed-by: Craig Stout <cstout@google.com>
diff --git a/vendor/arm/mali/mali_profiler_magma.cpp b/vendor/arm/mali/mali_profiler_magma.cpp
index d3d56f8..52aed9d 100644
--- a/vendor/arm/mali/mali_profiler_magma.cpp
+++ b/vendor/arm/mali/mali_profiler_magma.cpp
@@ -332,7 +332,7 @@
// At the moment we only ever should have 1 read outstanding, so only create one buffer.
constexpr uint32_t kBufferSize = 4096;
- status = magma_connection_create_buffer(connection_, kBufferSize, &buffer_size, &buffer_);
+ status = magma_connection_create_buffer2(connection_, kBufferSize, &buffer_size, &buffer_, &buffer_id_);
if (status != MAGMA_STATUS_OK)
{
throw std::runtime_error("Create buffer failed.");
@@ -345,7 +345,7 @@
throw std::runtime_error("Create performance counter buffer pool failed.");
}
magma_buffer_offset offset;
- offset.buffer_id = magma_buffer_get_id(buffer_);
+ offset.buffer_id = buffer_id_;
offset.offset = 0;
offset.length = 4096;
status = magma_connection_add_performance_counter_buffer_offsets_to_pool(connection_, pool_, &offset, 1);
@@ -521,7 +521,7 @@
timestamp_ = time;
magma_buffer_offset offset;
- offset.buffer_id = magma_buffer_get_id(buffer_);
+ offset.buffer_id = buffer_id_;
offset.offset = 0;
offset.length = 4096;
status = magma_connection_add_performance_counter_buffer_offsets_to_pool(connection_, pool_, &offset, 1);
diff --git a/vendor/arm/mali/mali_profiler_magma.h b/vendor/arm/mali/mali_profiler_magma.h
index fc1f70b..a978203 100644
--- a/vendor/arm/mali/mali_profiler_magma.h
+++ b/vendor/arm/mali/mali_profiler_magma.h
@@ -108,6 +108,7 @@
int gpu_id_{0};
size_t buffer_size_{0};
magma_buffer_t buffer_ = 0;
+ magma_buffer_id_t buffer_id_ = 0;
uint64_t timestamp_{0};
const char *const *names_lut_{
nullptr};