freedreno/a6xx: pre-bake UBWC flags in texture-view

Small cleanup.  No need to defer this to emit time.

Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Rob Clark 2019-04-28 09:35:15 -07:00
parent 8506ebfb95
commit 9cb8037e54
2 changed files with 5 additions and 3 deletions

View File

@ -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)

View File

@ -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;
}