From: Rob Clark Date: Sat, 25 Jan 2020 19:18:32 +0000 (-0800) Subject: freedreno/a2xx: constify gmem state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4bcc3a0923b9c55fc11629bf218155b73fd02a28;p=mesa.git freedreno/a2xx: constify gmem state Signed-off-by: Rob Clark Part-of: --- diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c index a548e9e946c..63e5078c0c8 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c @@ -62,7 +62,7 @@ static uint32_t fmt2swap(enum pipe_format format) static bool use_hw_binning(struct fd_batch *batch) { - struct fd_gmem_stateobj *gmem = &batch->ctx->gmem; + const struct fd_gmem_stateobj *gmem = &batch->ctx->gmem; /* we hardcoded a limit of 8 "pipes", we can increase this limit * at the cost of a slightly larger command stream @@ -136,7 +136,7 @@ prepare_tile_fini_ib(struct fd_batch *batch) { struct fd_context *ctx = batch->ctx; struct fd2_context *fd2_ctx = fd2_context(ctx); - struct fd_gmem_stateobj *gmem = &ctx->gmem; + const struct fd_gmem_stateobj *gmem = &ctx->gmem; struct pipe_framebuffer_state *pfb = &batch->framebuffer; struct fd_ringbuffer *ring; @@ -277,7 +277,7 @@ fd2_emit_tile_mem2gmem(struct fd_batch *batch, const struct fd_tile *tile) { struct fd_context *ctx = batch->ctx; struct fd2_context *fd2_ctx = fd2_context(ctx); - struct fd_gmem_stateobj *gmem = &ctx->gmem; + const struct fd_gmem_stateobj *gmem = &ctx->gmem; struct fd_ringbuffer *ring = batch->gmem; struct pipe_framebuffer_state *pfb = &batch->framebuffer; unsigned bin_w = tile->bin_w; @@ -478,7 +478,7 @@ fd2_emit_tile_init(struct fd_batch *batch) struct fd_context *ctx = batch->ctx; struct fd_ringbuffer *ring = batch->gmem; struct pipe_framebuffer_state *pfb = &batch->framebuffer; - struct fd_gmem_stateobj *gmem = &ctx->gmem; + const struct fd_gmem_stateobj *gmem = &ctx->gmem; enum pipe_format format = pipe_surface_format(pfb->cbufs[0]); uint32_t reg;