svga: whitespace, formatting fixes in svga_swtnl_state.c
This commit is contained in:
@@ -48,7 +48,8 @@
|
|||||||
#define SVGA_TRIANGLE_ADJ_Y -0.5f
|
#define SVGA_TRIANGLE_ADJ_Y -0.5f
|
||||||
|
|
||||||
|
|
||||||
static void set_draw_viewport( struct svga_context *svga )
|
static void
|
||||||
|
set_draw_viewport(struct svga_context *svga)
|
||||||
{
|
{
|
||||||
struct pipe_viewport_state vp = svga->curr.viewport;
|
struct pipe_viewport_state vp = svga->curr.viewport;
|
||||||
float adjx = 0.0f;
|
float adjx = 0.0f;
|
||||||
@@ -97,39 +98,38 @@ static void set_draw_viewport( struct svga_context *svga )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static enum pipe_error
|
static enum pipe_error
|
||||||
update_swtnl_draw( struct svga_context *svga,
|
update_swtnl_draw(struct svga_context *svga, unsigned dirty)
|
||||||
unsigned dirty )
|
|
||||||
{
|
{
|
||||||
SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_SWTNLUPDATEDRAW);
|
SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_SWTNLUPDATEDRAW);
|
||||||
|
|
||||||
draw_flush( svga->swtnl.draw );
|
draw_flush(svga->swtnl.draw);
|
||||||
|
|
||||||
if (dirty & SVGA_NEW_VS)
|
if (dirty & SVGA_NEW_VS)
|
||||||
draw_bind_vertex_shader(svga->swtnl.draw,
|
draw_bind_vertex_shader(svga->swtnl.draw,
|
||||||
svga->curr.vs->draw_shader);
|
svga->curr.vs->draw_shader);
|
||||||
|
|
||||||
if (dirty & SVGA_NEW_FS)
|
if (dirty & SVGA_NEW_FS)
|
||||||
draw_bind_fragment_shader(svga->swtnl.draw,
|
draw_bind_fragment_shader(svga->swtnl.draw,
|
||||||
svga->curr.fs->draw_shader);
|
svga->curr.fs->draw_shader);
|
||||||
|
|
||||||
if (dirty & SVGA_NEW_VBUFFER)
|
if (dirty & SVGA_NEW_VBUFFER)
|
||||||
draw_set_vertex_buffers(svga->swtnl.draw, 0,
|
draw_set_vertex_buffers(svga->swtnl.draw, 0,
|
||||||
svga->curr.num_vertex_buffers,
|
svga->curr.num_vertex_buffers,
|
||||||
svga->curr.vb);
|
svga->curr.vb);
|
||||||
|
|
||||||
if (dirty & SVGA_NEW_VELEMENT)
|
if (dirty & SVGA_NEW_VELEMENT)
|
||||||
draw_set_vertex_elements(svga->swtnl.draw,
|
draw_set_vertex_elements(svga->swtnl.draw,
|
||||||
svga->curr.velems->count,
|
svga->curr.velems->count,
|
||||||
svga->curr.velems->velem );
|
svga->curr.velems->velem);
|
||||||
|
|
||||||
if (dirty & SVGA_NEW_CLIP)
|
if (dirty & SVGA_NEW_CLIP)
|
||||||
draw_set_clip_state(svga->swtnl.draw,
|
draw_set_clip_state(svga->swtnl.draw,
|
||||||
&svga->curr.clip);
|
&svga->curr.clip);
|
||||||
|
|
||||||
if (dirty & (SVGA_NEW_VIEWPORT |
|
if (dirty & (SVGA_NEW_VIEWPORT |
|
||||||
SVGA_NEW_REDUCED_PRIMITIVE |
|
SVGA_NEW_REDUCED_PRIMITIVE |
|
||||||
SVGA_NEW_RAST))
|
SVGA_NEW_RAST))
|
||||||
set_draw_viewport( svga );
|
set_draw_viewport(svga);
|
||||||
|
|
||||||
if (dirty & SVGA_NEW_RAST)
|
if (dirty & SVGA_NEW_RAST)
|
||||||
draw_set_rasterizer_state(svga->swtnl.draw,
|
draw_set_rasterizer_state(svga->swtnl.draw,
|
||||||
@@ -142,7 +142,7 @@ update_swtnl_draw( struct svga_context *svga,
|
|||||||
* format for no bound depth (PIPE_FORMAT_NONE).
|
* format for no bound depth (PIPE_FORMAT_NONE).
|
||||||
*/
|
*/
|
||||||
if (dirty & SVGA_NEW_FRAME_BUFFER)
|
if (dirty & SVGA_NEW_FRAME_BUFFER)
|
||||||
draw_set_zs_format(svga->swtnl.draw,
|
draw_set_zs_format(svga->swtnl.draw,
|
||||||
(svga->curr.framebuffer.zsbuf) ?
|
(svga->curr.framebuffer.zsbuf) ?
|
||||||
svga->curr.framebuffer.zsbuf->format : PIPE_FORMAT_NONE);
|
svga->curr.framebuffer.zsbuf->format : PIPE_FORMAT_NONE);
|
||||||
|
|
||||||
@@ -211,7 +211,8 @@ svga_vdecl_to_input_element(struct svga_context *svga,
|
|||||||
ret = SVGA3D_vgpu10_DefineElementLayout(svga->swc, num_decls, id, elements);
|
ret = SVGA3D_vgpu10_DefineElementLayout(svga->swc, num_decls, id, elements);
|
||||||
if (ret != PIPE_OK) {
|
if (ret != PIPE_OK) {
|
||||||
svga_context_flush(svga, NULL);
|
svga_context_flush(svga, NULL);
|
||||||
ret = SVGA3D_vgpu10_DefineElementLayout(svga->swc, num_decls, id, elements);
|
ret = SVGA3D_vgpu10_DefineElementLayout(svga->swc, num_decls,
|
||||||
|
id, elements);
|
||||||
assert(ret == PIPE_OK);
|
assert(ret == PIPE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +221,7 @@ svga_vdecl_to_input_element(struct svga_context *svga,
|
|||||||
|
|
||||||
|
|
||||||
enum pipe_error
|
enum pipe_error
|
||||||
svga_swtnl_update_vdecl( struct svga_context *svga )
|
svga_swtnl_update_vdecl(struct svga_context *svga)
|
||||||
{
|
{
|
||||||
struct svga_vbuf_render *svga_render = svga_vbuf_render(svga->swtnl.backend);
|
struct svga_vbuf_render *svga_render = svga_vbuf_render(svga->swtnl.backend);
|
||||||
struct draw_context *draw = svga->swtnl.draw;
|
struct draw_context *draw = svga->swtnl.draw;
|
||||||
@@ -364,10 +365,9 @@ done:
|
|||||||
|
|
||||||
|
|
||||||
static enum pipe_error
|
static enum pipe_error
|
||||||
update_swtnl_vdecl( struct svga_context *svga,
|
update_swtnl_vdecl(struct svga_context *svga, unsigned dirty)
|
||||||
unsigned dirty )
|
|
||||||
{
|
{
|
||||||
return svga_swtnl_update_vdecl( svga );
|
return svga_swtnl_update_vdecl(svga);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user