From: Rob Clark Date: Sun, 28 Apr 2019 16:35:15 +0000 (-0700) Subject: freedreno/a6xx: pre-bake UBWC flags in texture-view X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9cb8037e541c5b46650b57a116de0d03f51a1073;p=mesa.git freedreno/a6xx: pre-bake UBWC flags in texture-view Small cleanup. No need to defer this to emit time. Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index f0aa854888c..efb4d5fd84b 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -436,9 +436,7 @@ fd6_emit_textures(struct fd_pipe *pipe, struct fd_ringbuffer *ring, OUT_RING(state, view->texconst0); OUT_RING(state, view->texconst1); OUT_RING(state, view->texconst2); - OUT_RING(state, view->texconst3 | - COND(rsc && view->ubwc_enabled, - A6XX_TEX_CONST_3_FLAG | A6XX_TEX_CONST_3_UNK27)); + OUT_RING(state, view->texconst3); if (rsc) { if (view->base.format == PIPE_FORMAT_X32_S8X24_UINT) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c index 54f49861e06..d7e7105c748 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c @@ -314,6 +314,10 @@ fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, break; } + if (so->ubwc_enabled) { + so->texconst3 |= A6XX_TEX_CONST_3_FLAG | A6XX_TEX_CONST_3_UNK27; + } + return &so->base; }