lib: Clean the batch buffer store after reset

Otherwise the stale data in the buffer

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Xiang, Haihao 2013-12-06 16:54:44 +08:00 committed by Damien Lespiau
parent 509850bf48
commit 4570e1b3de

View File

@ -50,6 +50,8 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
batch->bo = drm_intel_bo_alloc(batch->bufmgr, "batchbuffer", batch->bo = drm_intel_bo_alloc(batch->bufmgr, "batchbuffer",
BATCH_SZ, 4096); BATCH_SZ, 4096);
memset(batch->buffer, 0, sizeof(batch->buffer));
batch->ptr = batch->buffer; batch->ptr = batch->buffer;
} }