Lines Matching refs:pres
60 struct pipe_resource *pres; in lima_resource_create_scanout() local
73 pres = pscreen->resource_from_handle(pscreen, templat, &handle, in lima_resource_create_scanout()
77 if (!pres) { in lima_resource_create_scanout()
82 struct lima_resource *res = lima_resource(pres); in lima_resource_create_scanout()
85 return pres; in lima_resource_create_scanout()
93 struct pipe_resource *pres = &res->base; in setup_miptree() local
97 unsigned depth = pres->depth0; in setup_miptree()
100 for (level = 0; level <= pres->last_level; level++) { in setup_miptree()
114 stride = util_format_get_stride(pres->format, aligned_width); in setup_miptree()
116 util_format_get_nblocksy(pres->format, aligned_height) * in setup_miptree()
117 pres->array_size * depth; in setup_miptree()
122 …res->levels[level].layer_stride = util_format_get_stride(pres->format, align(width, 16)) * align(h… in setup_miptree()
124 if (util_format_is_compressed(pres->format)) in setup_miptree()
130 if (level != pres->last_level) in setup_miptree()
151 struct pipe_resource *pres; in lima_resource_create_bo() local
161 pres = &res->base; in lima_resource_create_bo()
172 return pres; in lima_resource_create_bo()
218 struct pipe_resource *pres; in _lima_resource_create_with_modifiers() local
220 pres = lima_resource_create_scanout(pscreen, templat, width, height); in _lima_resource_create_with_modifiers()
222 pres = lima_resource_create_bo(pscreen, templat, width, height, in _lima_resource_create_with_modifiers()
225 if (pres) { in _lima_resource_create_with_modifiers()
226 struct lima_resource *res = lima_resource(pres); in _lima_resource_create_with_modifiers()
234 pres, pres->width0, pres->height0, pres->depth0, in _lima_resource_create_with_modifiers()
235 pres->target, pres->bind, pres->usage, should_tile, templat->last_level); in _lima_resource_create_with_modifiers()
237 return pres; in _lima_resource_create_with_modifiers()
269 lima_resource_destroy(struct pipe_screen *pscreen, struct pipe_resource *pres) in lima_resource_destroy() argument
272 struct lima_resource *res = lima_resource(pres); in lima_resource_destroy()
311 struct pipe_resource *pres = &res->base; in lima_resource_from_handle() local
312 *pres = *templat; in lima_resource_from_handle()
313 pres->screen = pscreen; in lima_resource_from_handle()
314 pipe_reference_init(&pres->reference, 1); in lima_resource_from_handle()
346 (pres->bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL))) { in lima_resource_from_handle()
349 width = align(pres->width0, 16); in lima_resource_from_handle()
350 height = align(pres->height0, 16); in lima_resource_from_handle()
351 stride = util_format_get_stride(pres->format, width); in lima_resource_from_handle()
352 size = util_format_get_2d_size(pres->format, stride, height); in lima_resource_from_handle()
362 res->levels[0].width = pres->width0; in lima_resource_from_handle()
364 return pres; in lima_resource_from_handle()
367 lima_resource_destroy(pscreen, pres); in lima_resource_from_handle()
374 struct pipe_resource *pres, in lima_resource_get_handle() argument
378 struct lima_resource *res = lima_resource(pres); in lima_resource_get_handle()
410 get_damage_bound_box(struct pipe_resource *pres, in get_damage_bound_box() argument
420 int ret = u_box_clip_2d(&b, &b, pres->width0, pres->height0); in get_damage_bound_box()
424 get_scissor_from_box(bound, &b, pres->height0); in get_damage_bound_box()
429 struct pipe_resource *pres, in lima_resource_set_damage_region() argument
433 struct lima_resource *res = lima_resource(pres); in lima_resource_set_damage_region()
455 rects[i].x + rects[i].width >= pres->width0 && in lima_resource_set_damage_region()
456 rects[i].y + rects[i].height >= pres->height0) in lima_resource_set_damage_region()
461 get_damage_bound_box(pres, rects, nrects, bound); in lima_resource_set_damage_region()
469 pres->height0); in lima_resource_set_damage_region()
497 struct pipe_resource *pres, in lima_surface_create() argument
511 pipe_resource_reference(&psurf->texture, pres); in lima_surface_create()
515 psurf->width = u_minify(pres->width0, level); in lima_surface_create()
516 psurf->height = u_minify(pres->height0, level); in lima_surface_create()
546 struct pipe_resource *pres, in lima_transfer_map() argument
552 struct lima_screen *screen = lima_screen(pres->screen); in lima_transfer_map()
554 struct lima_resource *res = lima_resource(pres); in lima_transfer_map()
578 if (pres->bind & PIPE_BIND_VERTEX_BUFFER) in lima_transfer_map()
604 pipe_resource_reference(&ptrans->resource, pres); in lima_transfer_map()
612 ptrans->stride = util_format_get_stride(pres->format, ptrans->box.width); in lima_transfer_map()
627 pres->format); in lima_transfer_map()
645 box->y / util_format_get_blockheight(pres->format) * ptrans->stride + in lima_transfer_map()
646 box->x / util_format_get_blockwidth(pres->format) * in lima_transfer_map()
647 util_format_get_blocksize(pres->format); in lima_transfer_map()
666 struct pipe_resource *pres; in lima_transfer_unmap_inner() local
669 pres = &res->base; in lima_transfer_unmap_inner()
680 pres->format); in lima_transfer_unmap_inner()