pvr: Zero tail of cs buffers after linking when dumping cs
Dumps already force buffers to zero before they get written to, this keeps up the pattern of making the contents easier to grok. Signed-off-by: Matt Coster <matt.coster@imgtec.com> Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24692>
This commit is contained in:
@@ -261,9 +261,11 @@ static bool pvr_csb_buffer_extend(struct pvr_csb *csb)
|
||||
|
||||
/* if this is not the first BO in csb */
|
||||
if (csb->pvr_bo) {
|
||||
bool zero_after_move = PVR_IS_DEBUG_SET(DUMP_CONTROL_STREAM);
|
||||
void *new_buffer = pvr_bo->bo->map;
|
||||
|
||||
current_state_update_size =
|
||||
(uint8_t *)csb->next - (uint8_t *)csb->relocation_mark;
|
||||
void *new_buffer = pvr_bo->bo->map;
|
||||
|
||||
assert(csb->relocation_mark != NULL);
|
||||
assert(csb->next >= csb->relocation_mark);
|
||||
@@ -273,10 +275,12 @@ static bool pvr_csb_buffer_extend(struct pvr_csb *csb)
|
||||
#if defined(DEBUG)
|
||||
assert(csb->relocation_mark_status == PVR_CSB_RELOCATION_MARK_SET);
|
||||
csb->relocation_mark_status = PVR_CSB_RELOCATION_MARK_SET_AND_CONSUMED;
|
||||
|
||||
memset(csb->relocation_mark, 0, current_state_update_size);
|
||||
zero_after_move = true;
|
||||
#endif
|
||||
|
||||
if (zero_after_move)
|
||||
memset(csb->relocation_mark, 0, current_state_update_size);
|
||||
|
||||
csb->next = csb->relocation_mark;
|
||||
|
||||
csb->end += stream_link_space;
|
||||
|
||||
Reference in New Issue
Block a user