mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
gallium/radeon*: Remove useless casts
These are unnecessary and are likely just left overs from prior work. Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
0ef5c8ab74
commit
7e43a28079
5 changed files with 11 additions and 14 deletions
|
|
@ -80,8 +80,8 @@ static void compute_memory_pool_init(struct compute_memory_pool * pool,
|
|||
initial_size_in_dw);
|
||||
|
||||
pool->size_in_dw = initial_size_in_dw;
|
||||
pool->bo = (struct r600_resource*)r600_compute_buffer_alloc_vram(pool->screen,
|
||||
pool->size_in_dw * 4);
|
||||
pool->bo = r600_compute_buffer_alloc_vram(pool->screen,
|
||||
pool->size_in_dw * 4);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -202,8 +202,7 @@ int compute_memory_grow_defrag_pool(struct compute_memory_pool *pool,
|
|||
} else {
|
||||
struct r600_resource *temp = NULL;
|
||||
|
||||
temp = (struct r600_resource *)r600_compute_buffer_alloc_vram(
|
||||
pool->screen, new_size_in_dw * 4);
|
||||
temp = r600_compute_buffer_alloc_vram(pool->screen, new_size_in_dw * 4);
|
||||
|
||||
if (temp != NULL) {
|
||||
struct pipe_resource *src = (struct pipe_resource *)pool->bo;
|
||||
|
|
@ -234,9 +233,7 @@ int compute_memory_grow_defrag_pool(struct compute_memory_pool *pool,
|
|||
pool->screen->b.b.resource_destroy(
|
||||
(struct pipe_screen *)pool->screen,
|
||||
(struct pipe_resource *)pool->bo);
|
||||
pool->bo = (struct r600_resource*)r600_compute_buffer_alloc_vram(
|
||||
pool->screen,
|
||||
pool->size_in_dw * 4);
|
||||
pool->bo = r600_compute_buffer_alloc_vram(pool->screen, pool->size_in_dw * 4);
|
||||
compute_memory_shadow(pool, pipe, 0);
|
||||
|
||||
if (pool->status & POOL_FRAGMENTED) {
|
||||
|
|
@ -449,7 +446,7 @@ void compute_memory_demote_item(struct compute_memory_pool *pool,
|
|||
/* We check if the intermediate buffer exists, and if it
|
||||
* doesn't, we create it again */
|
||||
if (item->real_buffer == NULL) {
|
||||
item->real_buffer = (struct r600_resource*)r600_compute_buffer_alloc_vram(
|
||||
item->real_buffer = r600_compute_buffer_alloc_vram(
|
||||
pool->screen, item->size_in_dw * 4);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ void *evergreen_create_compute_state(
|
|||
#endif
|
||||
#endif
|
||||
|
||||
shader->ctx = (struct r600_context*)ctx;
|
||||
shader->ctx = ctx;
|
||||
shader->local_size = cso->req_local_mem;
|
||||
shader->private_size = cso->req_private_mem;
|
||||
shader->input_size = cso->req_input_mem;
|
||||
|
|
@ -997,7 +997,7 @@ void *r600_compute_global_transfer_map(
|
|||
}
|
||||
else {
|
||||
if (item->real_buffer == NULL) {
|
||||
item->real_buffer = (struct r600_resource*)
|
||||
item->real_buffer =
|
||||
r600_compute_buffer_alloc_vram(pool->screen, item->size_in_dw * 4);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ static void r600_copy_global_buffer(struct pipe_context *ctx,
|
|||
src = (struct pipe_resource *)pool->bo;
|
||||
} else {
|
||||
if (item->real_buffer == NULL) {
|
||||
item->real_buffer = (struct r600_resource*)
|
||||
item->real_buffer =
|
||||
r600_compute_buffer_alloc_vram(pool->screen,
|
||||
item->size_in_dw * 4);
|
||||
}
|
||||
|
|
@ -570,7 +570,7 @@ static void r600_copy_global_buffer(struct pipe_context *ctx,
|
|||
dst = (struct pipe_resource *)pool->bo;
|
||||
} else {
|
||||
if (item->real_buffer == NULL) {
|
||||
item->real_buffer = (struct r600_resource*)
|
||||
item->real_buffer =
|
||||
r600_compute_buffer_alloc_vram(pool->screen,
|
||||
item->size_in_dw * 4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
|
|||
r600_copy_region_with_blit(ctx, temp, 0, 0, 0, 0, texture, level, box);
|
||||
rctx->blit_decompress_depth(ctx, (struct r600_texture*)temp, staging_depth,
|
||||
0, 0, 0, box->depth, 0, 0);
|
||||
pipe_resource_reference((struct pipe_resource**)&temp, NULL);
|
||||
pipe_resource_reference(&temp, NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static void init_scratch_buffer(struct si_context *sctx, struct si_compute *prog
|
|||
if (scratch_bytes == 0)
|
||||
return;
|
||||
|
||||
program->shader.scratch_bo = (struct r600_resource*)
|
||||
program->shader.scratch_bo =
|
||||
si_resource_create_custom(sctx->b.b.screen,
|
||||
PIPE_USAGE_DEFAULT,
|
||||
scratch_bytes * scratch_waves);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue