search for: tf_map

Displaying 3 results from an estimated 3 matches for "tf_map".

2014 May 26
1
[PATCH V2] nvc0: implement clear_buffer
...offset, unsigned size, + const void *data, int data_size) +{ + struct nv04_resource *buf = nv04_resource(res); + struct pipe_transfer *pt; + struct pipe_box box; + unsigned elements, i; + + elements = size / data_size; + + u_box_1d(0, size, &box); + + uint8_t *tf_map = buf->vtbl->transfer_map(pipe, res, + 0, PIPE_TRANSFER_WRITE, &box, &pt); + + for (i = 0; i < elements ; ++i) { + memcpy(&tf_map[i*data_size], data, data_size); + } + buf->vtbl->transfer_unmap(pipe, pt); +} + +static void +nvc0_clear_buffer(struct p...
2014 May 26
2
Implement buffer_clear for nvc0
Hi, please review the following patch! Thanks, Tobias Klausmann
2014 May 26
0
[PATCH] nvc0: Implement buffer_clear for this type of hardware
...nalled(buf->fence_wr)) + nouveau_fence_wait(buf->fence_wr); + + memcpy(&color.ui, data, 12); + memset(&color.ui[3], 0, 4); + + elements = size / data_size; + + memset(&pb, 0, sizeof(pb)); + pb.height = elements; + pb.width = 1; + + uint8_t *tf_map = buf->vtbl->transfer_map(pipe, res, + 0, PIPE_TRANSFER_WRITE, &pb, &pt); + + for (i = 0; i < elements ; ++i) { + memcpy(&tf_map[i*12],color.f,12); + } + buf->vtbl->transfer_unmap(pipe, pt); +} + +static void +nvc0_clear_buffer(struct pip...