[Mesa-dev] [PATCH 01/13] i965: Add missing CACHE_NEW_WM_PROG dirty bit to WM pull constants.

Kenneth Graunke kenneth at whitecape.org
Tue Nov 8 14:32:00 PST 2011


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 at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 534c127..06716ba 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -325,6 +325,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);
@@ -333,7 +334,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);
@@ -363,7 +364,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,
 };
-- 
1.7.7.1



More information about the mesa-dev mailing list