Lines Matching defs:pres
62 struct pipe_resource *pres;
75 pres = pscreen->resource_from_handle(pscreen, templat, &handle,
79 if (!pres) {
84 struct lima_resource *res = lima_resource(pres);
87 return pres;
95 struct pipe_resource *pres = &res->base;
99 unsigned depth = pres->depth0;
100 unsigned nr_samples = MAX2(pres->nr_samples, 1);
103 for (level = 0; level <= pres->last_level; level++) {
117 stride = util_format_get_stride(pres->format, aligned_width);
119 util_format_get_nblocksy(pres->format, aligned_height) *
120 pres->array_size * depth;
125 res->levels[level].layer_stride = util_format_get_stride(pres->format, align(width, 16)) * align(height, 16);
127 if (util_format_is_compressed(pres->format))
153 struct pipe_resource *pres;
163 pres = &res->base;
174 return pres;
220 struct pipe_resource *pres;
222 pres = lima_resource_create_scanout(pscreen, templat, width, height);
224 pres = lima_resource_create_bo(pscreen, templat, width, height, align_to_tile);
226 if (pres) {
227 struct lima_resource *res = lima_resource(pres);
233 debug_printf("%s: pres=%p width=%u height=%u depth=%u target=%d "
235 pres, pres->width0, pres->height0, pres->depth0,
236 pres->target, pres->bind, pres->usage, should_tile, templat->last_level);
238 return pres;
270 lima_resource_destroy(struct pipe_screen *pscreen, struct pipe_resource *pres)
273 struct lima_resource *res = lima_resource(pres);
312 struct pipe_resource *pres = &res->base;
313 *pres = *templat;
314 pres->screen = pscreen;
315 pipe_reference_init(&pres->reference, 1);
349 (pres->bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL))) {
352 width = align(pres->width0, 16);
353 height = align(pres->height0, 16);
354 stride = util_format_get_stride(pres->format, width);
355 size = util_format_get_2d_size(pres->format, stride, height);
383 res->levels[0].width = pres->width0;
391 renderonly_create_gpu_import_for_resource(pres,
397 return pres;
400 lima_resource_destroy(pscreen, pres);
407 struct pipe_resource *pres,
411 struct lima_resource *res = lima_resource(pres);
434 struct pipe_resource *pres,
439 struct lima_resource *res = lima_resource(pres);
473 get_damage_bound_box(struct pipe_resource *pres,
483 int ret = u_box_clip_2d(&b, &b, pres->width0, pres->height0);
487 get_scissor_from_box(bound, &b, pres->height0);
492 struct pipe_resource *pres,
496 struct lima_resource *res = lima_resource(pres);
518 rects[i].x + rects[i].width >= pres->width0 &&
519 rects[i].y + rects[i].height >= pres->height0)
524 get_damage_bound_box(pres, rects, nrects, bound);
532 pres->height0);
549 struct pipe_resource *pres,
563 pipe_resource_reference(&psurf->texture, pres);
567 psurf->width = u_minify(pres->width0, level);
568 psurf->height = u_minify(pres->height0, level);
599 struct pipe_resource *pres,
605 struct lima_screen *screen = lima_screen(pres->screen);
607 struct lima_resource *res = lima_resource(pres);
631 if (pres->bind & PIPE_BIND_VERTEX_BUFFER)
656 pipe_resource_reference(&ptrans->resource, pres);
664 ptrans->stride = util_format_get_stride(pres->format, ptrans->box.width);
671 unsigned row_height = util_format_is_compressed(pres->format) ? 4 : 16;
683 pres->format);
701 box->y / util_format_get_blockheight(pres->format) * ptrans->stride +
702 box->x / util_format_get_blockwidth(pres->format) *
703 util_format_get_blocksize(pres->format);
748 struct pipe_resource *pres;
751 pres = &res->base;
775 unsigned row_height = util_format_is_compressed(pres->format) ? 4 : 16;
786 pres->format);