aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-10-29 14:12:02 +0100
committerErik Faye-Lund <[email protected]>2019-10-30 10:29:23 +0000
commit4c4ac2d4d5184f154deaa611b231053ec33e73ce (patch)
tree357f627858566852a2aa00c6af6e5defce9ef401 /src/gallium/drivers/zink
parentb222f28357cb3cb2bae751675614a39362da2816 (diff)
zink: drop nop descriptor-updates
If there's nothing to be done, let's actually do nothing. Seems like a good idea. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/zink')
-rw-r--r--src/gallium/drivers/zink/zink_context.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index b97cc16455d..9219d019811 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1174,10 +1174,11 @@ zink_draw_vbo(struct pipe_context *pctx,
if (ctx->gfx_pipeline_state.blend_state->need_blend_constants)
vkCmdSetBlendConstants(batch->cmdbuf, ctx->blend_constants);
- for (int i = 0; i < num_wds; ++i)
- wds[i].dstSet = desc_set;
-
- vkUpdateDescriptorSets(screen->dev, num_wds, wds, 0, NULL);
+ if (num_wds > 0) {
+ for (int i = 0; i < num_wds; ++i)
+ wds[i].dstSet = desc_set;
+ vkUpdateDescriptorSets(screen->dev, num_wds, wds, 0, NULL);
+ }
vkCmdBindPipeline(batch->cmdbuf, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
vkCmdBindDescriptorSets(batch->cmdbuf, VK_PIPELINE_BIND_POINT_GRAPHICS,