Mesa (main): u_blitter: fix fs used when no color emitted
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 10 02:56:50 UTC 2021
Module: Mesa
Branch: main
Commit: 7e07f7f900dbef2c1e28ff0d90e1beb73016097a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e07f7f900dbef2c1e28ff0d90e1beb73016097a
Author: Dave Airlie <airlied at gmail.com>
Date: Thu Dec 24 12:58:48 2020 +1000
u_blitter: fix fs used when no color emitted
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11280>
---
src/gallium/auxiliary/util/u_blitter.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 42bbd47d93a..265b6e3f9b3 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -1502,8 +1502,6 @@ static void util_blitter_clear_custom(struct blitter_context *blitter,
sr.ref_value[0] = stencil & 0xff;
pipe->set_stencil_ref(pipe, sr);
- bind_fs_write_all_cbufs(ctx);
-
union blitter_attrib attrib;
memcpy(attrib.color, color->ui, sizeof(color->ui));
@@ -1511,6 +1509,11 @@ static void util_blitter_clear_custom(struct blitter_context *blitter,
enum blitter_attrib_type type = pass_generic ? UTIL_BLITTER_ATTRIB_COLOR :
UTIL_BLITTER_ATTRIB_NONE;
+ if (pass_generic)
+ bind_fs_write_all_cbufs(ctx);
+ else
+ bind_fs_empty(ctx);
+
if (num_layers > 1 && ctx->has_layered) {
blitter_get_vs_func get_vs = get_vs_layered;
More information about the mesa-commit
mailing list