gallium: add PIPE_SHADER_CAP_GLSL_16BIT_TEMPS for LowerPrecisionTemporaries
[mesa.git] / src / gallium / drivers / svga / svga_state_need_swtnl.c
index b07c62da40546f758cf1f9d6df16479d76770289..5a52c25a4c1ec30536f9cf134e8d0c0dce898011 100644 (file)
@@ -33,7 +33,7 @@
 
 
 static enum pipe_error
-update_need_swvfetch(struct svga_context *svga, unsigned dirty)
+update_need_swvfetch(struct svga_context *svga, uint64_t dirty)
 {
    if (!svga->curr.velems) {
       /* No vertex elements bound. */
@@ -58,7 +58,7 @@ struct svga_tracked_state svga_update_need_swvfetch =
 
 
 static enum pipe_error
-update_need_pipeline(struct svga_context *svga, unsigned dirty)
+update_need_pipeline(struct svga_context *svga, uint64_t dirty)
 {
    boolean need_pipeline = FALSE;
    struct svga_vertex_shader *vs = svga->curr.vs;
@@ -66,7 +66,8 @@ update_need_pipeline(struct svga_context *svga, unsigned dirty)
 
    /* SVGA_NEW_RAST, SVGA_NEW_REDUCED_PRIMITIVE
     */
-   if (svga->curr.rast->need_pipeline & (1 << svga->curr.reduced_prim)) {
+   if (svga->curr.rast &&
+       (svga->curr.rast->need_pipeline & (1 << svga->curr.reduced_prim))) {
       SVGA_DBG(DEBUG_SWTNL, "%s: rast need_pipeline (0x%x) & prim (0x%x)\n",
                  __FUNCTION__,
                  svga->curr.rast->need_pipeline,
@@ -103,7 +104,7 @@ update_need_pipeline(struct svga_context *svga, unsigned dirty)
 
    /* SVGA_NEW_FS, SVGA_NEW_RAST, SVGA_NEW_REDUCED_PRIMITIVE
     */
-   if (svga->curr.reduced_prim == PIPE_PRIM_POINTS) {
+   if (svga->curr.rast && svga->curr.reduced_prim == PIPE_PRIM_POINTS) {
       unsigned sprite_coord_gen = svga->curr.rast->templ.sprite_coord_enable;
       unsigned generic_inputs =
          svga->curr.fs ? svga->curr.fs->generic_inputs : 0;
@@ -155,7 +156,7 @@ struct svga_tracked_state svga_update_need_pipeline =
 
 
 static enum pipe_error
-update_need_swtnl(struct svga_context *svga, unsigned dirty)
+update_need_swtnl(struct svga_context *svga, uint64_t dirty)
 {
    boolean need_swtnl;