{
struct nouveau_channel* chan = nvfx->screen->base.channel;
unsigned dirty;
+ unsigned still_dirty = 0;
int all_swizzled = -1;
boolean flush_tex_cache = FALSE;
return FALSE;
}
- if(dirty & (NVFX_NEW_ARRAYS))
+ if(dirty & NVFX_NEW_ARRAYS)
{
if(!nvfx_vbo_validate(nvfx))
return FALSE;
}
+
+ if(dirty & NVFX_NEW_INDEX)
+ {
+ if(nvfx->use_index_buffer)
+ nvfx_idxbuf_validate(nvfx);
+ else
+ still_dirty = NVFX_NEW_INDEX;
+ }
}
else
{
if(dirty & (NVFX_NEW_VERTPROG | NVFX_NEW_UCP))
nvfx_vertprog_validate(nvfx);
- if(dirty & (NVFX_NEW_ARRAYS | NVFX_NEW_FRAGPROG))
+ if(dirty & (NVFX_NEW_ARRAYS | NVFX_NEW_INDEX | NVFX_NEW_FRAGPROG))
nvfx_vtxfmt_validate(nvfx);
}
OUT_RING(chan, 1);
}
}
- nvfx->dirty = 0;
+
+ nvfx->dirty = dirty & still_dirty;
+
+ unsigned render_temps = nvfx->state.render_temps;
+ if(render_temps)
+ {
+ for(int i = 0; i < nvfx->framebuffer.nr_cbufs; ++i)
+ {
+ if(render_temps & (1 << i))
+ util_dirty_surface_set_dirty(nvfx_surface_get_dirty_surfaces(nvfx->framebuffer.cbufs[i]),
+ (struct util_dirty_surface*)nvfx->framebuffer.cbufs[i]);
+ }
+
+ if(render_temps & 0x80)
+ util_dirty_surface_set_dirty(nvfx_surface_get_dirty_surfaces(nvfx->framebuffer.zsbuf),
+ (struct util_dirty_surface*)nvfx->framebuffer.zsbuf);
+ }
+
return TRUE;
}
;
MARK_RING(chan, max_relocs * 2, max_relocs * 2);
nvfx_state_relocate(nvfx);
-
- unsigned render_temps = nvfx->state.render_temps;
- if(render_temps)
- {
- for(int i = 0; i < nvfx->framebuffer.nr_cbufs; ++i)
- {
- if(render_temps & (1 << i))
- util_dirty_surface_set_dirty(nvfx_surface_get_dirty_surfaces(nvfx->framebuffer.cbufs[i]),
- (struct util_dirty_surface*)nvfx->framebuffer.cbufs[i]);
- }
-
- if(render_temps & 0x80)
- util_dirty_surface_set_dirty(nvfx_surface_get_dirty_surfaces(nvfx->framebuffer.zsbuf),
- (struct util_dirty_surface*)nvfx->framebuffer.zsbuf);
- }
}
void
nvfx_fragtex_relocate(nvfx);
nvfx_fragprog_relocate(nvfx);
if (nvfx->render_mode == HW)
+ {
nvfx_vbo_relocate(nvfx);
+ if(nvfx->use_index_buffer)
+ nvfx_idxbuf_relocate(nvfx);
+ }
}
boolean