Mesa (main): zink: track image binds
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 20 01:10:29 UTC 2022
Module: Mesa
Branch: main
Commit: 80569f9e5fb07c497cccce1407c3620eb34b893e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=80569f9e5fb07c497cccce1407c3620eb34b893e
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 e13a5ef194f..1639796f50f 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1378,6 +1378,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) {
@@ -1512,6 +1513,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 8ece0080747..30ffee35c3f 100644
--- a/src/gallium/drivers/zink/zink_resource.h
+++ b/src/gallium/drivers/zink/zink_resource.h
@@ -141,6 +141,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