diff options
author | Marek Olšák <[email protected]> | 2012-12-03 16:24:59 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-12-07 14:19:29 +0100 |
commit | 919f788b92362676fa368d9950532f82f762cdfb (patch) | |
tree | 066584a0498ca4f9bc7d5430343f675a1951548f /src/gallium/state_trackers/dri | |
parent | 888714feb6fe9ff22221f4f8a6ed6abd904a2761 (diff) |
gallium: pass the current context to the flush_front state tracker function
I will later use the context to resolve an MSAA front buffer.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_drawable.c | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_drawable.h | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/sw/drisw.c | 4 |
4 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 7e87f87ed67..dca6def284c 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.c +++ b/src/gallium/state_trackers/dri/common/dri_drawable.c @@ -100,14 +100,16 @@ dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, } static boolean -dri_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi, +dri_st_framebuffer_flush_front(struct st_context_iface *stctx, + struct st_framebuffer_iface *stfbi, enum st_attachment_type statt) { + struct dri_context *ctx = (struct dri_context *)stctx->st_manager_private; struct dri_drawable *drawable = (struct dri_drawable *) stfbi->st_manager_private; /* XXX remove this and just set the correct one on the framebuffer */ - drawable->flush_frontbuffer(drawable, statt); + drawable->flush_frontbuffer(ctx, drawable, statt); return TRUE; } diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.h b/src/gallium/state_trackers/dri/common/dri_drawable.h index 6336c81a715..6a769910fe6 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.h +++ b/src/gallium/state_trackers/dri/common/dri_drawable.h @@ -75,7 +75,8 @@ struct dri_drawable void (*update_drawable_info)(struct dri_drawable *drawable); - void (*flush_frontbuffer)(struct dri_drawable *drawable, + void (*flush_frontbuffer)(struct dri_context *ctx, + struct dri_drawable *drawable, enum st_attachment_type statt); void (*update_tex_buffer)(struct dri_drawable *drawable, diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index eb5536ee279..5ebe18480d8 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -373,7 +373,8 @@ dri2_allocate_textures(struct dri_drawable *drawable, } static void -dri2_flush_frontbuffer(struct dri_drawable *drawable, +dri2_flush_frontbuffer(struct dri_context *ctx, + struct dri_drawable *drawable, enum st_attachment_type statt) { __DRIdrawable *dri_drawable = drawable->dPriv; diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c index 533f908bce2..7a5f79716c0 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c @@ -158,10 +158,10 @@ drisw_swap_buffers(__DRIdrawable *dPriv) } static void -drisw_flush_frontbuffer(struct dri_drawable *drawable, +drisw_flush_frontbuffer(struct dri_context *ctx, + struct dri_drawable *drawable, enum st_attachment_type statt) { - struct dri_context *ctx = dri_get_current(drawable->sPriv); struct pipe_resource *ptex; if (!ctx) |