Lines Matching defs:drawable
82 struct dri_drawable *drawable = dri_drawable(dPriv);
84 drawable->texture_stamp = dPriv->lastStamp - 1;
86 p_atomic_inc(&drawable->base.stamp);
207 struct dri_drawable *drawable = dri_drawable(dPriv);
208 struct dri_screen *screen = dri_screen(drawable->sPriv);
210 screen->base.screen->flush_frontbuffer(screen->base.screen, pipe, ptex, 0, 0, drawable, sub_box);
214 dri_image_drawable_get_buffers(struct dri_drawable *drawable,
486 struct dri_drawable *drawable,
490 struct dri_screen *screen = dri_screen(drawable->sPriv);
496 __DRIdrawable *dri_drawable = drawable->dPriv;
497 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader;
498 struct kopper_drawable *cdraw = (struct kopper_drawable *)drawable;
499 struct kopper_screen *kscreen = (struct kopper_screen*)drawable->sPriv->driverPrivate;
504 width = drawable->dPriv->w;
505 height = drawable->dPriv->h;
507 resized = (drawable->old_w != width ||
508 drawable->old_h != height);
512 if (!dri_image_drawable_get_buffers(drawable, &images,
520 &drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
531 &drawable->textures[ST_ATTACHMENT_BACK_LEFT];
542 &drawable->textures[ST_ATTACHMENT_BACK_LEFT];
558 if (drawable->textures[i] && i < ST_ATTACHMENT_DEPTH_STENCIL && !is_pixmap) {
559 drawable->textures[i]->width0 = width;
560 drawable->textures[i]->height0 = height;
562 p_atomic_inc(&drawable->base.stamp);
564 pipe_resource_reference(&drawable->textures[i], NULL);
565 pipe_resource_reference(&drawable->msaa_textures[i], NULL);
574 drawable->old_w = width;
575 drawable->old_h = height;
604 dri_drawable_get_format(drawable, statts[i], &format, &bind);
607 if (!drawable->textures[statts[i]]) {
626 data = drawable->textures[ST_ATTACHMENT_BACK_LEFT];
628 drawable->textures[statts[i]] =
633 drawable->textures[statts[i]] = kopper_get_pixmap_buffer(cdraw, format);
638 drawable->textures[statts[i]] =
642 if (drawable->stvis.samples > 1 && !drawable->msaa_textures[statts[i]]) {
645 templ.nr_samples = drawable->stvis.samples;
646 templ.nr_storage_samples = drawable->stvis.samples;
647 drawable->msaa_textures[statts[i]] =
651 drawable->msaa_textures[statts[i]],
652 drawable->textures[statts[i]]);
670 kopper_update_drawable_info(struct dri_drawable *drawable)
672 __DRIdrawable *dPriv = drawable->dPriv;
674 struct kopper_drawable *cdraw = (struct kopper_drawable *)drawable;
679 struct pipe_resource *ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT] ?
680 drawable->textures[ST_ATTACHMENT_BACK_LEFT] :
681 drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
694 struct dri_drawable *drawable = dri_drawable(dPriv);
695 struct dri_screen *screen = dri_screen(drawable->sPriv);
697 screen->base.screen->flush_frontbuffer(screen->base.screen, pipe, ptex, 0, 0, drawable, sub_box);
712 struct dri_drawable *drawable,
720 if (drawable) {
722 if (drawable->flushing)
725 drawable->flushing = true;
728 if (drawable->stvis.samples > 1) {
731 drawable->textures[ST_ATTACHMENT_FRONT_LEFT],
732 drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT]);
734 ptex = drawable->textures[statt];
737 ctx->st->pipe->flush_resource(ctx->st->pipe, drawable->textures[ST_ATTACHMENT_FRONT_LEFT]);
738 struct pipe_screen *screen = drawable->screen->base.screen;
746 if (drawable) {
747 drawable->flushing = false;
750 if (drawable->throttle_fence) {
751 screen->fence_finish(screen, NULL, drawable->throttle_fence, PIPE_TIMEOUT_INFINITE);
752 screen->fence_reference(screen, &drawable->throttle_fence, NULL);
754 drawable->throttle_fence = new_fence;
796 kopper_update_tex_buffer(struct dri_drawable *drawable,
800 __DRIdrawable *dPriv = drawable->dPriv;
803 struct kopper_drawable *cdraw = (struct kopper_drawable *)drawable;
839 struct dri_drawable *drawable)
881 struct kopper_drawable *drawable = NULL;
887 drawable = kopper_create_drawable(dPriv, dPriv->driverPrivate);
888 if (!drawable)
891 drawable->info.has_alpha = visual->alphaBits > 0;
894 &drawable->info);
895 drawable->is_window = !isPixmap && drawable->info.bos.sType != 0;
904 struct dri_drawable *drawable = dri_drawable(dPriv);
905 struct kopper_drawable *kdraw = (struct kopper_drawable *)drawable;
911 ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT];
915 drawable->texture_stamp = dPriv->lastStamp - 1;
920 if (!drawable->textures[ST_ATTACHMENT_FRONT_LEFT]) {
925 drawable->textures[ST_ATTACHMENT_BACK_LEFT] = drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
926 drawable->textures[ST_ATTACHMENT_FRONT_LEFT] = ptex;
977 struct dri_drawable *drawable = dri_drawable(dPriv);
978 struct kopper_drawable *cdraw = (struct kopper_drawable *)drawable;
979 struct dri_screen *screen = dri_screen(drawable->sPriv);
982 struct pipe_resource *ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT] ?
983 drawable->textures[ST_ATTACHMENT_BACK_LEFT] :
984 drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
999 struct dri_drawable *drawable = dri_drawable(dPriv);
1000 struct pipe_resource *ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT] ?
1001 drawable->textures[ST_ATTACHMENT_BACK_LEFT] :
1002 drawable->textures[ST_ATTACHMENT_FRONT_LEFT];