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()
114 with_format = dri_with_format(drawable->sPriv); in dri2_drawable_get_buffers()
127 dri_drawable_get_format(drawable, atts[i], &format, &bind); in dri2_drawable_get_buffers()
211 dri_image_drawable_get_buffers(struct dri_drawable *drawable, in dri_image_drawable_get_buffers() argument
216 __DRIdrawable *dPriv = drawable->dPriv; in dri_image_drawable_get_buffers()
217 __DRIscreen *sPriv = drawable->sPriv; in dri_image_drawable_get_buffers()
224 dri_drawable_get_format(drawable, statts[i], &pf, &bind); in dri_image_drawable_get_buffers()
283 (uint32_t *) &drawable->base.stamp, in dri_image_drawable_get_buffers()
395 struct dri_drawable *drawable, in dri2_allocate_textures() argument
399 __DRIscreen *sPriv = drawable->sPriv; in dri2_allocate_textures()
400 __DRIdrawable *dri_drawable = drawable->dPriv; in dri2_allocate_textures()
415 if (!dri_image_drawable_get_buffers(drawable, &images, in dri2_allocate_textures()
420 buffers = dri2_drawable_get_buffers(drawable, statts, &num_buffers); in dri2_allocate_textures()
421 if (!buffers || (drawable->old_num == num_buffers && in dri2_allocate_textures()
422 drawable->old_w == dri_drawable->w && in dri2_allocate_textures()
423 drawable->old_h == dri_drawable->h && in dri2_allocate_textures()
424 memcmp(drawable->old, buffers, in dri2_allocate_textures()
448 if (i != ST_ATTACHMENT_DEPTH_STENCIL && drawable->textures[i]) { in dri2_allocate_textures()
450 pipe->flush_resource(pipe, drawable->textures[i]); in dri2_allocate_textures()
453 pipe_resource_reference(&drawable->textures[i], NULL); in dri2_allocate_textures()
456 if (drawable->stvis.samples > 1) { in dri2_allocate_textures()
470 pipe_resource_reference(&drawable->msaa_textures[i], NULL); in dri2_allocate_textures()
486 &drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; in dri2_allocate_textures()
497 &drawable->textures[ST_ATTACHMENT_BACK_LEFT]; in dri2_allocate_textures()
537 dri_drawable_get_format(drawable, statt, &format, &bind); in dri2_allocate_textures()
556 drawable->textures[statt] = in dri2_allocate_textures()
560 assert(drawable->textures[statt]); in dri2_allocate_textures()
565 if (drawable->stvis.samples > 1) { in dri2_allocate_textures()
572 if (drawable->textures[statt]) { in dri2_allocate_textures()
573 templ.format = drawable->textures[statt]->format; in dri2_allocate_textures()
574 templ.bind = drawable->textures[statt]->bind & in dri2_allocate_textures()
576 templ.nr_samples = drawable->stvis.samples; in dri2_allocate_textures()
577 templ.nr_storage_samples = drawable->stvis.samples; in dri2_allocate_textures()
582 if (!drawable->msaa_textures[statt] || in dri2_allocate_textures()
583 drawable->msaa_textures[statt]->width0 != templ.width0 || in dri2_allocate_textures()
584 drawable->msaa_textures[statt]->height0 != templ.height0) { in dri2_allocate_textures()
586 pipe_resource_reference(&drawable->msaa_textures[statt], NULL); in dri2_allocate_textures()
588 drawable->msaa_textures[statt] = in dri2_allocate_textures()
591 assert(drawable->msaa_textures[statt]); in dri2_allocate_textures()
604 drawable->msaa_textures[statt], in dri2_allocate_textures()
605 drawable->textures[statt]); in dri2_allocate_textures()
609 pipe_resource_reference(&drawable->msaa_textures[statt], NULL); in dri2_allocate_textures()
621 dri_drawable_get_format(drawable, statt, &format, &bind); in dri2_allocate_textures()
627 if (drawable->stvis.samples > 1) { in dri2_allocate_textures()
628 templ.nr_samples = drawable->stvis.samples; in dri2_allocate_textures()
629 templ.nr_storage_samples = drawable->stvis.samples; in dri2_allocate_textures()
630 zsbuf = &drawable->msaa_textures[statt]; in dri2_allocate_textures()
635 zsbuf = &drawable->textures[statt]; in dri2_allocate_textures()
652 pipe_resource_reference(&drawable->msaa_textures[statt], NULL); in dri2_allocate_textures()
653 pipe_resource_reference(&drawable->textures[statt], NULL); in dri2_allocate_textures()
665 drawable->old_num = num_buffers; in dri2_allocate_textures()
666 drawable->old_w = dri_drawable->w; in dri2_allocate_textures()
667 drawable->old_h = dri_drawable->h; in dri2_allocate_textures()
668 memcpy(drawable->old, buffers, sizeof(__DRIbuffer) * num_buffers); in dri2_allocate_textures()
674 struct dri_drawable *drawable, in dri2_flush_frontbuffer() argument
677 __DRIdrawable *dri_drawable = drawable->dPriv; in dri2_flush_frontbuffer()
678 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader; in dri2_flush_frontbuffer()
679 const __DRIdri2LoaderExtension *loader = drawable->sPriv->dri2.loader; in dri2_flush_frontbuffer()
685 if (drawable->stvis.samples > 1) { in dri2_flush_frontbuffer()
688 drawable->textures[ST_ATTACHMENT_FRONT_LEFT], in dri2_flush_frontbuffer()
689 drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT]); in dri2_flush_frontbuffer()
692 if (drawable->textures[ST_ATTACHMENT_FRONT_LEFT]) { in dri2_flush_frontbuffer()
693 pipe->flush_resource(pipe, drawable->textures[ST_ATTACHMENT_FRONT_LEFT]); in dri2_flush_frontbuffer()
711 struct dri_drawable *drawable) in dri2_flush_swapbuffers() argument
713 __DRIdrawable *dri_drawable = drawable->dPriv; in dri2_flush_swapbuffers()
714 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader; in dri2_flush_swapbuffers()
722 dri2_update_tex_buffer(struct dri_drawable *drawable, in dri2_update_tex_buffer() argument
1994 struct dri_drawable *drawable = dri_drawable(dPriv); in dri2_set_damage_region() local
2008 FREE(drawable->damage_rects); in dri2_set_damage_region()
2009 drawable->damage_rects = boxes; in dri2_set_damage_region()
2010 drawable->num_damage_rects = nrects; in dri2_set_damage_region()
2013 if (drawable->texture_stamp == drawable->dPriv->lastStamp && in dri2_set_damage_region()
2014 (drawable->texture_mask & (1 << ST_ATTACHMENT_BACK_LEFT))) { in dri2_set_damage_region()
2015 struct pipe_screen *screen = drawable->screen->base.screen; in dri2_set_damage_region()
2018 if (drawable->stvis.samples > 1) in dri2_set_damage_region()
2019 resource = drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]; in dri2_set_damage_region()
2021 resource = drawable->textures[ST_ATTACHMENT_BACK_LEFT]; in dri2_set_damage_region()
2024 drawable->num_damage_rects, in dri2_set_damage_region()
2025 drawable->damage_rects); in dri2_set_damage_region()
2335 struct dri_drawable *drawable = NULL; in dri2_create_buffer() local
2340 drawable = dPriv->driverPrivate; in dri2_create_buffer()
2342 drawable->allocate_textures = dri2_allocate_textures; in dri2_create_buffer()
2343 drawable->flush_frontbuffer = dri2_flush_frontbuffer; in dri2_create_buffer()
2344 drawable->update_tex_buffer = dri2_update_tex_buffer; in dri2_create_buffer()
2345 drawable->flush_swapbuffers = dri2_flush_swapbuffers; in dri2_create_buffer()