Mesa (master): iris: Fix blits with S8_UINT destination
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Mar 28 17:48:15 UTC 2019
Module: Mesa
Branch: master
Commit: ee8370c766c46752de6fa6dbb58c63a6ed5c4310
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee8370c766c46752de6fa6dbb58c63a6ed5c4310
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Mar 19 14:00:50 2019 -0700
iris: Fix blits with S8_UINT destination
For depth and stencil blits, we always want the main mask to be Z, and
the secondary pass mask to be S. If asked to blit Z+S to S, we should
handle the blit in the second pass which properly gets the stencil
resources.
Before, we were trying to handle S as the main mask, and accidentally
blitting a Z source to a S destination, which doesn't work out well.
Fixes Piglit's "framebuffer-blit-levels {draw,read} stencil" tests.
---
src/gallium/drivers/iris/iris_blit.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c
index c1f76ea006c..5568be937fb 100644
--- a/src/gallium/drivers/iris/iris_blit.c
+++ b/src/gallium/drivers/iris/iris_blit.c
@@ -399,9 +399,7 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
blorp_batch_init(&ice->blorp, &blorp_batch, batch, blorp_flags);
unsigned main_mask;
- if (info->dst.format == PIPE_FORMAT_S8_UINT)
- main_mask = PIPE_MASK_S;
- else if (util_format_is_depth_or_stencil(info->dst.format))
+ if (util_format_is_depth_or_stencil(info->dst.format))
main_mask = PIPE_MASK_Z;
else
main_mask = PIPE_MASK_RGBA;
@@ -422,7 +420,7 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
}
if ((info->mask & PIPE_MASK_S) &&
- util_format_is_depth_and_stencil(info->dst.format) &&
+ util_format_has_stencil(util_format_description(info->dst.format)) &&
util_format_has_stencil(util_format_description(info->src.format))) {
struct iris_resource *src_res, *dst_res, *junk;
iris_get_depth_stencil_resources(info->src.resource, &junk, &src_res);
More information about the mesa-commit
mailing list