[965] Fix some missing initialization in WM keys.
authorEric Anholt <eric@anholt.net>
Thu, 3 Jan 2008 22:47:35 +0000 (14:47 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 3 Jan 2008 22:49:33 +0000 (14:49 -0800)
src/mesa/drivers/dri/i965/brw_wm_state.c

index 02443c50d0589c839933a13ce9faf9d3b56c138a..c2735251029c78e22b9973a0df8d8ed015f01194 100644 (file)
@@ -63,6 +63,8 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
    const struct gl_fragment_program *fp = brw->fragment_program;
    struct intel_context *intel = &brw->intel;
 
+   memset(key, 0, sizeof(*key));
+
    if (INTEL_DEBUG & DEBUG_SINGLE_THREAD)
       key->max_threads = 1;
    else
@@ -71,12 +73,16 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
    /* CACHE_NEW_WM_PROG */
    key->total_grf = brw->wm.prog_data->total_grf;
    key->urb_entry_read_length = brw->wm.prog_data->urb_read_length;
+   key->curb_entry_read_length = brw->wm.prog_data->curb_read_length;
    key->dispatch_grf_start_reg = brw->wm.prog_data->first_curbe_grf;
    key->total_scratch = ALIGN(brw->wm.prog_data->total_scratch, 1024);
 
    /* BRW_NEW_URB_FENCE */
    key->urb_size = brw->urb.vsize;
 
+   /* BRW_NEW_CURBE_OFFSETS */
+   key->curbe_offset = brw->curbe.wm_start;
+
    /* CACHE_NEW_SURFACE */
    key->nr_surfaces = brw->wm.nr_surfaces;