Home | History | Annotate | Download | only in util

Lines Matching defs:buffer

29 /* A simple allocator that suballocates memory from a large buffer. */
43 unsigned size; /* Size of the whole buffer, in bytes. */
46 boolean zero_buffer_memory; /* If the buffer contents should be zeroed. */
48 struct pipe_resource *buffer; /* The buffer we suballocate from. */
56 * \p zero_buffer_memory determines whether the buffer contents should be
79 pipe_resource_reference(&allocator->buffer, NULL);
90 /* Don't allow allocations larger than the buffer size. */
94 /* Make sure we have enough space in the buffer. */
95 if (!allocator->buffer ||
97 /* Allocate a new buffer. */
98 pipe_resource_reference(&allocator->buffer, NULL);
100 allocator->buffer =
103 if (!allocator->buffer)
111 ptr = pipe_buffer_map(allocator->pipe, allocator->buffer,
119 assert(allocator->offset < allocator->buffer->width0);
120 assert(allocator->offset + size <= allocator->buffer->width0);
122 /* Return the buffer. */
124 pipe_resource_reference(outbuf, allocator->buffer);