Lines Matching refs:res
38 void testvirgl_init_simple_1d_resource(struct virgl_renderer_resource_create_args *res, int handle) in testvirgl_init_simple_1d_resource() argument
40 res->handle = handle; in testvirgl_init_simple_1d_resource()
41 res->target = PIPE_TEXTURE_1D; in testvirgl_init_simple_1d_resource()
42 res->format = PIPE_FORMAT_B8G8R8X8_UNORM; in testvirgl_init_simple_1d_resource()
43 res->width = 50; in testvirgl_init_simple_1d_resource()
44 res->height = 1; in testvirgl_init_simple_1d_resource()
45 res->depth = 1; in testvirgl_init_simple_1d_resource()
46 res->array_size = 1; in testvirgl_init_simple_1d_resource()
47 res->last_level = 0; in testvirgl_init_simple_1d_resource()
48 res->nr_samples = 0; in testvirgl_init_simple_1d_resource()
49 res->bind = PIPE_BIND_SAMPLER_VIEW; in testvirgl_init_simple_1d_resource()
50 res->flags = 0; in testvirgl_init_simple_1d_resource()
53 void testvirgl_init_simple_buffer_sized(struct virgl_renderer_resource_create_args *res, int handle… in testvirgl_init_simple_buffer_sized() argument
55 res->handle = handle; in testvirgl_init_simple_buffer_sized()
56 res->target = PIPE_BUFFER; in testvirgl_init_simple_buffer_sized()
57 res->format = PIPE_FORMAT_R8_UNORM; in testvirgl_init_simple_buffer_sized()
58 res->width = width; in testvirgl_init_simple_buffer_sized()
59 res->height = 1; in testvirgl_init_simple_buffer_sized()
60 res->depth = 1; in testvirgl_init_simple_buffer_sized()
61 res->array_size = 1; in testvirgl_init_simple_buffer_sized()
62 res->last_level = 0; in testvirgl_init_simple_buffer_sized()
63 res->nr_samples = 0; in testvirgl_init_simple_buffer_sized()
64 res->bind = 0; in testvirgl_init_simple_buffer_sized()
65 res->flags = 0; in testvirgl_init_simple_buffer_sized()
68 void testvirgl_init_simple_buffer(struct virgl_renderer_resource_create_args *res, int handle) in testvirgl_init_simple_buffer() argument
70 testvirgl_init_simple_buffer_sized(res, handle, 50); in testvirgl_init_simple_buffer()
73 void testvirgl_init_simple_2d_resource(struct virgl_renderer_resource_create_args *res, int handle) in testvirgl_init_simple_2d_resource() argument
75 res->handle = handle; in testvirgl_init_simple_2d_resource()
76 res->target = PIPE_TEXTURE_2D; in testvirgl_init_simple_2d_resource()
77 res->format = PIPE_FORMAT_B8G8R8X8_UNORM; in testvirgl_init_simple_2d_resource()
78 res->width = 50; in testvirgl_init_simple_2d_resource()
79 res->height = 50; in testvirgl_init_simple_2d_resource()
80 res->depth = 1; in testvirgl_init_simple_2d_resource()
81 res->array_size = 1; in testvirgl_init_simple_2d_resource()
82 res->last_level = 0; in testvirgl_init_simple_2d_resource()
83 res->nr_samples = 0; in testvirgl_init_simple_2d_resource()
84 res->bind = PIPE_BIND_SAMPLER_VIEW; in testvirgl_init_simple_2d_resource()
85 res->flags = 0; in testvirgl_init_simple_2d_resource()
177 int testvirgl_create_backed_simple_2d_res(struct virgl_resource *res, in testvirgl_create_backed_simple_2d_res() argument
190 res->handle = handle; in testvirgl_create_backed_simple_2d_res()
191 res->base.target = args.target; in testvirgl_create_backed_simple_2d_res()
192 res->base.format = args.format; in testvirgl_create_backed_simple_2d_res()
194 backing_size = args.width * args.height * util_format_get_blocksize(res->base.format); in testvirgl_create_backed_simple_2d_res()
195 res->iovs = malloc(sizeof(struct iovec)); in testvirgl_create_backed_simple_2d_res()
197 res->iovs[0].iov_base = malloc(backing_size); in testvirgl_create_backed_simple_2d_res()
198 res->iovs[0].iov_len = backing_size; in testvirgl_create_backed_simple_2d_res()
199 res->niovs = 1; in testvirgl_create_backed_simple_2d_res()
201 virgl_renderer_resource_attach_iov(res->handle, res->iovs, res->niovs); in testvirgl_create_backed_simple_2d_res()
205 int testvirgl_create_backed_simple_1d_res(struct virgl_resource *res, in testvirgl_create_backed_simple_1d_res() argument
216 res->handle = handle; in testvirgl_create_backed_simple_1d_res()
217 res->base.target = args.target; in testvirgl_create_backed_simple_1d_res()
218 res->base.format = args.format; in testvirgl_create_backed_simple_1d_res()
220 backing_size = args.width * util_format_get_blocksize(res->base.format); in testvirgl_create_backed_simple_1d_res()
221 res->iovs = malloc(sizeof(struct iovec)); in testvirgl_create_backed_simple_1d_res()
223 res->iovs[0].iov_base = malloc(backing_size); in testvirgl_create_backed_simple_1d_res()
224 res->iovs[0].iov_len = backing_size; in testvirgl_create_backed_simple_1d_res()
225 res->niovs = 1; in testvirgl_create_backed_simple_1d_res()
227 virgl_renderer_resource_attach_iov(res->handle, res->iovs, res->niovs); in testvirgl_create_backed_simple_1d_res()
231 void testvirgl_destroy_backed_res(struct virgl_resource *res) in testvirgl_destroy_backed_res() argument
236 virgl_renderer_resource_detach_iov(res->handle, &iovs, &niovs); in testvirgl_destroy_backed_res()
240 virgl_renderer_resource_unref(res->handle); in testvirgl_destroy_backed_res()
243 int testvirgl_create_backed_simple_buffer(struct virgl_resource *res, in testvirgl_create_backed_simple_buffer() argument
255 res->handle = handle; in testvirgl_create_backed_simple_buffer()
256 res->base.target = args.target; in testvirgl_create_backed_simple_buffer()
257 res->base.format = args.format; in testvirgl_create_backed_simple_buffer()
258 res->base.bind = args.bind; in testvirgl_create_backed_simple_buffer()
259 backing_size = args.width * args.height * util_format_get_blocksize(res->base.format); in testvirgl_create_backed_simple_buffer()
260 res->iovs = malloc(sizeof(struct iovec)); in testvirgl_create_backed_simple_buffer()
262 res->iovs[0].iov_base = malloc(backing_size); in testvirgl_create_backed_simple_buffer()
263 res->iovs[0].iov_len = backing_size; in testvirgl_create_backed_simple_buffer()
264 res->niovs = 1; in testvirgl_create_backed_simple_buffer()
266 virgl_renderer_resource_attach_iov(res->handle, res->iovs, res->niovs); in testvirgl_create_backed_simple_buffer()