Lines Matching refs:drawable

52    struct dri_drawable *drawable =
54 struct dri_screen *screen = dri_screen(drawable->sPriv);
60 drawable->stvis.samples > 1 ? drawable->msaa_textures
61 : drawable->textures;
68 new_mask = (statt_mask & ~drawable->texture_mask);
76 lastStamp = drawable->dPriv->lastStamp;
77 new_stamp = (drawable->texture_stamp != lastStamp);
80 if (new_stamp && drawable->update_drawable_info)
81 drawable->update_drawable_info(drawable);
83 drawable->allocate_textures(ctx, drawable, statts, count);
91 drawable->texture_stamp = lastStamp;
92 drawable->texture_mask = statt_mask;
94 } while (lastStamp != drawable->dPriv->lastStamp);
114 struct dri_drawable *drawable =
118 drawable->flush_frontbuffer(ctx, drawable, statt);
132 struct dri_drawable *drawable = NULL;
137 drawable = CALLOC_STRUCT(dri_drawable);
138 if (drawable == NULL)
141 dri_fill_st_visual(&drawable->stvis, screen, visual);
144 drawable->base.visual = &drawable->stvis;
145 drawable->base.flush_front = dri_st_framebuffer_flush_front;
146 drawable->base.validate = dri_st_framebuffer_validate;
147 drawable->base.st_manager_private = (void *) drawable;
149 drawable->screen = screen;
150 drawable->sPriv = sPriv;
151 drawable->dPriv = dPriv;
152 drawable->desired_fences = screen->default_throttle_frames;
153 if (drawable->desired_fences > DRI_SWAP_FENCES_MAX)
154 drawable->desired_fences = DRI_SWAP_FENCES_MAX;
156 dPriv->driverPrivate = (void *)drawable;
157 p_atomic_set(&drawable->base.stamp, 1);
161 FREE(drawable);
168 struct dri_drawable *drawable = dri_drawable(dPriv);
171 pipe_surface_reference(&drawable->drisw_surface, NULL);
174 pipe_resource_reference(&drawable->textures[i], NULL);
176 pipe_resource_reference(&drawable->msaa_textures[i], NULL);
178 swap_fences_unref(drawable);
180 FREE(drawable);
189 struct dri_drawable *drawable,
196 if (drawable->texture_mask & (1 << statt))
201 if (drawable->texture_mask & (1 << i)) {
207 drawable->texture_stamp = drawable->dPriv->lastStamp - 1;
209 drawable->base.validate(ctx->st, &drawable->base, statts, count, NULL);
220 struct dri_drawable *drawable = dri_drawable(dPriv);
223 dri_drawable_validate_att(ctx, drawable, ST_ATTACHMENT_FRONT_LEFT);
225 /* Use the pipe resource associated with the X drawable */
226 pt = drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
245 drawable->update_tex_buffer(drawable, ctx, pt);
272 dri_drawable_get_format(struct dri_drawable *drawable,
283 * when they get an sRGB drawable. st/mesa receives "drawable->stvis"
287 *format = util_format_linear(drawable->stvis.color_format);
291 *format = drawable->stvis.depth_stencil_format;
420 struct dri_drawable *drawable,
423 struct pipe_resource *src = drawable->textures[att];
424 struct pipe_resource *zsbuf = drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL];
434 * \param drawable the drawable to flush
445 struct dri_drawable *drawable = dri_drawable(dPriv);
454 if (drawable) {
456 if (drawable->flushing)
459 drawable->flushing = TRUE;
465 /* Flush the drawable. */
467 drawable->textures[ST_ATTACHMENT_BACK_LEFT]) {
470 if (drawable->stvis.samples > 1 &&
474 drawable->textures[ST_ATTACHMENT_BACK_LEFT],
475 drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]);
477 if (drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] &&
478 drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]) {
482 /* FRONT_LEFT is resolved in drawable->flush_frontbuffer. */
485 dri_postprocessing(ctx, drawable, ST_ATTACHMENT_BACK_LEFT);
488 hud_draw(ctx->hud, drawable->textures[ST_ATTACHMENT_BACK_LEFT]);
491 pipe->flush_resource(pipe, drawable->textures[ST_ATTACHMENT_BACK_LEFT]);
495 if (drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL])
496 pipe->invalidate_resource(pipe, drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]);
497 if (drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL])
498 pipe->invalidate_resource(pipe, drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]);
510 drawable &&
523 struct pipe_screen *screen = drawable->screen->base.screen;
526 fence = swap_fences_pop_front(drawable);
535 swap_fences_push_back(drawable, fence);
543 if (drawable) {
544 drawable->flushing = FALSE;
553 drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT];
555 drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] =
556 drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT];
557 drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT] = tmp;
562 p_atomic_inc(&drawable->base.stamp);