aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 2d56b749ea3..2aefd35832c 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -409,8 +409,8 @@ brw_setup_vue_key_clip_info(struct brw_context *brw,
}
}
-
-static void brw_upload_vs_prog(struct brw_context *brw)
+void
+brw_upload_vs_prog(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
struct brw_vs_prog_key key;
@@ -420,6 +420,17 @@ static void brw_upload_vs_prog(struct brw_context *brw)
struct gl_program *prog = (struct gl_program *) brw->vertex_program;
int i;
+ if (!brw_state_dirty(brw,
+ _NEW_BUFFERS |
+ _NEW_LIGHT |
+ _NEW_POINT |
+ _NEW_POLYGON |
+ _NEW_TEXTURE |
+ _NEW_TRANSFORM,
+ BRW_NEW_VERTEX_PROGRAM |
+ BRW_NEW_VS_ATTRIB_WORKAROUNDS))
+ return;
+
memset(&key, 0, sizeof(key));
/* Just upload the program verbatim for now. Always send it all
@@ -482,22 +493,6 @@ static void brw_upload_vs_prog(struct brw_context *brw)
}
}
-/* See brw_vs.c:
- */
-const struct brw_tracked_state brw_vs_prog = {
- .dirty = {
- .mesa = _NEW_BUFFERS |
- _NEW_LIGHT |
- _NEW_POINT |
- _NEW_POLYGON |
- _NEW_TEXTURE |
- _NEW_TRANSFORM,
- .brw = BRW_NEW_VERTEX_PROGRAM |
- BRW_NEW_VS_ATTRIB_WORKAROUNDS,
- },
- .emit = brw_upload_vs_prog
-};
-
bool
brw_vs_precompile(struct gl_context *ctx,
struct gl_shader_program *shader_prog,