From b88bcacf2b873f80fd3e95956c52a7f9c8419700 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Wed, 16 Oct 2024 17:23:54 -0700 Subject: [PATCH] anv/trtt: remove useless VK_RESULT checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We jump out of the loops whenever result is not VK_SUCCESS, there is no need to check for it there. I guess I missed this detail in the most recent rework for this function. Reviewed-by: Iván Briano Signed-off-by: Paulo Zanoni Part-of: --- src/intel/vulkan/anv_sparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_sparse.c b/src/intel/vulkan/anv_sparse.c index f3f2e6b9ed4..f9845025c97 100644 --- a/src/intel/vulkan/anv_sparse.c +++ b/src/intel/vulkan/anv_sparse.c @@ -792,9 +792,9 @@ anv_sparse_bind_trtt(struct anv_device *device, goto out_dynarrays; } - for (int b = 0; b < sparse_submit->binds_len && result == VK_SUCCESS; b++) { + for (int b = 0; b < sparse_submit->binds_len; b++) { struct anv_vm_bind *vm_bind = &sparse_submit->binds[b]; - for (uint64_t i = 0; i < vm_bind->size && result == VK_SUCCESS; i += 64 * 1024) { + for (uint64_t i = 0; i < vm_bind->size; i += 64 * 1024) { uint64_t trtt_addr = vm_bind->address + i; uint64_t dest_addr = (vm_bind->op == ANV_VM_BIND && vm_bind->bo) ?