Mesa (staging/21.1): radeonsi: fix encryption check for buffers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jun 5 16:30:19 UTC 2021
Module: Mesa
Branch: staging/21.1
Commit: 627c3da8dae68c0f0da7d284ce86e527e6668617
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=627c3da8dae68c0f0da7d284ce86e527e6668617
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Tue Jun 1 16:54:29 2021 +0200
radeonsi: fix encryption check for buffers
The writable bit means read-write, not just write.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Fixes: 8873ea0e253 ("radeonsi: determine secure flag must be set for gfx IB")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11107>
(cherry picked from commit 8baa77c8139e9c8754d0d482774ae4d04cb66f60)
---
.pick_status.json | 2 +-
src/gallium/drivers/radeonsi/si_descriptors.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 5967c704ba4..75a6dd8ae05 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -760,7 +760,7 @@
"description": "radeonsi: fix encryption check for buffers",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "8873ea0e253b90eb91da514e36bd845d6a5f9734"
},
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 5337ad36d8e..60daaeb0792 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1043,9 +1043,7 @@ static bool si_buffer_resources_check_encrypted(struct si_context *sctx,
while (mask) {
int i = u_bit_scan64(&mask);
- /* only check for reads */
- if ((buffers->writable_mask & (1llu << i)) == 0 &&
- (si_resource(buffers->buffers[i])->flags & RADEON_FLAG_ENCRYPTED))
+ if (si_resource(buffers->buffers[i])->flags & RADEON_FLAG_ENCRYPTED)
return true;
}
More information about the mesa-commit
mailing list