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 <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
Kenneth Graunke 2011-11-08 11:21:00 -08:00
parent c3e3903a90
commit 7c057f2360

View 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,
};