Mesa (main): iris: Handle range tracking for global bindings
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 6 20:42:48 UTC 2022
Module: Mesa
Branch: main
Commit: cde1be0b847ae328e623ae87c38a5c59ab7d7fc1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cde1be0b847ae328e623ae87c38a5c59ab7d7fc1
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Wed Apr 6 13:17:38 2022 -0500
iris: Handle range tracking for global bindings
The moment something is bound globally, the whole thing is valid.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15777>
---
src/gallium/drivers/iris/iris_state.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 002bcdd1f1a..4931bd74037 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -3020,7 +3020,12 @@ iris_set_global_binding(struct pipe_context *ctx,
if (resources && resources[i]) {
pipe_resource_reference(&ice->state.global_bindings[start_slot + i],
resources[i]);
+
struct iris_resource *res = (void *) resources[i];
+ assert(res->base.b.target == PIPE_BUFFER);
+ util_range_add(&res->base.b, &res->valid_buffer_range,
+ 0, res->base.b.width0);
+
uint64_t addr = res->bo->address + res->offset;
memcpy(handles[i], &addr, sizeof(addr));
} else {
More information about the mesa-commit
mailing list