i965/gen6+: Add a missing state flag for WM constants.
authorEric Anholt <eric@anholt.net>
Thu, 16 Jun 2011 00:32:07 +0000 (17:32 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 20 Jun 2011 15:37:42 +0000 (08:37 -0700)
src/mesa/drivers/dri/i965/gen6_wm_state.c
src/mesa/drivers/dri/i965/gen7_wm_state.c

index 024a1d879e7e9f7accd4e5f01f70b6098c888136..62e060098b1ac532fde48a584fa4c8d5f5093fa3 100644 (file)
@@ -39,6 +39,7 @@ gen6_prepare_wm_push_constants(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
    struct gl_context *ctx = &intel->ctx;
+   /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct brw_fragment_program *fp =
       brw_fragment_program_const(brw->fragment_program);
 
@@ -48,6 +49,7 @@ gen6_prepare_wm_push_constants(struct brw_context *brw)
    /* XXX: Should this happen somewhere before to get our state flag set? */
    _mesa_load_state_parameters(ctx, fp->program.Base.Parameters);
 
+   /* CACHE_NEW_VS_PROG */
    if (brw->wm.prog_data->nr_params != 0) {
       float *constants;
       unsigned int i;
@@ -83,7 +85,7 @@ const struct brw_tracked_state gen6_wm_constants = {
       .mesa  = _NEW_PROGRAM_CONSTANTS,
       .brw   = (BRW_NEW_BATCH |
                BRW_NEW_FRAGMENT_PROGRAM),
-      .cache = 0,
+      .cache = CACHE_NEW_VS_PROG,
    },
    .prepare = gen6_prepare_wm_push_constants,
 };
index ac6ba2fed1230ede4607fc7ab17f6f7e9279da3b..239f6616cde8bc651d822d8c72b26306710f4bad 100644 (file)
@@ -36,6 +36,7 @@ gen7_prepare_wm_constants(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
    struct gl_context *ctx = &intel->ctx;
+   /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct brw_fragment_program *fp =
       brw_fragment_program_const(brw->fragment_program);
 
@@ -45,7 +46,7 @@ gen7_prepare_wm_constants(struct brw_context *brw)
    /* XXX: Should this happen somewhere before to get our state flag set? */
    _mesa_load_state_parameters(ctx, fp->program.Base.Parameters);
 
-   /* BRW_NEW_FRAGMENT_PROGRAM */
+   /* CACHE_NEW_WM_PROG */
    if (brw->wm.prog_data->nr_params != 0) {
       float *constants;
       unsigned int i;
@@ -80,7 +81,7 @@ const struct brw_tracked_state gen7_wm_constants = {
    .dirty = {
       .mesa  = _NEW_PROGRAM_CONSTANTS,
       .brw   = (BRW_NEW_BATCH | BRW_NEW_FRAGMENT_PROGRAM),
-      .cache = 0,
+      .cache = CACHE_NEW_WM_PROG,
    },
    .prepare = gen7_prepare_wm_constants,
 };