Lines Matching refs:drawable
51 struct dri_drawable *drawable = in dri_st_framebuffer_validate() local
53 struct dri_screen *screen = dri_screen(drawable->sPriv); in dri_st_framebuffer_validate()
59 drawable->stvis.samples > 1 ? drawable->msaa_textures in dri_st_framebuffer_validate()
60 : drawable->textures; in dri_st_framebuffer_validate()
67 new_mask = (statt_mask & ~drawable->texture_mask); in dri_st_framebuffer_validate()
75 lastStamp = drawable->dPriv->lastStamp; in dri_st_framebuffer_validate()
76 new_stamp = (drawable->texture_stamp != lastStamp); in dri_st_framebuffer_validate()
79 if (new_stamp && drawable->update_drawable_info) in dri_st_framebuffer_validate()
80 drawable->update_drawable_info(drawable); in dri_st_framebuffer_validate()
82 drawable->allocate_textures(ctx, drawable, statts, count); in dri_st_framebuffer_validate()
90 drawable->texture_stamp = lastStamp; in dri_st_framebuffer_validate()
91 drawable->texture_mask = statt_mask; in dri_st_framebuffer_validate()
93 } while (lastStamp != drawable->dPriv->lastStamp); in dri_st_framebuffer_validate()
103 drawable->num_damage_rects, in dri_st_framebuffer_validate()
104 drawable->damage_rects); in dri_st_framebuffer_validate()
123 struct dri_drawable *drawable = in dri_st_framebuffer_flush_front() local
127 return drawable->flush_frontbuffer(ctx, drawable, statt); in dri_st_framebuffer_flush_front()
138 struct dri_drawable *drawable = in dri_st_framebuffer_flush_swapbuffers() local
141 if (drawable->flush_swapbuffers) in dri_st_framebuffer_flush_swapbuffers()
142 drawable->flush_swapbuffers(ctx, drawable); in dri_st_framebuffer_flush_swapbuffers()
156 struct dri_drawable *drawable = NULL; in dri_create_buffer() local
161 drawable = CALLOC_STRUCT(dri_drawable); in dri_create_buffer()
162 if (drawable == NULL) in dri_create_buffer()
165 dri_fill_st_visual(&drawable->stvis, screen, visual); in dri_create_buffer()
168 drawable->base.visual = &drawable->stvis; in dri_create_buffer()
169 drawable->base.flush_front = dri_st_framebuffer_flush_front; in dri_create_buffer()
170 drawable->base.validate = dri_st_framebuffer_validate; in dri_create_buffer()
171 drawable->base.flush_swapbuffers = dri_st_framebuffer_flush_swapbuffers; in dri_create_buffer()
172 drawable->base.st_manager_private = (void *) drawable; in dri_create_buffer()
174 drawable->screen = screen; in dri_create_buffer()
175 drawable->sPriv = sPriv; in dri_create_buffer()
176 drawable->dPriv = dPriv; in dri_create_buffer()
178 dPriv->driverPrivate = (void *)drawable; in dri_create_buffer()
179 p_atomic_set(&drawable->base.stamp, 1); in dri_create_buffer()
180 drawable->base.ID = p_atomic_inc_return(&drifb_ID); in dri_create_buffer()
181 drawable->base.state_manager = &screen->base; in dri_create_buffer()
185 FREE(drawable); in dri_create_buffer()
192 struct dri_drawable *drawable = dri_drawable(dPriv); in dri_destroy_buffer() local
193 struct dri_screen *screen = drawable->screen; in dri_destroy_buffer()
198 pipe_resource_reference(&drawable->textures[i], NULL); in dri_destroy_buffer()
200 pipe_resource_reference(&drawable->msaa_textures[i], NULL); in dri_destroy_buffer()
203 &drawable->throttle_fence, NULL); in dri_destroy_buffer()
206 stapi->destroy_drawable(stapi, &drawable->base); in dri_destroy_buffer()
208 FREE(drawable->damage_rects); in dri_destroy_buffer()
209 FREE(drawable); in dri_destroy_buffer()
218 struct dri_drawable *drawable, in dri_drawable_validate_att() argument
225 if (drawable->texture_mask & (1 << statt)) in dri_drawable_validate_att()
230 if (drawable->texture_mask & (1 << i)) { in dri_drawable_validate_att()
236 drawable->texture_stamp = drawable->dPriv->lastStamp - 1; in dri_drawable_validate_att()
238 drawable->base.validate(ctx->st, &drawable->base, statts, count, NULL); in dri_drawable_validate_att()
250 struct dri_drawable *drawable = dri_drawable(dPriv); in dri_set_tex_buffer2() local
256 dri_drawable_validate_att(ctx, drawable, ST_ATTACHMENT_FRONT_LEFT); in dri_set_tex_buffer2()
259 pt = drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; in dri_set_tex_buffer2()
287 drawable->update_tex_buffer(drawable, ctx, pt); in dri_set_tex_buffer2()
314 dri_drawable_get_format(struct dri_drawable *drawable, in dri_drawable_get_format() argument
329 *format = util_format_linear(drawable->stvis.color_format); in dri_drawable_get_format()
333 *format = drawable->stvis.depth_stencil_format; in dri_drawable_get_format()
393 struct dri_drawable *drawable, in dri_postprocessing() argument
396 struct pipe_resource *src = drawable->textures[att]; in dri_postprocessing()
397 struct pipe_resource *zsbuf = drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]; in dri_postprocessing()
405 struct dri_drawable *drawable; member
418 if (args->drawable->stvis.samples > 1 && in notify_before_flush_cb()
423 args->drawable->textures[ST_ATTACHMENT_BACK_LEFT], in notify_before_flush_cb()
424 args->drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]); in notify_before_flush_cb()
427 args->drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] && in notify_before_flush_cb()
428 args->drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]) { in notify_before_flush_cb()
435 dri_postprocessing(args->ctx, args->drawable, ST_ATTACHMENT_BACK_LEFT); in notify_before_flush_cb()
439 if (args->drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]) in notify_before_flush_cb()
440 pipe->invalidate_resource(pipe, args->drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]); in notify_before_flush_cb()
441 if (args->drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]) in notify_before_flush_cb()
442 … pipe->invalidate_resource(pipe, args->drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]); in notify_before_flush_cb()
447 args->drawable->textures[ST_ATTACHMENT_BACK_LEFT]); in notify_before_flush_cb()
450 pipe->flush_resource(pipe, args->drawable->textures[ST_ATTACHMENT_BACK_LEFT]); in notify_before_flush_cb()
468 struct dri_drawable *drawable = dri_drawable(dPriv); in dri_flush() local
482 if (drawable) { in dri_flush()
484 if (drawable->flushing) in dri_flush()
487 drawable->flushing = true; in dri_flush()
494 drawable->textures[ST_ATTACHMENT_BACK_LEFT]) { in dri_flush()
502 args.drawable = drawable; in dri_flush()
515 drawable && in dri_flush()
519 struct pipe_screen *screen = drawable->screen->base.screen; in dri_flush()
525 if (drawable->throttle_fence) { in dri_flush()
526 screen->fence_finish(screen, NULL, drawable->throttle_fence, PIPE_TIMEOUT_INFINITE); in dri_flush()
527 screen->fence_reference(screen, &drawable->throttle_fence, NULL); in dri_flush()
529 drawable->throttle_fence = new_fence; in dri_flush()
535 if (drawable) { in dri_flush()
536 drawable->flushing = false; in dri_flush()
545 drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT]; in dri_flush()
547 drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] = in dri_flush()
548 drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]; in dri_flush()
549 drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT] = tmp; in dri_flush()
554 p_atomic_inc(&drawable->base.stamp); in dri_flush()