radeonsi: fix encryption check for buffers

The writable bit means read-write, not just write.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: 8873ea0e25 ("radeonsi: determine secure flag must be set for gfx IB")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11107>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2021-06-01 16:54:29 +02:00
committed by Marge Bot
parent b377da9122
commit 8baa77c813
@@ -1033,9 +1033,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;
}