Lines Matching refs:drawable
80 struct dri_drawable *drawable = dri_drawable(dPriv); in dri2_invalidate_drawable() local
83 drawable->dPriv->lastStamp = drawable->dPriv->dri2.stamp; in dri2_invalidate_drawable()
84 drawable->texture_mask = 0; in dri2_invalidate_drawable()
86 p_atomic_inc(&drawable->base.stamp); in dri2_invalidate_drawable()
101 dri2_drawable_get_buffers(struct dri_drawable *drawable, in dri2_drawable_get_buffers() argument
105 __DRIdrawable *dri_drawable = drawable->dPriv; in dri2_drawable_get_buffers()
106 const __DRIdri2LoaderExtension *loader = drawable->sPriv->dri2.loader; in dri2_drawable_get_buffers()
115 with_format = dri_with_format(drawable->sPriv); in dri2_drawable_get_buffers()
128 dri_drawable_get_format(drawable, atts[i], &format, &bind); in dri2_drawable_get_buffers()
212 dri_image_drawable_get_buffers(struct dri_drawable *drawable, in dri_image_drawable_get_buffers() argument
217 __DRIdrawable *dPriv = drawable->dPriv; in dri_image_drawable_get_buffers()
218 __DRIscreen *sPriv = drawable->sPriv; in dri_image_drawable_get_buffers()
225 dri_drawable_get_format(drawable, statts[i], &pf, &bind); in dri_image_drawable_get_buffers()
284 (uint32_t *) &drawable->base.stamp, in dri_image_drawable_get_buffers()
396 struct dri_drawable *drawable, in dri2_allocate_textures() argument
400 __DRIscreen *sPriv = drawable->sPriv; in dri2_allocate_textures()
401 __DRIdrawable *dri_drawable = drawable->dPriv; in dri2_allocate_textures()
418 if (!dri_image_drawable_get_buffers(drawable, &images, in dri2_allocate_textures()
423 buffers = dri2_drawable_get_buffers(drawable, statts, &num_buffers); in dri2_allocate_textures()
424 if (!buffers || (drawable->old_num == num_buffers && in dri2_allocate_textures()
425 drawable->old_w == dri_drawable->w && in dri2_allocate_textures()
426 drawable->old_h == dri_drawable->h && in dri2_allocate_textures()
427 memcmp(drawable->old, buffers, in dri2_allocate_textures()
451 if (i != ST_ATTACHMENT_DEPTH_STENCIL && drawable->textures[i]) { in dri2_allocate_textures()
453 pipe->flush_resource(pipe, drawable->textures[i]); in dri2_allocate_textures()
456 pipe_resource_reference(&drawable->textures[i], NULL); in dri2_allocate_textures()
459 if (drawable->stvis.samples > 1) { in dri2_allocate_textures()
473 pipe_resource_reference(&drawable->msaa_textures[i], NULL); in dri2_allocate_textures()
489 &drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; in dri2_allocate_textures()
500 &drawable->textures[ST_ATTACHMENT_BACK_LEFT]; in dri2_allocate_textures()
511 &drawable->textures[ST_ATTACHMENT_BACK_LEFT]; in dri2_allocate_textures()
555 dri_drawable_get_format(drawable, statt, &format, &bind); in dri2_allocate_textures()
574 drawable->textures[statt] = in dri2_allocate_textures()
578 assert(drawable->textures[statt]); in dri2_allocate_textures()
583 if (drawable->stvis.samples > 1) { in dri2_allocate_textures()
590 if (drawable->textures[statt]) { in dri2_allocate_textures()
591 templ.format = drawable->textures[statt]->format; in dri2_allocate_textures()
592 templ.bind = drawable->textures[statt]->bind & in dri2_allocate_textures()
594 templ.nr_samples = drawable->stvis.samples; in dri2_allocate_textures()
595 templ.nr_storage_samples = drawable->stvis.samples; in dri2_allocate_textures()
600 if (!drawable->msaa_textures[statt] || in dri2_allocate_textures()
601 drawable->msaa_textures[statt]->width0 != templ.width0 || in dri2_allocate_textures()
602 drawable->msaa_textures[statt]->height0 != templ.height0) { in dri2_allocate_textures()
604 pipe_resource_reference(&drawable->msaa_textures[statt], NULL); in dri2_allocate_textures()
606 drawable->msaa_textures[statt] = in dri2_allocate_textures()
609 assert(drawable->msaa_textures[statt]); in dri2_allocate_textures()
622 drawable->msaa_textures[statt], in dri2_allocate_textures()
623 drawable->textures[statt]); in dri2_allocate_textures()
627 pipe_resource_reference(&drawable->msaa_textures[statt], NULL); in dri2_allocate_textures()
639 dri_drawable_get_format(drawable, statt, &format, &bind); in dri2_allocate_textures()
645 if (drawable->stvis.samples > 1) { in dri2_allocate_textures()
646 templ.nr_samples = drawable->stvis.samples; in dri2_allocate_textures()
647 templ.nr_storage_samples = drawable->stvis.samples; in dri2_allocate_textures()
648 zsbuf = &drawable->msaa_textures[statt]; in dri2_allocate_textures()
653 zsbuf = &drawable->textures[statt]; in dri2_allocate_textures()
670 pipe_resource_reference(&drawable->msaa_textures[statt], NULL); in dri2_allocate_textures()
671 pipe_resource_reference(&drawable->textures[statt], NULL); in dri2_allocate_textures()
683 drawable->old_num = num_buffers; in dri2_allocate_textures()
684 drawable->old_w = dri_drawable->w; in dri2_allocate_textures()
685 drawable->old_h = dri_drawable->h; in dri2_allocate_textures()
686 memcpy(drawable->old, buffers, sizeof(__DRIbuffer) * num_buffers); in dri2_allocate_textures()
692 struct dri_drawable *drawable, in dri2_flush_frontbuffer() argument
695 __DRIdrawable *dri_drawable = drawable->dPriv; in dri2_flush_frontbuffer()
696 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader; in dri2_flush_frontbuffer()
697 const __DRIdri2LoaderExtension *loader = drawable->sPriv->dri2.loader; in dri2_flush_frontbuffer()
699 drawable->sPriv->mutableRenderBuffer.loader; in dri2_flush_frontbuffer()
712 if (drawable->stvis.samples > 1) { in dri2_flush_frontbuffer()
714 dri_pipe_blit(ctx->st->pipe, drawable->textures[statt], in dri2_flush_frontbuffer()
715 drawable->msaa_textures[statt]); in dri2_flush_frontbuffer()
718 if (drawable->textures[statt]) { in dri2_flush_frontbuffer()
719 pipe->flush_resource(pipe, drawable->textures[statt]); in dri2_flush_frontbuffer()
754 struct dri_drawable *drawable) in dri2_flush_swapbuffers() argument
756 __DRIdrawable *dri_drawable = drawable->dPriv; in dri2_flush_swapbuffers()
757 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader; in dri2_flush_swapbuffers()
765 dri2_update_tex_buffer(struct dri_drawable *drawable, in dri2_update_tex_buffer() argument
2084 struct dri_drawable *drawable = dri_drawable(dPriv); in dri2_set_damage_region() local
2098 FREE(drawable->damage_rects); in dri2_set_damage_region()
2099 drawable->damage_rects = boxes; in dri2_set_damage_region()
2100 drawable->num_damage_rects = nrects; in dri2_set_damage_region()
2103 if (drawable->texture_stamp == drawable->dPriv->lastStamp && in dri2_set_damage_region()
2104 (drawable->texture_mask & (1 << ST_ATTACHMENT_BACK_LEFT))) { in dri2_set_damage_region()
2105 struct pipe_screen *screen = drawable->screen->base.screen; in dri2_set_damage_region()
2108 if (drawable->stvis.samples > 1) in dri2_set_damage_region()
2109 resource = drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]; in dri2_set_damage_region()
2111 resource = drawable->textures[ST_ATTACHMENT_BACK_LEFT]; in dri2_set_damage_region()
2114 drawable->num_damage_rects, in dri2_set_damage_region()
2115 drawable->damage_rects); in dri2_set_damage_region()
2453 struct dri_drawable *drawable = NULL; in dri2_create_buffer() local
2458 drawable = dPriv->driverPrivate; in dri2_create_buffer()
2460 drawable->allocate_textures = dri2_allocate_textures; in dri2_create_buffer()
2461 drawable->flush_frontbuffer = dri2_flush_frontbuffer; in dri2_create_buffer()
2462 drawable->update_tex_buffer = dri2_update_tex_buffer; in dri2_create_buffer()
2463 drawable->flush_swapbuffers = dri2_flush_swapbuffers; in dri2_create_buffer()