r600g: emit CS using radeon_winsys

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index 5bb515d..83e964b 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -134,10 +134,11 @@
 
 	assert(bo != NULL);
 
-	reloc_index = ctx->radeon->ws->trans_add_reloc(
-				ctx->cs, bo->cs_buf,
-				rbo->domains, rbo->domains,
-				(void**)&ctx->reloc, &ctx->creloc);
+	reloc_index =
+		ctx->radeon->ws->trans_add_reloc(ctx->cs, bo->cs_buf, rbo->domains, rbo->domains);
+
+	if (reloc_index >= ctx->creloc)
+		ctx->creloc = reloc_index+1;
 
 	radeon_bo_reference(ctx->radeon, &ctx->bo[reloc_index], bo);
 	return reloc_index * 4;