Mesa (staging/22.1): zink: track image binds
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 20 01:14:50 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 566aaed09424e349491c65a7762b83153a63f8c3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=566aaed09424e349491c65a7762b83153a63f8c3
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Sat Jun 18 09:41:43 2022 -0400
zink: track image binds
track all the things
Acked-by: Dave Airlie <airlied at redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
---
src/gallium/drivers/zink/zink_context.c | 2 ++
src/gallium/drivers/zink/zink_resource.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 252654243db..db7441de53e 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1371,6 +1371,7 @@ unbind_shader_image(struct zink_context *ctx, enum pipe_shader_type stage, unsig
return;
struct zink_resource *res = zink_resource(image_view->base.resource);
+ res->image_binds[stage] &= ~BITFIELD_BIT(slot);
unbind_shader_image_counts(ctx, res, is_compute, image_view->base.access & PIPE_IMAGE_ACCESS_WRITE);
if (image_view->base.resource->target == PIPE_BUFFER) {
@@ -1505,6 +1506,7 @@ zink_set_shader_images(struct pipe_context *pctx,
zink_resource_access_is_write(access));
update = true;
update_descriptor_state_image(ctx, p_stage, start_slot + i, res);
+ res->image_binds[p_stage] |= BITFIELD_BIT(start_slot + i);
} else if (image_view->base.resource) {
update = true;
diff --git a/src/gallium/drivers/zink/zink_resource.h b/src/gallium/drivers/zink/zink_resource.h
index 228edbf5a8d..ff24426ddfd 100644
--- a/src/gallium/drivers/zink/zink_resource.h
+++ b/src/gallium/drivers/zink/zink_resource.h
@@ -136,6 +136,7 @@ struct zink_resource {
};
};
uint32_t sampler_binds[PIPE_SHADER_TYPES];
+ uint32_t image_binds[PIPE_SHADER_TYPES];
uint16_t image_bind_count[2]; //gfx, compute
uint16_t write_bind_count[2]; //gfx, compute
uint16_t bindless[2]; //tex, img
More information about the mesa-commit
mailing list