diff options
author | Brian Paul <[email protected]> | 2016-04-15 15:58:05 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-04-25 12:59:29 -0600 |
commit | 77e4b41671ecd7bde3a151627d4548106fc5be3c (patch) | |
tree | 8363122f39bf9b9f815c01bf9999f499b89ada76 /src/gallium/drivers | |
parent | 25e0d3659fcd3f842535750a7a4f6440bee850bb (diff) |
svga: whitespace and formatting fixes in svga_pipe_rasterizer.c
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_rasterizer.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c index 968770c6faa..b01b04c2cfc 100644 --- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c +++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c @@ -38,8 +38,8 @@ /* Hardware frontwinding is always set up as SVGA3D_FRONTWINDING_CW. */ -static SVGA3dFace svga_translate_cullmode( unsigned mode, - unsigned front_ccw ) +static SVGA3dFace +svga_translate_cullmode(unsigned mode, unsigned front_ccw) { const int hw_front_ccw = 0; /* hardware is always CW */ switch (mode) { @@ -57,7 +57,8 @@ static SVGA3dFace svga_translate_cullmode( unsigned mode, } } -static SVGA3dShadeMode svga_translate_flatshade( unsigned mode ) +static SVGA3dShadeMode +svga_translate_flatshade(unsigned mode) { return mode ? SVGA3D_SHADEMODE_FLAT : SVGA3D_SHADEMODE_SMOOTH; } @@ -158,7 +159,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe, const struct pipe_rasterizer_state *templ) { struct svga_context *svga = svga_context(pipe); - struct svga_rasterizer_state *rast = CALLOC_STRUCT( svga_rasterizer_state ); + struct svga_rasterizer_state *rast = CALLOC_STRUCT(svga_rasterizer_state); struct svga_screen *screen = svga_screen(pipe->screen); if (!rast) @@ -179,9 +180,8 @@ svga_create_rasterizer_state(struct pipe_context *pipe, /* line_width - draw module */ /* fill_cw, fill_ccw - draw module or index translation */ - rast->shademode = svga_translate_flatshade( templ->flatshade ); - rast->cullmode = svga_translate_cullmode( templ->cull_face, - templ->front_ccw ); + rast->shademode = svga_translate_flatshade(templ->flatshade); + rast->cullmode = svga_translate_cullmode(templ->cull_face, templ->front_ccw); rast->scissortestenable = templ->scissor; rast->multisampleantialias = templ->multisample; rast->antialiasedlineenable = templ->line_smooth; @@ -365,8 +365,9 @@ svga_create_rasterizer_state(struct pipe_context *pipe, return rast; } -static void svga_bind_rasterizer_state( struct pipe_context *pipe, - void *state ) + +static void +svga_bind_rasterizer_state(struct pipe_context *pipe, void *state) { struct svga_context *svga = svga_context(pipe); struct svga_rasterizer_state *raster = (struct svga_rasterizer_state *)state; @@ -383,6 +384,7 @@ static void svga_bind_rasterizer_state( struct pipe_context *pipe, svga->dirty |= SVGA_NEW_RAST; } + static void svga_delete_rasterizer_state(struct pipe_context *pipe, void *state) { @@ -409,15 +411,10 @@ svga_delete_rasterizer_state(struct pipe_context *pipe, void *state) } -void svga_init_rasterizer_functions( struct svga_context *svga ) +void +svga_init_rasterizer_functions(struct svga_context *svga) { svga->pipe.create_rasterizer_state = svga_create_rasterizer_state; svga->pipe.bind_rasterizer_state = svga_bind_rasterizer_state; svga->pipe.delete_rasterizer_state = svga_delete_rasterizer_state; } - - -/*********************************************************************** - * Hardware state update - */ - |