summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-11-01 08:17:05 -0600
committerBrian Paul <[email protected]>2016-11-03 14:29:23 -0600
commitc96f63cac2a6b7e60b515fccf2f7410615b94337 (patch)
tree449066169a57b5d9378da92a282a1a43aafe5eb0
parent1691e29e62a6a0b5fa7a5f53b308b2a327a11eab (diff)
svga: whitespace / formatting clean-up in svga_context.c
Trivial.
-rw-r--r--src/gallium/drivers/svga/svga_context.c62
1 files changed, 34 insertions, 28 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index 436961b1ecd..d3f18014135 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -53,9 +53,11 @@ DEBUG_GET_ONCE_BOOL_OPTION(use_min_mipmap, "SVGA_USE_MIN_MIPMAP", FALSE);
DEBUG_GET_ONCE_BOOL_OPTION(no_line_width, "SVGA_NO_LINE_WIDTH", FALSE);
DEBUG_GET_ONCE_BOOL_OPTION(force_hw_line_stipple, "SVGA_FORCE_HW_LINE_STIPPLE", FALSE);
-static void svga_destroy( struct pipe_context *pipe )
+
+static void
+svga_destroy(struct pipe_context *pipe)
{
- struct svga_context *svga = svga_context( pipe );
+ struct svga_context *svga = svga_context(pipe);
unsigned shader, i;
/* free any alternate rasterizer states used for point sprite */
@@ -81,12 +83,12 @@ static void svga_destroy( struct pipe_context *pipe )
util_blitter_destroy(svga->blitter);
svga_cleanup_sampler_state(svga);
- svga_cleanup_framebuffer( svga );
- svga_cleanup_tss_binding( svga );
+ svga_cleanup_framebuffer(svga);
+ svga_cleanup_tss_binding(svga);
svga_cleanup_vertex_state(svga);
-
- svga_destroy_swtnl( svga );
- svga_hwtnl_destroy( svga->hwtnl );
+
+ svga_destroy_swtnl(svga);
+ svga_hwtnl_destroy(svga->hwtnl);
svga->swc->destroy(svga->swc);
@@ -110,13 +112,12 @@ static void svga_destroy( struct pipe_context *pipe )
}
}
- FREE( svga );
+ FREE(svga);
}
-
-struct pipe_context *svga_context_create(struct pipe_screen *screen,
- void *priv, unsigned flags)
+struct pipe_context *
+svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags)
{
struct svga_screen *svgascreen = svga_screen(screen);
struct svga_context *svga = NULL;
@@ -202,7 +203,7 @@ struct pipe_context *svga_context_create(struct pipe_screen *screen,
if (!svga_init_swtnl(svga))
goto cleanup;
- ret = svga_emit_initial_state( svga );
+ ret = svga_emit_initial_state(svga);
if (ret != PIPE_OK)
goto cleanup;
@@ -219,7 +220,7 @@ struct pipe_context *svga_context_create(struct pipe_screen *screen,
/* Avoid shortcircuiting state with initial value of zero.
*/
memset(&svga->state.hw_clear, 0xcd, sizeof(svga->state.hw_clear));
- memset(&svga->state.hw_clear.framebuffer, 0x0,
+ memset(&svga->state.hw_clear.framebuffer, 0x0,
sizeof(svga->state.hw_clear.framebuffer));
memset(&svga->state.hw_draw, 0xcd, sizeof(svga->state.hw_draw));
@@ -302,8 +303,9 @@ cleanup:
}
-void svga_context_flush( struct svga_context *svga,
- struct pipe_fence_handle **pfence )
+void
+svga_context_flush(struct svga_context *svga,
+ struct pipe_fence_handle **pfence)
{
struct svga_screen *svgascreen = svga_screen(svga->pipe.screen);
struct pipe_fence_handle *fence = NULL;
@@ -364,7 +366,7 @@ void svga_context_flush( struct svga_context *svga,
if (SVGA_DEBUG & DEBUG_SYNC) {
if (fence)
- svga->pipe.screen->fence_finish( svga->pipe.screen, NULL, fence,
+ svga->pipe.screen->fence_finish(svga->pipe.screen, NULL, fence,
PIPE_TIMEOUT_INFINITE);
}
@@ -401,14 +403,15 @@ svga_context_finish(struct svga_context *svga)
* If the command buffer overflows, we flush it and retry.
* \sa svga_hwtnl_flush()
*/
-void svga_hwtnl_flush_retry( struct svga_context *svga )
+void
+svga_hwtnl_flush_retry(struct svga_context *svga)
{
enum pipe_error ret = PIPE_OK;
- ret = svga_hwtnl_flush( svga->hwtnl );
+ ret = svga_hwtnl_flush(svga->hwtnl);
if (ret == PIPE_ERROR_OUT_OF_MEMORY) {
- svga_context_flush( svga, NULL );
- ret = svga_hwtnl_flush( svga->hwtnl );
+ svga_context_flush(svga, NULL);
+ ret = svga_hwtnl_flush(svga->hwtnl);
}
assert(ret == PIPE_OK);
@@ -420,8 +423,9 @@ void svga_hwtnl_flush_retry( struct svga_context *svga )
*
* Otherwise DMA commands on the referred buffer will be emitted too late.
*/
-void svga_hwtnl_flush_buffer( struct svga_context *svga,
- struct pipe_resource *buffer )
+void
+svga_hwtnl_flush_buffer(struct svga_context *svga,
+ struct pipe_resource *buffer)
{
if (svga_hwtnl_is_buffer_referred(svga->hwtnl, buffer)) {
svga_hwtnl_flush_retry(svga);
@@ -429,15 +433,17 @@ void svga_hwtnl_flush_buffer( struct svga_context *svga,
}
-/* Emit all operations pending on host surfaces.
- */
-void svga_surfaces_flush(struct svga_context *svga)
+/**
+ * Emit all operations pending on host surfaces.
+ */
+void
+svga_surfaces_flush(struct svga_context *svga)
{
SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_SURFACEFLUSH);
/* Emit buffered drawing commands.
*/
- svga_hwtnl_flush_retry( svga );
+ svga_hwtnl_flush_retry(svga);
/* Emit back-copy from render target views to textures.
*/
@@ -448,7 +454,7 @@ void svga_surfaces_flush(struct svga_context *svga)
struct svga_winsys_context *
-svga_winsys_context( struct pipe_context *pipe )
+svga_winsys_context(struct pipe_context *pipe)
{
- return svga_context( pipe )->swc;
+ return svga_context(pipe)->swc;
}