From 7cafe65ea17ca137655b508a571261fac0f12017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Mon, 19 Feb 2024 14:47:44 +0100 Subject: [PATCH] zink: use symbolic values instead of 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just make it easier to remember which parameter is accepting which type. Signed-off-by: Corentin Noël Part-of: --- src/gallium/drivers/zink/zink_batch.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index cd3ba78b4b6..7ea04e89ce3 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -178,8 +178,8 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs) zink_fence_reference(screen, mfence, NULL); util_dynarray_clear(&bs->fences); - bs->unordered_write_access = 0; - bs->unordered_write_stages = 0; + bs->unordered_write_access = VK_ACCESS_NONE; + bs->unordered_write_stages = VK_PIPELINE_STAGE_NONE; /* only increment batch generation if previously in-use to avoid false detection of batch completion */ if (bs->fence.submitted) @@ -714,9 +714,10 @@ submit_queue(void *data, void *gdata, int thread_index) mb.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; mb.pNext = NULL; mb.srcAccessMask = bs->unordered_write_access; - mb.dstAccessMask = 0; + mb.dstAccessMask = VK_ACCESS_NONE; VKSCR(CmdPipelineBarrier)(bs->reordered_cmdbuf, - bs->unordered_write_stages, 0, + bs->unordered_write_stages, + VK_PIPELINE_STAGE_NONE, 0, 1, &mb, 0, NULL, 0, NULL); } VRAM_ALLOC_LOOP(result,