diff options
author | Rob Clark <[email protected]> | 2019-04-28 09:35:15 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-04-29 17:01:01 -0700 |
commit | 9cb8037e541c5b46650b57a116de0d03f51a1073 (patch) | |
tree | e6fc7a372fe14c95f9e99613ca82f7340ef4ceba /src/gallium/drivers/freedreno | |
parent | 8506ebfb951f88654a1ffda7d2c24a8004ca50b9 (diff) |
freedreno/a6xx: pre-bake UBWC flags in texture-view
Small cleanup. No need to defer this to emit time.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_texture.c | 4 |
2 files changed, 5 insertions, 3 deletions
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; } |