I will later use the context to resolve an MSAA front buffer.
Reviewed-by: Brian Paul <brianp@vmware.com>
struct st_config_options options;
};
+struct st_context_iface;
+
/**
* Represent a windowing system drawable.
*
*
* @att is one of the front buffer attachments.
*/
- boolean (*flush_front)(struct st_framebuffer_iface *stfbi,
+ boolean (*flush_front)(struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt);
/**
}
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;
}
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,
}
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;
}
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)
}
static boolean
-egl_g3d_st_framebuffer_flush_front_pbuffer(struct st_framebuffer_iface *stfbi,
+egl_g3d_st_framebuffer_flush_front_pbuffer(struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
{
return TRUE;
}
static boolean
-egl_g3d_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi,
+egl_g3d_st_framebuffer_flush_front(struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
{
_EGLSurface *surf = (_EGLSurface *) stfbi->st_manager_private;
* Called via st_framebuffer_iface::flush_front()
*/
static boolean
-xmesa_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi,
+xmesa_st_framebuffer_flush_front(struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
switch (stfb->strb_att) {
case ST_ATTACHMENT_FRONT_LEFT:
case ST_ATTACHMENT_FRONT_RIGHT:
- stfb->iface->flush_front(stfb->iface, stfb->strb_att);
+ stfb->iface->flush_front(&ctx->iface, stfb->iface, stfb->strb_att);
break;
default:
break;
}
static boolean
-stw_st_framebuffer_flush_front(struct st_framebuffer_iface *stfb,
+stw_st_framebuffer_flush_front(struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfb,
enum st_attachment_type statt)
{
struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
/* never a dummy fb */
assert(&stfb->Base != _mesa_get_incomplete_framebuffer());
- stfb->iface->flush_front(stfb->iface, ST_ATTACHMENT_FRONT_LEFT);
+ stfb->iface->flush_front(&st->iface, stfb->iface, ST_ATTACHMENT_FRONT_LEFT);
}
/**