/* If the number of constants have changed, invalidate the shader. */
if (r300->shader_constants[shader].user_count != i) {
- r300->fs->translated = FALSE;
- r300_translate_fragment_shader(r300, r300->fs);
+ if (shader == PIPE_SHADER_FRAGMENT && r300->fs) {
+ r300->fs->translated = FALSE;
+ r300_translate_fragment_shader(r300, r300->fs);
+ } else if (shader == PIPE_SHADER_VERTEX && r300->vs) {
+ r300->vs->translated = FALSE;
+ r300_translate_vertex_shader(r300, r300->vs);
+ }
}
}
void r300_update_derived_state(struct r300_context* r300)
{
- if (r300->dirty_state & R300_NEW_FRAGMENT_SHADER) {
+ if (r300->dirty_state &
+ (R300_NEW_FRAGMENT_SHADER | R300_NEW_VERTEX_SHADER)) {
r300_update_vertex_layout(r300);
}