gem_stress: avoid division by 0

Without this height would be 16 with the minimal buffer size.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2011-06-06 20:16:35 +02:00
parent fde66f9bf4
commit 1095a825c0

View File

@ -408,7 +408,7 @@ static void init_buffer(struct scratch_buf *buf, unsigned size)
buf->bo = drm_intel_bo_alloc(bufmgr, "tiled bo", size, 4096);
assert(buf->bo);
buf->tiling = I915_TILING_NONE;
buf->stride = 8192;
buf->stride = 4096;
if (options.no_hw)
buf->data = malloc(size);