Module: Mesa
Branch: main
Commit: e240cda12820b9767205339fd87df97295e35b9b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e240cda12820b9767205339fd87df97295e35b9b

Author: Yogesh Mohan Marimuthu <[email protected]>
Date:   Sat Dec  9 17:26:34 2023 +0530

winsys/amdgpu: move 125% comment to correct line of code

Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26612>

---

 src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c 
b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index 3f1274c1b7e..bac52d58287 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -1228,7 +1228,6 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf 
*rcs, unsigned dw)
 
    assert(rcs->current.cdw <= rcs->current.max_dw);
 
-   /* 125% of the size for IB epilog. */
    unsigned requested_size_dw = rcs->prev_dw + rcs->current.cdw + dw;
 
    if (requested_size_dw > IB_MAX_SUBMIT_DWORDS)
@@ -1239,6 +1238,7 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf 
*rcs, unsigned dw)
 
    unsigned cs_epilog_dw = amdgpu_cs_epilog_dws(cs);
    unsigned need_byte_size = (dw + cs_epilog_dw) * 4;
+   /* 125% of the size for IB epilog. */
    unsigned safe_byte_size = need_byte_size + need_byte_size / 4;
    main_ib->max_check_space_size = MAX2(main_ib->max_check_space_size, 
safe_byte_size);
    main_ib->max_ib_size_dw = MAX2(main_ib->max_ib_size_dw, requested_size_dw);

Reply via email to