Mesa (main): gallium/u_threaded: don't update valid_buffer_range for read-only shader buffers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 14 23:38:30 UTC 2021
Module: Mesa
Branch: main
Commit: 2b1677860e736b43cba3a466908470a4e9ae4d3a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b1677860e736b43cba3a466908470a4e9ae4d3a
Author: Marek Olšák <marek.olsak at amd.com>
Date: Fri Jun 11 20:18:28 2021 -0400
gallium/u_threaded: don't update valid_buffer_range for read-only shader buffers
Reviewed-by: Rob Clark <robdclark at chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11335>
---
src/gallium/auxiliary/util/u_threaded_context.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c
index 3cb14d3565e..54ee6e76dc7 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -1475,9 +1475,11 @@ tc_set_shader_buffers(struct pipe_context *_pipe,
tc_bind_buffer(&tc->shader_buffers[shader][start + i], next, &tres->b);
- util_range_add(&tres->b, &tres->valid_buffer_range,
- src->buffer_offset,
- src->buffer_offset + src->buffer_size);
+ if (writable_bitmask & BITFIELD_BIT(i)) {
+ util_range_add(&tres->b, &tres->valid_buffer_range,
+ src->buffer_offset,
+ src->buffer_offset + src->buffer_size);
+ }
} else {
tc_unbind_buffer(&tc->shader_buffers[shader][start + i]);
}
More information about the mesa-commit
mailing list