winsys/amdgpu: clean up and remove nonsensical assertion
authorMarek Olšák <marek.olsak@amd.com>
Thu, 14 Feb 2019 05:38:37 +0000 (00:38 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 23 Apr 2019 15:36:31 +0000 (11:36 -0400)
The assertion considers max_dw from the current IB in the chain, but
big_ib_buffer is a buffer for the next IB, which can be smaller.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c

index 83b04ff53af6801b26606b45cf384715adc8694c..4a2377f7e09e5b09ae33e30e075bf760bd30ab63 100644 (file)
@@ -1030,8 +1030,7 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf *rcs, unsigned dw)
    va = amdgpu_winsys_bo(ib->big_ib_buffer)->va;
 
    /* This space was originally reserved. */
-   rcs->current.max_dw += 4;
-   assert(ib->used_ib_space + 4 * rcs->current.max_dw <= ib->big_ib_buffer->size);
+   rcs->current.max_dw += cs_epilog_dw;
 
    /* Pad with NOPs and add INDIRECT_BUFFER packet */
    while ((rcs->current.cdw & 7) != 4)