svga: Update state prototypes to return pipe_error.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 2 Nov 2011 10:32:20 +0000 (10:32 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 2 Nov 2011 11:18:35 +0000 (11:18 +0000)
Fixes a bunch of prototype mismatch warnings..

src/gallium/drivers/svga/svga_state_framebuffer.c
src/gallium/drivers/svga/svga_state_need_swtnl.c
src/gallium/drivers/svga/svga_state_tss.c
src/gallium/drivers/svga/svga_state_vs.c
src/gallium/drivers/svga/svga_swtnl_private.h
src/gallium/drivers/svga/svga_swtnl_state.c

index 93f8f6a951d8a7b4e35eb7521fa6da46f69635b0..8c0dddf7ae758c4e5183143638bbb5ba48297fac 100644 (file)
@@ -38,8 +38,9 @@
  */
 
 
-static int emit_framebuffer( struct svga_context *svga,
-                             unsigned dirty )
+static enum pipe_error
+emit_framebuffer( struct svga_context *svga,
+                  unsigned dirty )
 {
    const struct pipe_framebuffer_state *curr = &svga->curr.framebuffer;
    struct pipe_framebuffer_state *hw = &svga->state.hw_clear.framebuffer;
@@ -160,8 +161,9 @@ struct svga_tracked_state svga_hw_framebuffer =
 /*********************************************************************** 
  */
 
-static int emit_viewport( struct svga_context *svga,
-                          unsigned dirty )
+static enum pipe_error
+emit_viewport( struct svga_context *svga,
+               unsigned dirty )
 {
    const struct pipe_viewport_state *viewport = &svga->curr.viewport;
    struct svga_prescale prescale;
@@ -438,8 +440,9 @@ struct svga_tracked_state svga_hw_viewport =
 /***********************************************************************
  * Scissor state
  */
-static int emit_scissor_rect( struct svga_context *svga,
-                              unsigned dirty )
+static enum pipe_error
+emit_scissor_rect( struct svga_context *svga,
+                   unsigned dirty )
 {
    const struct pipe_scissor_state *scissor = &svga->curr.scissor;
    SVGA3dRect rect;
@@ -465,8 +468,9 @@ struct svga_tracked_state svga_hw_scissor =
  * Userclip state
  */
 
-static int emit_clip_planes( struct svga_context *svga,
-                             unsigned dirty )
+static enum pipe_error
+emit_clip_planes( struct svga_context *svga,
+                  unsigned dirty )
 {
    unsigned i;
    enum pipe_error ret;
index 5a37f9fc2871bb962a4b5444744e69433b9e5909..5693c1ac9b2bac210715ec917f06abe67a8cce1c 100644 (file)
@@ -71,8 +71,9 @@ svga_translate_vertex_format(enum pipe_format format)
 }
 
 
-static int update_need_swvfetch( struct svga_context *svga,
-                                 unsigned dirty )
+static enum pipe_error
+update_need_swvfetch( struct svga_context *svga,
+                      unsigned dirty )
 {
    unsigned i;
    boolean need_swvfetch = FALSE;
@@ -110,8 +111,9 @@ struct svga_tracked_state svga_update_need_swvfetch =
 /*********************************************************************** 
  */
 
-static int update_need_pipeline( struct svga_context *svga,
-                                 unsigned dirty )
+static enum pipe_error
+update_need_pipeline( struct svga_context *svga,
+                      unsigned dirty )
 {
    
    boolean need_pipeline = FALSE;
@@ -165,8 +167,9 @@ struct svga_tracked_state svga_update_need_pipeline =
 /*********************************************************************** 
  */
 
-static int update_need_swtnl( struct svga_context *svga,
-                              unsigned dirty )
+static enum pipe_error
+update_need_swtnl( struct svga_context *svga,
+                   unsigned dirty )
 {
    boolean need_swtnl;
 
index 8dc51b707808f53004b84513156dfa689f1231ec..3015a446fe299fbbd75e5c1882d79bf9fe5b5bd4 100644 (file)
@@ -63,7 +63,7 @@ struct bind_queue {
 };
 
 
-static int
+static enum pipe_error
 update_tss_binding(struct svga_context *svga, 
                    unsigned dirty )
 {
@@ -284,7 +284,7 @@ svga_queue_tss( struct ts_queue *q,
 }
 
 
-static int
+static enum pipe_error
 update_tss(struct svga_context *svga, 
            unsigned dirty )
 {
@@ -336,7 +336,7 @@ update_tss(struct svga_context *svga,
       SVGA_FIFOCommitAll( svga->swc );
    }
 
-   return 0;
+   return PIPE_OK;
 
 fail:
    /* XXX: need to poison cached hardware state on failure to ensure
index 823f328dd3781e78ba53a3eb04c0e09cf6b285c6..0b3b5418e3b5322f9e3edf8607c1930c60c6c1e3 100644 (file)
@@ -175,8 +175,9 @@ struct svga_tracked_state svga_hw_vs =
 
 /***********************************************************************
  */
-static int update_zero_stride( struct svga_context *svga,
-                               unsigned dirty )
+static enum pipe_error
+update_zero_stride( struct svga_context *svga,
+                    unsigned dirty )
 {
    unsigned i;
 
index 8d0807084380c8098960f81a5b15c1873f7f73bd..608950d7af60c067c6d466e96e0fd0b1b47ace5b 100644 (file)
@@ -88,7 +88,7 @@ struct vbuf_render *
 svga_vbuf_render_create( struct svga_context *svga );
 
 
-int
+enum pipe_error
 svga_swtnl_update_vdecl( struct svga_context *svga );
 
 
index efda2f605b93fa1c68b96cdbe145a4565fa8d31e..cd1aa637a276b9313196b98a185b50dfed5af172 100644 (file)
@@ -83,8 +83,9 @@ static void set_draw_viewport( struct svga_context *svga )
    draw_set_viewport_state(svga->swtnl.draw, &vp);
 }
 
-static int update_swtnl_draw( struct svga_context *svga,
-                              unsigned dirty )
+static enum pipe_error
+update_swtnl_draw( struct svga_context *svga,
+                   unsigned dirty )
 {
    draw_flush( svga->swtnl.draw );
 
@@ -139,7 +140,8 @@ struct svga_tracked_state svga_update_swtnl_draw =
 };
 
 
-int svga_swtnl_update_vdecl( struct svga_context *svga )
+enum pipe_error
+svga_swtnl_update_vdecl( struct svga_context *svga )
 {
    struct svga_vbuf_render *svga_render = svga_vbuf_render(svga->swtnl.backend);
    struct draw_context *draw = svga->swtnl.draw;
@@ -221,8 +223,9 @@ int svga_swtnl_update_vdecl( struct svga_context *svga )
 }
 
 
-static int update_swtnl_vdecl( struct svga_context *svga,
-                               unsigned dirty )
+static enum pipe_error
+update_swtnl_vdecl( struct svga_context *svga,
+                    unsigned dirty )
 {
    return svga_swtnl_update_vdecl( svga );
 }