aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2018-02-03 23:54:28 +0200
committerGrazvydas Ignotas <[email protected]>2018-02-08 01:13:58 +0200
commitf91aa68ac6286999c20f23a29f37913d1ae78ac5 (patch)
tree934434addf7c65fe62f8e776909995234bc18bc3
parent13ada91740769a3183f21d974193769262f5ee0f (diff)
radeonsi: avoid int-to-pointer-cast warnings on 32bit
I hope the actual dropping of MSB is ok, but that's what's already happened before this change. Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 17115e1355a..009e8031058 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -2265,7 +2265,8 @@ static uint64_t si_create_texture_handle(struct pipe_context *ctx,
handle = tex_handle->desc_slot;
- if (!_mesa_hash_table_insert(sctx->tex_handles, (void *)handle,
+ if (!_mesa_hash_table_insert(sctx->tex_handles,
+ (void *)(uintptr_t)handle,
tex_handle)) {
FREE(tex_handle);
return 0;
@@ -2284,7 +2285,8 @@ static void si_delete_texture_handle(struct pipe_context *ctx, uint64_t handle)
struct si_texture_handle *tex_handle;
struct hash_entry *entry;
- entry = _mesa_hash_table_search(sctx->tex_handles, (void *)handle);
+ entry = _mesa_hash_table_search(sctx->tex_handles,
+ (void *)(uintptr_t)handle);
if (!entry)
return;
@@ -2306,7 +2308,8 @@ static void si_make_texture_handle_resident(struct pipe_context *ctx,
struct si_sampler_view *sview;
struct hash_entry *entry;
- entry = _mesa_hash_table_search(sctx->tex_handles, (void *)handle);
+ entry = _mesa_hash_table_search(sctx->tex_handles,
+ (void *)(uintptr_t)handle);
if (!entry)
return;
@@ -2408,7 +2411,8 @@ static uint64_t si_create_image_handle(struct pipe_context *ctx,
handle = img_handle->desc_slot;
- if (!_mesa_hash_table_insert(sctx->img_handles, (void *)handle,
+ if (!_mesa_hash_table_insert(sctx->img_handles,
+ (void *)(uintptr_t)handle,
img_handle)) {
FREE(img_handle);
return 0;
@@ -2427,7 +2431,8 @@ static void si_delete_image_handle(struct pipe_context *ctx, uint64_t handle)
struct si_image_handle *img_handle;
struct hash_entry *entry;
- entry = _mesa_hash_table_search(sctx->img_handles, (void *)handle);
+ entry = _mesa_hash_table_search(sctx->img_handles,
+ (void *)(uintptr_t)handle);
if (!entry)
return;
@@ -2448,7 +2453,8 @@ static void si_make_image_handle_resident(struct pipe_context *ctx,
struct r600_resource *res;
struct hash_entry *entry;
- entry = _mesa_hash_table_search(sctx->img_handles, (void *)handle);
+ entry = _mesa_hash_table_search(sctx->img_handles,
+ (void *)(uintptr_t)handle);
if (!entry)
return;