diff options
Diffstat (limited to 'src/gallium/state_trackers/dri/common')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_drawable.c | 13 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_drawable.h | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c index 18d8d89..ddf9400 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.c +++ b/src/gallium/state_trackers/dri/common/dri_drawable.c @@ -42,11 +42,13 @@ static void swap_fences_unref(struct dri_drawable *draw); static boolean -dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, +dri_st_framebuffer_validate(struct st_context_iface *stctx, + struct st_framebuffer_iface *stfbi, const enum st_attachment_type *statts, unsigned count, struct pipe_resource **out) { + struct dri_context *ctx = (struct dri_context *)stctx->st_manager_private; struct dri_drawable *drawable = (struct dri_drawable *) stfbi->st_manager_private; struct dri_screen *screen = dri_screen(drawable->sPriv); @@ -78,7 +80,7 @@ dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, if (new_stamp && drawable->update_drawable_info) drawable->update_drawable_info(drawable); - drawable->allocate_textures(drawable, statts, count); + drawable->allocate_textures(ctx, drawable, statts, count); /* add existing textures */ for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { @@ -183,7 +185,8 @@ dri_destroy_buffer(__DRIdrawable * dPriv) * exist. Used by the TFP extension. */ static void -dri_drawable_validate_att(struct dri_drawable *drawable, +dri_drawable_validate_att(struct dri_context *ctx, + struct dri_drawable *drawable, enum st_attachment_type statt) { enum st_attachment_type statts[ST_ATTACHMENT_COUNT]; @@ -203,7 +206,7 @@ dri_drawable_validate_att(struct dri_drawable *drawable, drawable->texture_stamp = drawable->dPriv->lastStamp - 1; - drawable->base.validate(&drawable->base, statts, count, NULL); + drawable->base.validate(ctx->st, &drawable->base, statts, count, NULL); } /** @@ -217,7 +220,7 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target, struct dri_drawable *drawable = dri_drawable(dPriv); struct pipe_resource *pt; - dri_drawable_validate_att(drawable, ST_ATTACHMENT_FRONT_LEFT); + dri_drawable_validate_att(ctx, drawable, ST_ATTACHMENT_FRONT_LEFT); /* Use the pipe resource associated with the X drawable */ pt = drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.h b/src/gallium/state_trackers/dri/common/dri_drawable.h index 50e5cc4..c514218 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.h +++ b/src/gallium/state_trackers/dri/common/dri_drawable.h @@ -71,7 +71,8 @@ struct dri_drawable struct pipe_surface *drisw_surface; /* hooks filled in by dri2 & drisw */ - void (*allocate_textures)(struct dri_drawable *drawable, + void (*allocate_textures)(struct dri_context *ctx, + struct dri_drawable *drawable, const enum st_attachment_type *statts, unsigned count); |