Lines Matching defs:drawable

81    struct dri_drawable *drawable = dri_drawable(dPriv);
84 drawable->dPriv->lastStamp = drawable->dPriv->dri2.stamp;
85 drawable->texture_mask = 0;
87 p_atomic_inc(&drawable->base.stamp);
102 dri2_drawable_get_buffers(struct dri_drawable *drawable,
106 __DRIdrawable *dri_drawable = drawable->dPriv;
107 const __DRIdri2LoaderExtension *loader = drawable->sPriv->dri2.loader;
116 with_format = dri_with_format(drawable->sPriv);
129 dri_drawable_get_format(drawable, atts[i], &format, &bind);
213 dri_image_drawable_get_buffers(struct dri_drawable *drawable,
218 dri_image_drawable_get_buffers(struct dri_drawable *drawable,
223 __DRIdrawable *dPriv = drawable->dPriv;
224 __DRIscreen *sPriv = drawable->sPriv;
231 dri_drawable_get_format(drawable, statts[i], &pf, &bind);
290 (uint32_t *) &drawable->base.stamp,
436 struct dri_drawable *drawable,
440 __DRIscreen *sPriv = drawable->sPriv;
441 __DRIdrawable *dri_drawable = drawable->dPriv;
458 if (!dri_image_drawable_get_buffers(drawable, &images,
463 buffers = dri2_drawable_get_buffers(drawable, statts, &num_buffers);
464 if (!buffers || (drawable->old_num == num_buffers &&
465 drawable->old_w == dri_drawable->w &&
466 drawable->old_h == dri_drawable->h &&
467 memcmp(drawable->old, buffers,
491 if (i != ST_ATTACHMENT_DEPTH_STENCIL && drawable->textures[i]) {
493 pipe->flush_resource(pipe, drawable->textures[i]);
496 pipe_resource_reference(&drawable->textures[i], NULL);
499 if (drawable->stvis.samples > 1) {
513 pipe_resource_reference(&drawable->msaa_textures[i], NULL);
518 /* Third use the buffers retrieved to fill the drawable info */
529 &drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
541 &drawable->textures[ST_ATTACHMENT_BACK_LEFT];
553 &drawable->textures[ST_ATTACHMENT_BACK_LEFT];
598 dri_drawable_get_format(drawable, statt, &format, &bind);
617 drawable->textures[statt] =
621 assert(drawable->textures[statt]);
626 if (drawable->stvis.samples > 1) {
633 if (drawable->textures[statt]) {
634 templ.format = drawable->textures[statt]->format;
635 templ.bind = drawable->textures[statt]->bind &
637 templ.nr_samples = drawable->stvis.samples;
638 templ.nr_storage_samples = drawable->stvis.samples;
643 if (!drawable->msaa_textures[statt] ||
644 drawable->msaa_textures[statt]->width0 != templ.width0 ||
645 drawable->msaa_textures[statt]->height0 != templ.height0) {
647 pipe_resource_reference(&drawable->msaa_textures[statt], NULL);
649 drawable->msaa_textures[statt] =
652 assert(drawable->msaa_textures[statt]);
665 drawable->msaa_textures[statt],
666 drawable->textures[statt]);
670 pipe_resource_reference(&drawable->msaa_textures[statt], NULL);
682 dri_drawable_get_format(drawable, statt, &format, &bind);
688 if (drawable->stvis.samples > 1) {
689 templ.nr_samples = drawable->stvis.samples;
690 templ.nr_storage_samples = drawable->stvis.samples;
691 zsbuf = &drawable->msaa_textures[statt];
696 zsbuf = &drawable->textures[statt];
713 pipe_resource_reference(&drawable->msaa_textures[statt], NULL);
714 pipe_resource_reference(&drawable->textures[statt], NULL);
719 * To prevent useless imports of gem names, drawable->old* is used
726 drawable->old_num = num_buffers;
727 drawable->old_w = dri_drawable->w;
728 drawable->old_h = dri_drawable->h;
729 memcpy(drawable->old, buffers, sizeof(__DRIbuffer) * num_buffers);
735 struct dri_drawable *drawable,
738 __DRIdrawable *dri_drawable = drawable->dPriv;
739 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader;
740 const __DRIdri2LoaderExtension *loader = drawable->sPriv->dri2.loader;
742 drawable->sPriv->mutableRenderBuffer.loader;
755 if (drawable->stvis.samples > 1) {
757 dri_pipe_blit(ctx->st->pipe, drawable->textures[statt],
758 drawable->msaa_textures[statt]);
761 if (drawable->textures[statt]) {
762 pipe->flush_resource(pipe, drawable->textures[statt]);
797 struct dri_drawable *drawable)
799 __DRIdrawable *dri_drawable = drawable->dPriv;
800 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader;
808 dri2_update_tex_buffer(struct dri_drawable *drawable,
2206 struct dri_drawable *drawable = dri_drawable(dPriv);
2220 FREE(drawable->damage_rects);
2221 drawable->damage_rects = boxes;
2222 drawable->num_damage_rects = nrects;
2225 if (drawable->texture_stamp == drawable->dPriv->lastStamp &&
2226 (drawable->texture_mask & (1 << ST_ATTACHMENT_BACK_LEFT))) {
2227 struct pipe_screen *screen = drawable->screen->base.screen;
2230 if (drawable->stvis.samples > 1)
2231 resource = drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT];
2233 resource = drawable->textures[ST_ATTACHMENT_BACK_LEFT];
2236 drawable->num_damage_rects,
2237 drawable->damage_rects);
2580 struct dri_drawable *drawable = NULL;
2585 drawable = dPriv->driverPrivate;
2587 drawable->allocate_textures = dri2_allocate_textures;
2588 drawable->flush_frontbuffer = dri2_flush_frontbuffer;
2589 drawable->update_tex_buffer = dri2_update_tex_buffer;
2590 drawable->flush_swapbuffers = dri2_flush_swapbuffers;