i915: Invalidate all non-static indirect state at the beginning of HWZ render.

This commit is contained in:
Michel Dänzer 2007-05-11 12:49:26 +02:00
parent e48239578c
commit fa5279e289

View file

@ -1494,12 +1494,21 @@ static int i915_hwz_render(drm_device_t *dev,
DRM_DEBUG("Emitting %d DWORDs of static indirect state\n",
render->static_state_size);
BEGIN_RING(&dev_priv->ring, (7 * filp_priv->num_rects + 11 +
BEGIN_RING(&dev_priv->ring, (7 * filp_priv->num_rects + 20 +
(render->wait_flips ? 2 : 0) + 1) & ~1);
OUT_RING(GFX_OP_LOAD_INDIRECT | (1<<8) | (0<<14) | 1);
OUT_RING(GFX_OP_LOAD_INDIRECT | (0x3f<<8) | (0<<14) | 10);
OUT_RING(render->static_state_offset | (1<<1) | (1<<0));
OUT_RING(render->static_state_size - 1);
OUT_RING(0);
OUT_RING(0);
OUT_RING(0);
OUT_RING(0);
OUT_RING(0);
OUT_RING(0);
OUT_RING(0);
OUT_RING(0);
OUT_RING(0);
OUT_RING(CMD_MI_FLUSH /*| MI_NO_WRITE_FLUSH*/);
OUT_RING(CMD_MI_LOAD_REGISTER_IMM);
OUT_RING(Cache_Mode_0);
@ -1533,7 +1542,7 @@ static int i915_hwz_render(drm_device_t *dev,
OUT_RING(Cache_Mode_0);
OUT_RING(0x221 << 16 | 0x20);
if (!(filp_priv->num_rects & 0x1))
if (filp_priv->num_rects & 0x1)
OUT_RING(0);
i915_hwb_idle(dev, filp_priv, render->bpl_num);