/*
* Mesa 3-D graphics library
- * Version: 7.9
*
* Copyright (C) 2010 LunarG Inc.
*
struct pipe_resource *display_resource;
};
+
static INLINE struct xmesa_st_framebuffer *
xmesa_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
return (struct xmesa_st_framebuffer *) stfbi->st_manager_private;
}
+
/**
- * Display an attachment to the xlib_drawable of the framebuffer.
+ * Display (present) an attachment to the xlib_drawable of the framebuffer.
*/
static boolean
xmesa_st_framebuffer_display(struct st_framebuffer_iface *stfbi,
}
xstfb->screen->flush_frontbuffer(xstfb->screen, pres, 0, 0, &xstfb->buffer->ws);
-
return TRUE;
}
+
/**
* Copy the contents between the attachments.
*/
src_ptex, 0, &src_box);
}
+
/**
* Remove outdated textures and create the requested ones.
* This is a helper used during framebuffer validation.
* \param count number of framebuffer attachments in statts[]
* \param out returns resources for each of the attachments
*/
-static boolean
+static boolean
xmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
unsigned count,
return TRUE;
}
+
/**
* Called via st_framebuffer_iface::flush_front()
*/
return ret;
}
+
struct st_framebuffer_iface *
xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b)
{
xstfb->buffer = b;
xstfb->screen = xmdpy->screen;
xstfb->stvis = b->xm_visual->stvis;
- if(xstfb->screen->get_param(xstfb->screen, PIPE_CAP_NPOT_TEXTURES))
+ if (xstfb->screen->get_param(xstfb->screen, PIPE_CAP_NPOT_TEXTURES))
xstfb->target = PIPE_TEXTURE_2D;
else
xstfb->target = PIPE_TEXTURE_RECT;
return stfbi;
}
+
void
xmesa_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
free(stfbi);
}
+
/**
* Return the pipe_surface which corresponds to the given
* framebuffer attachment.
return xstfb->textures[att];
}
+
void
xmesa_swap_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
}
}
+
void
xmesa_copy_st_framebuffer(struct st_framebuffer_iface *stfbi,
enum st_attachment_type src,
xmesa_st_framebuffer_display(stfbi, dst);
}
+
struct pipe_resource*
xmesa_get_attachment(struct st_framebuffer_iface *stfbi,
enum st_attachment_type st_attachment)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
- struct pipe_resource* res;
+ struct pipe_resource *res;
res = xstfb->textures[st_attachment];
return res;
}
+
struct pipe_context*
-xmesa_get_context(struct st_framebuffer_iface* stfbi)
+xmesa_get_context(struct st_framebuffer_iface *stfbi)
{
struct pipe_context *pipe;
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
}
return pipe;
}
-