summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/glx
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-05-21 14:11:42 -0600
committerBrian Paul <brianp@vmware.com>2013-05-24 16:35:24 -0600
commit820de34ceb3e66f87f0dba85316f94975f98d97a (patch)
tree53d2a97955a734f52fcd7f10dfe939533357d475 /src/gallium/state_trackers/glx
parent8e41ced4b35aa5ef56c8e14bec8c722d46bb56eb (diff)
downloadexternal_mesa3d-820de34ceb3e66f87f0dba85316f94975f98d97a.zip
external_mesa3d-820de34ceb3e66f87f0dba85316f94975f98d97a.tar.gz
external_mesa3d-820de34ceb3e66f87f0dba85316f94975f98d97a.tar.bz2
st/glx/xlib: assorted whitespace, comment fixes
Diffstat (limited to 'src/gallium/state_trackers/glx')
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_st.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c
index 1cfd89e..30e69ea 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_st.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_st.c
@@ -1,6 +1,5 @@
/*
* Mesa 3-D graphics library
- * Version: 7.9
*
* Copyright (C) 2010 LunarG Inc.
*
@@ -46,14 +45,16 @@ struct xmesa_st_framebuffer {
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,
@@ -74,10 +75,10 @@ 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.
*/
@@ -106,6 +107,7 @@ xmesa_st_framebuffer_copy_textures(struct st_framebuffer_iface *stfbi,
src_ptex, 0, &src_box);
}
+
/**
* Remove outdated textures and create the requested ones.
* This is a helper used during framebuffer validation.
@@ -191,7 +193,7 @@ xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
* \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,
@@ -249,6 +251,7 @@ xmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
return TRUE;
}
+
/**
* Called via st_framebuffer_iface::flush_front()
*/
@@ -268,6 +271,7 @@ xmesa_st_framebuffer_flush_front(struct st_context_iface *stctx,
return ret;
}
+
struct st_framebuffer_iface *
xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b)
{
@@ -288,7 +292,7 @@ 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;
@@ -302,6 +306,7 @@ xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b)
return stfbi;
}
+
void
xmesa_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
@@ -317,6 +322,7 @@ xmesa_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi)
free(stfbi);
}
+
/**
* Return the pipe_surface which corresponds to the given
* framebuffer attachment.
@@ -329,6 +335,7 @@ xmesa_get_framebuffer_resource(struct st_framebuffer_iface *stfbi,
return xstfb->textures[att];
}
+
void
xmesa_swap_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
@@ -357,6 +364,7 @@ xmesa_swap_st_framebuffer(struct st_framebuffer_iface *stfbi)
}
}
+
void
xmesa_copy_st_framebuffer(struct st_framebuffer_iface *stfbi,
enum st_attachment_type src,
@@ -368,19 +376,21 @@ xmesa_copy_st_framebuffer(struct st_framebuffer_iface *stfbi,
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);
@@ -394,4 +404,3 @@ xmesa_get_context(struct st_framebuffer_iface* stfbi)
}
return pipe;
}
-