i965/nir/vec4: Implement linear interpolation
[mesa.git] / src / mesa / drivers / dri / i965 / brw_gs_state.c
index da8449c0056932d01de07ac2d98963249f16b85a..f7b14066594eeb319fe42253220eb528a38e9b7b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  Copyright (C) Intel Corp.  2006.  All Rights Reserved.
- Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
+ Intel funded Tungsten Graphics to
  develop this 3D driver.
 
  Permission is hereby granted, free of charge, to any person obtaining
@@ -26,7 +26,7 @@
  **********************************************************************/
  /*
   * Authors:
-  *   Keith Whitwell <keith@tungstengraphics.com>
+  *   Keith Whitwell <keithw@vmware.com>
   */
 
 
@@ -45,7 +45,7 @@ brw_upload_gs_unit(struct brw_context *brw)
 
    memset(gs, 0, sizeof(*gs));
 
-   /* BRW_NEW_PROGRAM_CACHE | CACHE_NEW_GS_PROG */
+   /* BRW_NEW_PROGRAM_CACHE | BRW_NEW_GS_PROG_DATA */
    if (brw->ff_gs.prog_active) {
       gs->thread0.grf_reg_count = (ALIGN(brw->ff_gs.prog_data->total_grf, 16) /
                                   16 - 1);
@@ -83,17 +83,19 @@ brw_upload_gs_unit(struct brw_context *brw)
    if (unlikely(INTEL_DEBUG & DEBUG_STATS))
       gs->thread4.stats_enable = 1;
 
-   brw->state.dirty.cache |= CACHE_NEW_FF_GS_UNIT;
+   gs->gs6.max_vp_index = brw->ctx.Const.MaxViewports - 1;
+
+   brw->ctx.NewDriverState |= BRW_NEW_GEN4_UNIT_STATE;
 }
 
 const struct brw_tracked_state brw_gs_unit = {
    .dirty = {
       .mesa  = 0,
-      .brw   = (BRW_NEW_BATCH |
-               BRW_NEW_PROGRAM_CACHE |
-               BRW_NEW_CURBE_OFFSETS |
-               BRW_NEW_URB_FENCE),
-      .cache = CACHE_NEW_FF_GS_PROG
+      .brw   = BRW_NEW_BATCH |
+               BRW_NEW_CURBE_OFFSETS |
+               BRW_NEW_FF_GS_PROG_DATA |
+               BRW_NEW_PROGRAM_CACHE |
+               BRW_NEW_URB_FENCE,
    },
    .emit = brw_upload_gs_unit,
 };