This is more expressive and simplifies a subsequent change.
v2:
- fix one more call-site after rebase
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
struct fd_cs_patch *patch = fd_patch_element(&batch->draw_patches, i);
*patch->cs = patch->val | DRAW(0, 0, 0, vismode, 0);
}
- util_dynarray_resize(&batch->draw_patches, 0);
+ util_dynarray_clear(&batch->draw_patches);
return;
}
A2XX_PA_SC_WINDOW_OFFSET_Y(0));
patch_draws(batch, IGNORE_VISIBILITY);
- util_dynarray_resize(&batch->draw_patches, 0);
- util_dynarray_resize(&batch->shader_patches, 0);
+ util_dynarray_clear(&batch->draw_patches);
+ util_dynarray_clear(&batch->shader_patches);
}
/* before first tile */
patch->cs[5] = A2XX_RB_DEPTH_INFO_DEPTH_BASE(depth_base) |
A2XX_RB_DEPTH_INFO_DEPTH_FORMAT(1);
}
- util_dynarray_resize(&batch->gmem_patches, 0);
+ util_dynarray_clear(&batch->gmem_patches);
/* set to zero, for some reason hardware doesn't like certain values */
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
patch_draws(batch, IGNORE_VISIBILITY);
}
- util_dynarray_resize(&batch->draw_patches, 0);
- util_dynarray_resize(&batch->shader_patches, 0);
+ util_dynarray_clear(&batch->draw_patches);
+ util_dynarray_clear(&batch->shader_patches);
}
/* before mem2gmem */
struct fd_cs_patch *patch = fd_patch_element(&batch->draw_patches, i);
*patch->cs = patch->val | DRAW(0, 0, 0, vismode, 0);
}
- util_dynarray_resize(&batch->draw_patches, 0);
+ util_dynarray_clear(&batch->draw_patches);
}
static void
struct fd_cs_patch *patch = fd_patch_element(&batch->rbrc_patches, i);
*patch->cs = patch->val | val;
}
- util_dynarray_resize(&batch->rbrc_patches, 0);
+ util_dynarray_clear(&batch->rbrc_patches);
}
/* for rendering directly to system memory: */
struct fd_cs_patch *patch = fd_patch_element(&batch->draw_patches, i);
*patch->cs = patch->val | DRAW4(0, 0, 0, vismode);
}
- util_dynarray_resize(&batch->draw_patches, 0);
+ util_dynarray_clear(&batch->draw_patches);
}
/* for rendering directly to system memory: */
struct fd_cs_patch *patch = fd_patch_element(&batch->draw_patches, i);
*patch->cs = patch->val | DRAW4(0, 0, 0, vismode);
}
- util_dynarray_resize(&batch->draw_patches, 0);
+ util_dynarray_clear(&batch->draw_patches);
}
static void
struct fd_cs_patch *patch = fd_patch_element(&batch->fb_read_patches, i);
*patch->cs = patch->val | A6XX_TEX_CONST_2_PITCH(gmem->bin_w * gmem->cbuf_cpp[0]);
}
- util_dynarray_resize(&batch->fb_read_patches, 0);
+ util_dynarray_clear(&batch->fb_read_patches);
}
static void
struct fd_cs_patch *patch = fd_patch_element(&batch->draw_patches, i);
*patch->cs = patch->val | DRAW4(0, 0, 0, vismode);
}
- util_dynarray_resize(&batch->draw_patches, 0);
+ util_dynarray_clear(&batch->draw_patches);
}
static void