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