[Mesa-dev] [PATCH] i965: Set dirty bit for NOS fragment shader change
Mike Stroyan
mike at lunarg.com
Mon Dec 22 16:22:07 PST 2014
A fragment program can change because of Non-Orthogonal-State changes.
brw_update_texture_surfaces needs to run because of changed surface offsets.
Set BRW_NEW_FRAGMENT_PROGRAM dirty bit in brw_upload_wm_prog to signal that.
---
src/mesa/drivers/dri/i965/brw_wm.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index e7939f0..c212892 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -601,7 +601,14 @@ brw_upload_wm_prog(struct brw_context *brw)
(void) success;
assert(success);
}
- brw->wm.base.prog_data = &brw->wm.prog_data->base;
+ if (brw->wm.base.prog_data != &brw->wm.prog_data->base) {
+ /* Fragment program can change because of only NOS changes.
+ * Set dirty bit to signal that change.
+ * brw_update_texture_surfaces needs to run for changed surface offsets.
+ */
+ brw->wm.base.prog_data = &brw->wm.prog_data->base;
+ brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
+ }
}
--
2.1.0
More information about the mesa-dev
mailing list