winsys/amdgpu: always update gfx_bo_list_counter
authorMarek Olšák <marek.olsak@amd.com>
Thu, 12 Jul 2018 03:20:06 +0000 (23:20 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 16 Jul 2018 17:32:33 +0000 (13:32 -0400)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c

index 9aa489adaa46d9c8fbb34035d70c5b35d24006cd..77b372d2cea7c141dff0bc7fa1634bc7f3deab8e 100644 (file)
@@ -1343,9 +1343,6 @@ void amdgpu_cs_submit_ib(void *job, int thread_index)
         ++num_handles;
       }
 
-      if (acs->ring_type == RING_GFX)
-         ws->gfx_bo_list_counter += cs->num_real_buffers;
-
       if (num_handles) {
          r = amdgpu_bo_list_create(ws->dev, num_handles,
                                    handles, flags, &bo_list);
@@ -1362,6 +1359,9 @@ bo_list_error:
       goto cleanup;
    }
 
+   if (acs->ring_type == RING_GFX)
+      ws->gfx_bo_list_counter += cs->num_real_buffers;
+
    if (acs->ctx->num_rejected_cs) {
       r = -ECANCELED;
    } else {