i965: Add missing CACHE_NEW_WM_PROG dirty bit to WM pull constants.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 8 Nov 2011 19:21:00 +0000 (11:21 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 11 Nov 2011 06:51:18 +0000 (22:51 -0800)
Comparing brw_upload_vs_pull_constants and brw_upload_wm_pull_constants,
it became evident that something was amiss: the VS code had both
CACHE_NEW_VS_PROG and BRW_NEW_VERTEX_PROGRAM, while the WM code was
missing the CACHE_NEW_WM_PROG flag.

Not observed to fix anything, but likely necessary.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index 5d04de6af8fc2f40b4e0d330ed96c37028e4ce6f..d1203134b81c2f98bbc7f6ece782aeefd64c5fe9 100644 (file)
@@ -359,6 +359,7 @@ brw_upload_wm_pull_constants(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    struct intel_context *intel = &brw->intel;
+   /* BRW_NEW_FRAGMENT_PROGRAM */
    struct brw_fragment_program *fp =
       (struct brw_fragment_program *) brw->fragment_program;
    const int size = brw->wm.prog_data->nr_pull_params * sizeof(float);
@@ -367,7 +368,7 @@ brw_upload_wm_pull_constants(struct brw_context *brw)
 
    _mesa_load_state_parameters(ctx, fp->program.Base.Parameters);
 
-   /* BRW_NEW_FRAGMENT_PROGRAM */
+   /* CACHE_NEW_WM_PROG */
    if (brw->wm.prog_data->nr_pull_params == 0) {
       if (brw->wm.const_bo) {
         drm_intel_bo_unreference(brw->wm.const_bo);
@@ -397,7 +398,7 @@ const struct brw_tracked_state brw_wm_constants = {
    .dirty = {
       .mesa = (_NEW_PROGRAM_CONSTANTS),
       .brw = (BRW_NEW_FRAGMENT_PROGRAM),
-      .cache = 0
+      .cache = CACHE_NEW_WM_PROG,
    },
    .emit = brw_upload_wm_pull_constants,
 };