diff options
author | Eric Anholt <[email protected]> | 2017-11-14 15:52:53 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-11-17 16:09:55 -0800 |
commit | 8d5994098f62c509094127aad99c6abff9cb53b1 (patch) | |
tree | 73baa2151f182ade0d8d8b2b3fb3eb7926aa7147 /src/gallium/drivers/vc5/vc5_rcl.c | |
parent | 87391e23cf2110051c3c74281402a690b67ccc7f (diff) |
broadcom/vc5: Set up the padded height at surface creation time.
This centralizes the calculation in the surface, instead of in each
load/store.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_rcl.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_rcl.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c index 5202889e598..22d6eed781c 100644 --- a/src/gallium/drivers/vc5/vc5_rcl.c +++ b/src/gallium/drivers/vc5/vc5_rcl.c @@ -36,12 +36,8 @@ load_raw(struct vc5_cl *cl, struct pipe_surface *psurf, int buffer) load.raw_mode = true; load.buffer_to_load = buffer; load.address = cl_address(rsc->bo, surf->offset); - - struct vc5_resource_slice *slice = - &rsc->slices[psurf->u.tex.level]; load.padded_height_of_output_image_in_uif_blocks = - (slice->size / slice->stride) / - (2 * vc5_utile_height(rsc->cpp)); + surf->padded_height_of_output_image_in_uif_blocks; } } @@ -59,12 +55,8 @@ store_raw(struct vc5_cl *cl, struct pipe_surface *psurf, int buffer, store.disable_colour_buffers_clear_on_write = !color_clear; store.disable_z_buffer_clear_on_write = !z_clear; store.disable_stencil_buffer_clear_on_write = !s_clear; - - struct vc5_resource_slice *slice = - &rsc->slices[psurf->u.tex.level]; store.padded_height_of_output_image_in_uif_blocks = - (slice->size / slice->stride) / - (2 * vc5_utile_height(rsc->cpp)); + surf->padded_height_of_output_image_in_uif_blocks; } } @@ -330,11 +322,8 @@ vc5_emit_rcl(struct vc5_job *job) zs.internal_type = surf->internal_type; zs.output_image_format = surf->format; - - struct vc5_resource_slice *slice = &rsc->slices[psurf->u.tex.level]; - /* XXX */ zs.padded_height_of_output_image_in_uif_blocks = - (slice->size / slice->stride) / (2 * vc5_utile_height(rsc->cpp)); + surf->padded_height_of_output_image_in_uif_blocks; assert(surf->tiling != VC5_TILING_RASTER); zs.memory_format = surf->tiling; |