info->start,
info->start_instance);
- /* On large client-buffer draw, we used client buffer directly, without
+ /* On client-buffer draw, we used client buffer directly, without
* copy. Block until draw is finished.
* VMD is an example application that benefits from this. */
- if (ctx->dirty & SWR_LARGE_CLIENT_DRAW) {
+ if (ctx->dirty & SWR_BLOCK_CLIENT_DRAW) {
struct swr_screen *screen = swr_screen(pipe->screen);
swr_fence_submit(ctx, screen->flush_fence);
swr_fence_finish(pipe->screen, NULL, screen->flush_fence, 0);
partial_inbounds = 0;
min_vertex_index = info.min_index + info.index_bias;
- size = AlignUp(size, 4);
- /* If size of client memory copy is too large, don't copy. The
- * draw will access user-buffer directly and then block. This is
- * faster than queuing many large client draws. */
- if (size >= screen->client_copy_limit) {
- post_update_dirty_flags |= SWR_LARGE_CLIENT_DRAW;
- p_data = (const uint8_t *) vb->buffer.user;
- } else {
- /* Copy only needed vertices to scratch space */
- const void *ptr = (const uint8_t *) vb->buffer.user + base;
- ptr = (uint8_t *)swr_copy_to_scratch_space(
- ctx, &ctx->scratch->vertex_buffer, ptr, size);
- p_data = (const uint8_t *)ptr - base;
- }
+ /* Use user memory directly. The draw will access user-buffer
+ * directly and then block. It's easier and usually
+ * faster than copying.
+ */
+ post_update_dirty_flags |= SWR_BLOCK_CLIENT_DRAW;
+ p_data = (const uint8_t *) vb->buffer.user;
} else if (vb->buffer.resource) {
/* VBO */
if (!pitch) {
post_update_dirty_flags |= SWR_NEW_VERTEX;
size = info.count * pitch;
- size = AlignUp(size, 4);
- /* If size of client memory copy is too large, don't copy. The
- * draw will access user-buffer directly and then block. This is
- * faster than queuing many large client draws. */
- if (size >= screen->client_copy_limit) {
- post_update_dirty_flags |= SWR_LARGE_CLIENT_DRAW;
- p_data = (const uint8_t *) info.index.user;
- } else {
- /* Copy indices to scratch space */
- const void *ptr = info.index.user;
- ptr = swr_copy_to_scratch_space(
- ctx, &ctx->scratch->index_buffer, ptr, size);
- p_data = (const uint8_t *)ptr;
- }
+
+ /* Use user memory directly. The draw will access user-buffer
+ * directly and then block. It's easier and usually
+ * faster than copying.
+ */
+ post_update_dirty_flags |= SWR_BLOCK_CLIENT_DRAW;
+ p_data = (const uint8_t *) info.index.user;
}
SWR_INDEX_BUFFER_STATE swrIndexBuffer;