• Home
  • Raw
  • Download

Lines Matching refs:pres

273         struct panfrost_resource *pres = pan_resource(res);  in panfrost_create_scanout_res()  local
275 pres->scanout = scanout; in panfrost_create_scanout_res()
283 panfrost_setup_slices(struct panfrost_resource *pres, size_t *bo_size) in panfrost_setup_slices() argument
285 struct pipe_resource *res = &pres->base; in panfrost_setup_slices()
289 unsigned bytes_per_pixel = util_format_get_blocksize(pres->internal_format); in panfrost_setup_slices()
311 bool afbc = drm_is_afbc(pres->modifier); in panfrost_setup_slices()
312 bool tiled = pres->modifier == DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED; in panfrost_setup_slices()
313 bool linear = pres->modifier == DRM_FORMAT_MOD_LINEAR; in panfrost_setup_slices()
327 struct panfrost_slice *slice = &pres->slices[l]; in panfrost_setup_slices()
350 if (util_format_is_compressed(pres->internal_format)) in panfrost_setup_slices()
380 if (pres->checksummed) { in panfrost_setup_slices()
402 pres->cubemap_stride = ALIGN_POT(offset, 64); in panfrost_setup_slices()
404 *bo_size = ALIGN_POT(pres->cubemap_stride * res->array_size, 4096); in panfrost_setup_slices()
409 pres->cubemap_stride = size_2d; in panfrost_setup_slices()
426 panfrost_can_linear(struct panfrost_device *dev, const struct panfrost_resource *pres) in panfrost_can_linear() argument
429 return !((pres->base.bind & PIPE_BIND_DEPTH_STENCIL) && in panfrost_can_linear()
434 panfrost_should_afbc(struct panfrost_device *dev, const struct panfrost_resource *pres) in panfrost_should_afbc() argument
447 if (pres->base.bind & ~valid_binding) in panfrost_should_afbc()
455 if (pres->base.usage == PIPE_USAGE_STREAM) in panfrost_should_afbc()
459 if (!panfrost_format_supports_afbc(pres->internal_format)) in panfrost_should_afbc()
464 if (pres->base.nr_samples > 1) in panfrost_should_afbc()
468 if ((pres->base.target != PIPE_TEXTURE_2D) && (pres->base.target != PIPE_TEXTURE_RECT)) in panfrost_should_afbc()
472 if (pres->base.width0 <= 16 && pres->base.height0 <= 16) in panfrost_should_afbc()
481 panfrost_should_tile(struct panfrost_device *dev, const struct panfrost_resource *pres) in panfrost_should_tile() argument
492 unsigned bpp = util_format_get_blocksizebits(pres->internal_format); in panfrost_should_tile()
498 bool is_2d = (pres->base.target == PIPE_TEXTURE_2D) in panfrost_should_tile()
499 || (pres->base.target == PIPE_TEXTURE_RECT); in panfrost_should_tile()
501 bool can_tile = is_2d && is_sane_bpp && ((pres->base.bind & ~valid_binding) == 0); in panfrost_should_tile()
503 if (!panfrost_can_linear(dev, pres)) { in panfrost_should_tile()
508 return can_tile && (pres->base.usage != PIPE_USAGE_STREAM); in panfrost_should_tile()
513 const struct panfrost_resource *pres) in panfrost_best_modifier() argument
515 if (panfrost_should_afbc(dev, pres)) { in panfrost_best_modifier()
520 if (panfrost_afbc_can_ytr(pres->base.format)) in panfrost_best_modifier()
524 } else if (panfrost_should_tile(dev, pres)) in panfrost_best_modifier()
531 panfrost_resource_setup(struct panfrost_device *dev, struct panfrost_resource *pres, in panfrost_resource_setup() argument
534 pres->modifier = (modifier != DRM_FORMAT_MOD_INVALID) ? modifier : in panfrost_resource_setup()
535 panfrost_best_modifier(dev, pres); in panfrost_resource_setup()
536 pres->checksummed = (pres->base.bind & PIPE_BIND_RENDER_TARGET); in panfrost_resource_setup()
541 pres->modifier_constant = !((pres->modifier != DRM_FORMAT_MOD_LINEAR) in panfrost_resource_setup()
543 && panfrost_can_linear(dev, pres)); in panfrost_resource_setup()
545 panfrost_setup_slices(pres, bo_size); in panfrost_resource_setup()
554 struct panfrost_resource *pres = pan_resource(res); in panfrost_resource_set_damage_region() local
555 struct pipe_scissor_state *damage_extent = &pres->damage.extent; in panfrost_resource_set_damage_region()
558 if (pres->damage.inverted_rects) in panfrost_resource_set_damage_region()
559 ralloc_free(pres->damage.inverted_rects); in panfrost_resource_set_damage_region()
561 memset(&pres->damage, 0, sizeof(pres->damage)); in panfrost_resource_set_damage_region()
563 pres->damage.inverted_rects = in panfrost_resource_set_damage_region()
564 pan_subtract_damage(pres, in panfrost_resource_set_damage_region()
566 nrects, rects, &pres->damage.inverted_len); in panfrost_resource_set_damage_region()