Mesa (main): zink: add a flag for disabling conditional render during blit
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 12:54:37 UTC 2021
Module: Mesa
Branch: main
Commit: 3f420b3f5521105c38cf9346238d1dbcae2030f8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f420b3f5521105c38cf9346238d1dbcae2030f8
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Jun 18 11:55:54 2021 -0400
zink: add a flag for disabling conditional render during blit
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11466>
---
src/gallium/drivers/zink/zink_blit.c | 4 ++++
src/gallium/drivers/zink/zink_context.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c
index 45a9cb6bd53..3e216a118b3 100644
--- a/src/gallium/drivers/zink/zink_blit.c
+++ b/src/gallium/drivers/zink/zink_blit.c
@@ -1,5 +1,6 @@
#include "zink_context.h"
#include "zink_helpers.h"
+#include "zink_query.h"
#include "zink_resource.h"
#include "zink_screen.h"
@@ -339,6 +340,9 @@ zink_blit_begin(struct zink_context *ctx, enum zink_blit_flags flags)
ctx->di.num_sampler_views[PIPE_SHADER_FRAGMENT],
ctx->sampler_views[PIPE_SHADER_FRAGMENT]);
}
+
+ if (flags & ZINK_BLIT_NO_COND_RENDER && ctx->render_condition_active)
+ zink_stop_conditional_render(ctx);
}
bool
diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h
index 3a22eeec50f..57a72e0b6c4 100644
--- a/src/gallium/drivers/zink/zink_context.h
+++ b/src/gallium/drivers/zink/zink_context.h
@@ -62,6 +62,7 @@ enum zink_blit_flags {
ZINK_BLIT_SAVE_FS = 1 << 1,
ZINK_BLIT_SAVE_FB = 1 << 2,
ZINK_BLIT_SAVE_TEXTURES = 1 << 3,
+ ZINK_BLIT_NO_COND_RENDER = 1 << 4,
};
struct zink_sampler_state {
More information about the mesa-commit
mailing list