radv/winsys: add a small comment explaining the CHAIN bit
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 8 Jun 2021 12:46:58 +0000 (14:46 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 10 Jun 2021 06:31:11 +0000 (08:31 +0200)
Without it the hardware launches an IB2 which might hang in some
rare situations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11214>

src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c

index bb4e306..3e83d1c 100644 (file)
@@ -571,6 +571,7 @@ radv_amdgpu_cs_execute_secondary(struct radeon_cmdbuf *_parent, struct radeon_cm
       if (parent->base.cdw + 4 > parent->base.max_dw)
          radv_amdgpu_cs_grow(&parent->base, 4);
 
+      /* Not setting the CHAIN bit will launch an IB2. */
       radeon_emit(&parent->base, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0));
       radeon_emit(&parent->base, child->ib.ib_mc_address);
       radeon_emit(&parent->base, child->ib.ib_mc_address >> 32);