svga: check for and skip null vertex buffer pointers
[mesa.git] / src / mesa / drivers / dri / i965 / brw_sf_state.c
index a8f58d9d50e3306a54b49ab6717c37f1bef3f378..d7e7aa11f63a11bdc6625ef90255c7092d4f5e25 100644 (file)
@@ -119,7 +119,7 @@ const struct brw_tracked_state brw_sf_vp = {
       .brw   = BRW_NEW_BATCH,
       .cache = 0
    },
-   .prepare = upload_sf_vp
+   .emit = upload_sf_vp
 };
 
 /**
@@ -272,6 +272,7 @@ static void upload_sf_unit( struct brw_context *brw )
    sf->sf7.point_size = CLAMP(rint(CLAMP(ctx->Point.Size,
                                         ctx->Point.MinSize,
                                         ctx->Point.MaxSize)), 1, 255) * (1<<3);
+   /* _NEW_PROGRAM | _NEW_POINT */
    sf->sf7.use_point_size_state = !(ctx->VertexProgram.PointSizeEnabled ||
                                    ctx->Point._Attenuated);
    sf->sf7.aa_line_distance_mode = 0;
@@ -313,6 +314,7 @@ static void upload_sf_unit( struct brw_context *brw )
 const struct brw_tracked_state brw_sf_unit = {
    .dirty = {
       .mesa  = (_NEW_POLYGON | 
+               _NEW_PROGRAM |
                _NEW_LIGHT |
                _NEW_LINE | 
                _NEW_POINT | 
@@ -324,5 +326,5 @@ const struct brw_tracked_state brw_sf_unit = {
       .cache = (CACHE_NEW_SF_VP |
                CACHE_NEW_SF_PROG)
    },
-   .prepare = upload_sf_unit,
+   .emit = upload_sf_unit,
 };