radeonsi: emit TA_BC_BASE_ADDR_HI for border color on CIK
[mesa.git] / src / gallium / drivers / svga / svga_state_vdecl.c
index 47eab1a9739eadcbf171c7bc71978c1ba57cee8b..557f304d23e6ec6e990ab4e0fe75037a44031e96 100644 (file)
 #include "svga_tgsi.h"
 #include "svga_screen.h"
 #include "svga_resource_buffer.h"
-
 #include "svga_hw_reg.h"
 
 
-/***********************************************************************
- */
-
 
-static int emit_hw_vs_vdecl( struct svga_context *svga,
-                             unsigned dirty )
+static enum pipe_error
+emit_hw_vs_vdecl(struct svga_context *svga, unsigned dirty)
 {
    const struct pipe_vertex_element *ve = svga->curr.velems->velem;
    SVGA3dVertexDecl decl;
@@ -53,7 +49,7 @@ static int emit_hw_vs_vdecl( struct svga_context *svga,
    assert(svga->curr.velems->count >=
           svga->curr.vs->base.info.file_count[TGSI_FILE_INPUT]);
 
-   svga_hwtnl_reset_vdecl( svga->hwtnl, 
+   svga_hwtnl_reset_vdecl( svga->hwtnl,
                            svga->curr.velems->count );
 
    /**
@@ -127,24 +123,24 @@ static int emit_hw_vs_vdecl( struct svga_context *svga,
                         vb->buffer );
    }
 
-   svga_hwtnl_set_index_bias( svga->hwtnl, -neg_bias );
-   return 0;
+   svga_hwtnl_set_index_bias( svga->hwtnl, -(int) neg_bias );
+   return PIPE_OK;
 }
 
 
-static int emit_hw_vdecl( struct svga_context *svga,
-                          unsigned dirty )
+static enum pipe_error
+emit_hw_vdecl(struct svga_context *svga, unsigned dirty)
 {
    /* SVGA_NEW_NEED_SWTNL
     */
    if (svga->state.sw.need_swtnl)
-      return 0; /* Do not emit during swtnl */
+      return PIPE_OK; /* Do not emit during swtnl */
 
    return emit_hw_vs_vdecl( svga, dirty );
 }
 
 
-struct svga_tracked_state svga_hw_vdecl = 
+struct svga_tracked_state svga_hw_vdecl =
 {
    "hw vertex decl state (hwtnl version)",
    ( SVGA_NEW_NEED_SWTNL |
@@ -155,9 +151,3 @@ struct svga_tracked_state svga_hw_vdecl =
      SVGA_NEW_VS ),
    emit_hw_vdecl
 };
-
-
-
-
-
-