Mesa (main): zink: always bind gfx pipeline at the top of draw
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 19 03:54:42 UTC 2022
Module: Mesa
Branch: main
Commit: 75e4a861cb1b679a55a386b6fdac4aeb0dfbba17
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=75e4a861cb1b679a55a386b6fdac4aeb0dfbba17
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Apr 18 15:06:58 2022 -0400
zink: always bind gfx pipeline at the top of draw
at one point I thought it'd be cool to try and async compile a pipeline
between shader bind and draw emit, but this is an unrealistic pipe dream
that just makes things more complicated
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16018>
---
src/gallium/drivers/zink/zink_draw.cpp | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp
index da2b53742e6..c1c0625ccaf 100644
--- a/src/gallium/drivers/zink/zink_draw.cpp
+++ b/src/gallium/drivers/zink/zink_draw.cpp
@@ -601,9 +601,7 @@ zink_draw(struct pipe_context *pctx,
if (have_streamout && ctx->dirty_so_targets)
zink_emit_stream_output_targets(pctx);
- bool pipeline_changed = false;
- if (DYNAMIC_STATE == ZINK_NO_DYNAMIC_STATE)
- pipeline_changed = update_gfx_pipeline<BATCH_CHANGED>(ctx, batch->state, mode);
+ bool pipeline_changed = update_gfx_pipeline<BATCH_CHANGED>(ctx, batch->state, mode);
if (BATCH_CHANGED || ctx->vp_state_changed || (DYNAMIC_STATE == ZINK_NO_DYNAMIC_STATE && pipeline_changed)) {
VkViewport viewports[PIPE_MAX_VIEWPORTS];
@@ -759,10 +757,8 @@ zink_draw(struct pipe_context *pctx,
zink_select_draw_vbo(ctx);
}
- if (DYNAMIC_STATE != ZINK_NO_DYNAMIC_STATE) {
- update_gfx_pipeline<BATCH_CHANGED>(ctx, batch->state, mode);
- if (BATCH_CHANGED || mode_changed)
- VKCTX(CmdSetPrimitiveTopologyEXT)(batch->state->cmdbuf, zink_primitive_topology(mode));
+ if (DYNAMIC_STATE != ZINK_NO_DYNAMIC_STATE && (BATCH_CHANGED || mode_changed)) {
+ VKCTX(CmdSetPrimitiveTopologyEXT)(batch->state->cmdbuf, zink_primitive_topology(mode));
}
if (DYNAMIC_STATE >= ZINK_DYNAMIC_STATE2 && (BATCH_CHANGED || ctx->primitive_restart != dinfo->primitive_restart)) {
More information about the mesa-commit
mailing list