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

Author: Eric Engestrom <[email protected]>
Date:   Thu Jun 22 12:12:44 2023 +0100

v3dv: replace boolean and uint with bool and size_t

There's no reason to use the gallium `p_compiler.h` types in vulkan code.

Inspired by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577,
but using `size_t` for `ulist_data_size` because its two users are
`blob_read_bytes()` and `memcpy()`, both of which expect a `size_t`.

Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Yonggang Luo <[email protected]>
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23795>

---

 src/broadcom/vulkan/v3dv_bo.c             | 2 +-
 src/broadcom/vulkan/v3dv_pipeline_cache.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/broadcom/vulkan/v3dv_bo.c b/src/broadcom/vulkan/v3dv_bo.c
index a0938e4fb34..2728a9233f9 100644
--- a/src/broadcom/vulkan/v3dv_bo.c
+++ b/src/broadcom/vulkan/v3dv_bo.c
@@ -359,7 +359,7 @@ v3dv_bo_unmap(struct v3dv_device *device, struct v3dv_bo 
*bo)
    bo->map_size = 0;
 }
 
-static boolean
+static bool
 reallocate_size_list(struct v3dv_bo_cache *cache,
                      struct v3dv_device *device,
                      uint32_t size)
diff --git a/src/broadcom/vulkan/v3dv_pipeline_cache.c 
b/src/broadcom/vulkan/v3dv_pipeline_cache.c
index bafa8d759fa..3f58940c7da 100644
--- a/src/broadcom/vulkan/v3dv_pipeline_cache.c
+++ b/src/broadcom/vulkan/v3dv_pipeline_cache.c
@@ -542,7 +542,7 @@ shader_variant_create_from_blob(struct v3dv_device *device,
    if (blob->overrun)
       return NULL;
 
-   uint ulist_data_size = sizeof(uint32_t) * ulist_count;
+   size_t ulist_data_size = sizeof(uint32_t) * ulist_count;
    const void *ulist_data_data = blob_read_bytes(blob, ulist_data_size);
    if (blob->overrun)
       return NULL;

Reply via email to