From 7c057f2360106488365e07af8055b4c696d855a3 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 8 Nov 2011 11:21:00 -0800 Subject: [PATCH] i965: Add missing CACHE_NEW_WM_PROG dirty bit to WM pull constants. 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 Reviewed-by: Eric Anholt Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 5 +++-- 1 file 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 5d04de6af8f..d1203134b81 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -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, }; -- 2.30.2