Lines Matching defs:template
341 struct pipe_resource *template;
357 template = &srf->template;
358 template->format = fdesc.format;
359 template->target = PIPE_TEXTURE_2D;
360 template->width0 = width;
361 template->height0 = height;
362 template->depth0 = 1;
363 template->array_size = 1;
364 template->last_level = 0;
365 template->bind = stype_bind[xa_format_type(fdesc.xa_format)];
368 template->bind |= PIPE_BIND_SHARED;
370 template->bind |= PIPE_BIND_RENDER_TARGET;
372 template->bind |= PIPE_BIND_SCANOUT;
375 srf->tex = xa->screen->resource_from_handle(xa->screen, template, whandle,
378 srf->tex = xa->screen->resource_create(xa->screen, template);
448 struct pipe_resource *template = &srf->template;
463 if (width == template->width0 && height == template->height0 &&
464 template->format == fdesc.format &&
468 template->bind = stype_bind[xa_format_type(fdesc.xa_format)];
470 template->bind |= PIPE_BIND_SHARED;
472 template->bind |= PIPE_BIND_RENDER_TARGET;
474 template->bind |= PIPE_BIND_SCANOUT;
483 template->bind |
488 save_width = template->width0;
489 save_height = template->height0;
490 save_format = template->format;
492 template->width0 = width;
493 template->height0 = height;
494 template->format = fdesc.format;
496 texture = xa->screen->resource_create(xa->screen, template);
498 template->width0 = save_width;
499 template->height0 = save_height;
500 template->format = save_format;
507 u_box_origin_2d(xa_min(save_width, template->width0),
508 xa_min(save_height, template->height0), &src_box);