Mesa (main): v3d/simulator: hw mem is now an v3d_size_t, typedef to uint32_t

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 7 22:04:55 UTC 2021


Module: Mesa
Branch: main
Commit: 646a8338b19182a73c0fb31a5e4bb845bf611f2e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=646a8338b19182a73c0fb31a5e4bb845bf611f2e

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Fri Apr 23 12:12:49 2021 +0200

v3d/simulator: hw mem is now an v3d_size_t, typedef to uint32_t

It would be really awesome to be able to write this so it would work
with old and new versions of the simulator, but I was not able to do
that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11040>

---

 src/broadcom/simulator/v3d_simulator.c           | 2 +-
 src/broadcom/simulator/v3d_simulator_wrapper.cpp | 2 +-
 src/broadcom/simulator/v3d_simulator_wrapper.h   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/broadcom/simulator/v3d_simulator.c b/src/broadcom/simulator/v3d_simulator.c
index fa99750190f..a6a057d80f0 100644
--- a/src/broadcom/simulator/v3d_simulator.c
+++ b/src/broadcom/simulator/v3d_simulator.c
@@ -79,7 +79,7 @@ static struct v3d_simulator_state {
         /* Base hardware address of the heap. */
         uint32_t mem_base;
         /* Size of the heap. */
-        size_t mem_size;
+        uint32_t mem_size;
 
         struct mem_block *heap;
         struct mem_block *overflow;
diff --git a/src/broadcom/simulator/v3d_simulator_wrapper.cpp b/src/broadcom/simulator/v3d_simulator_wrapper.cpp
index ffd8e463ade..7a6fb98366e 100644
--- a/src/broadcom/simulator/v3d_simulator_wrapper.cpp
+++ b/src/broadcom/simulator/v3d_simulator_wrapper.cpp
@@ -46,7 +46,7 @@ struct v3d_hw *v3d_hw_auto_new(void *in_params)
 }
 
 
-uint32_t v3d_hw_get_mem(const struct v3d_hw *hw, size_t *size, void **p)
+uint32_t v3d_hw_get_mem(const struct v3d_hw *hw, uint32_t *size, void **p)
 {
         return hw->get_mem(size, p);
 }
diff --git a/src/broadcom/simulator/v3d_simulator_wrapper.h b/src/broadcom/simulator/v3d_simulator_wrapper.h
index c6383104f3f..90e7c420701 100644
--- a/src/broadcom/simulator/v3d_simulator_wrapper.h
+++ b/src/broadcom/simulator/v3d_simulator_wrapper.h
@@ -31,7 +31,7 @@ extern "C" {
 #endif
 
 struct v3d_hw *v3d_hw_auto_new(void *params);
-uint32_t v3d_hw_get_mem(const struct v3d_hw *hw, size_t *size, void **p);
+uint32_t v3d_hw_get_mem(const struct v3d_hw *hw, uint32_t *size, void **p);
 bool v3d_hw_alloc_mem(struct v3d_hw *hw, size_t min_size);
 bool v3d_hw_has_gca(struct v3d_hw *hw);
 uint32_t v3d_hw_read_reg(struct v3d_hw *hw, uint32_t reg);



More information about the mesa-commit mailing list