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 <brianp@vmware.com>
This commit is contained in:
parent
888714feb6
commit
919f788b92
|
@ -269,6 +269,8 @@ struct st_context_attribs
|
|||
struct st_config_options options;
|
||||
};
|
||||
|
||||
struct st_context_iface;
|
||||
|
||||
/**
|
||||
* Represent a windowing system drawable.
|
||||
*
|
||||
|
@ -313,7 +315,8 @@ struct st_framebuffer_iface
|
|||
*
|
||||
* @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);
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -113,7 +113,8 @@ egl_g3d_destroy_st_manager(struct st_manager *smapi)
|
|||
}
|
||||
|
||||
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;
|
||||
|
@ -187,7 +188,8 @@ egl_g3d_st_framebuffer_validate_pbuffer(struct st_framebuffer_iface *stfbi,
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -253,7 +253,8 @@ xmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
|
|||
* 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);
|
||||
|
|
|
@ -91,7 +91,7 @@ vg_manager_flush_frontbuffer(struct vg_context *ctx)
|
|||
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;
|
||||
|
|
|
@ -171,7 +171,8 @@ stw_st_framebuffer_present_locked(HDC hdc,
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -789,7 +789,7 @@ st_manager_flush_frontbuffer(struct st_context *st)
|
|||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue