diff options
author | Kristian H. Kristensen <[email protected]> | 2019-02-14 23:34:09 -0800 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2019-02-20 08:56:21 -0800 |
commit | 686211f4c9659fb964c8467ac21f3445c79a9c36 (patch) | |
tree | f6d68c8bcfc055edcbbd1fcf8b339739e52a31b5 /src/gallium | |
parent | e827ea8c83711ce5f2eefae86ddf23039eef945b (diff) |
freedreno/a6xx: Copy stencil as R8_UINT
Blitter does support it after all. Previous attempt to use R8_UINT
failed because we overwrote the a6xx format in emit_blit_texture(),
but some of the later setup still looked at the gallium format.
If we overwrite it in the pipe_blit_info before we even call into
emit_blit_texture() it works properly.
Signed-off-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c index 2ae59ce62f4..c54d34d729a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c @@ -521,12 +521,22 @@ rewrite_zs_blit(struct fd_ringbuffer *ring, const struct pipe_blit_info *info) { struct pipe_blit_info separate = *info; + if (DEBUG_BLIT_FALLBACK) { + fprintf(stderr, "---- rewrite_separate_zs_blit: "); + util_dump_blit_info(stderr, info); + fprintf(stderr, "\ndst resource: "); + util_dump_resource(stderr, info->dst.resource); + fprintf(stderr, "\nsrc resource: "); + util_dump_resource(stderr, info->src.resource); + fprintf(stderr, "\n\n"); + } + switch (info->src.format) { case PIPE_FORMAT_S8_UINT: debug_assert(info->mask == PIPE_MASK_S); separate.mask = PIPE_MASK_R; - separate.src.format = PIPE_FORMAT_R8_UNORM; - separate.dst.format = PIPE_FORMAT_R8_UNORM; + separate.src.format = PIPE_FORMAT_R8_UINT; + separate.dst.format = PIPE_FORMAT_R8_UINT; emit_blit_texture(ring, &separate); break; @@ -539,8 +549,8 @@ rewrite_zs_blit(struct fd_ringbuffer *ring, const struct pipe_blit_info *info) } if (info->mask & PIPE_MASK_S) { separate.mask = PIPE_MASK_R; - separate.src.format = PIPE_FORMAT_R8_UNORM; - separate.dst.format = PIPE_FORMAT_R8_UNORM; + separate.src.format = PIPE_FORMAT_R8_UINT; + separate.dst.format = PIPE_FORMAT_R8_UINT; separate.src.resource = &fd_resource(info->src.resource)->stencil->base; separate.dst.resource = &fd_resource(info->dst.resource)->stencil->base; emit_blit_texture(ring, &separate); |