On Thu, 17 Nov 2011 19:58:53 -0800, Chad Versace <chad.vers...@linux.intel.com> wrote: > A lot of the state manipulation is handled by the meta-op state setup. > However, some batches need manual intervention. > > Signed-off-by: Chad Versace <chad.vers...@linux.intel.com> > --- > src/mesa/drivers/dri/i965/brw_draw.c | 9 ++++++++- > src/mesa/drivers/dri/i965/gen6_clip_state.c | 17 +++++++++++++++++ > src/mesa/drivers/dri/i965/gen6_depthstencil.c | 22 ++++++++++++++++++++-- > src/mesa/drivers/dri/i965/gen6_sf_state.c | 15 +++++++++++++-- > src/mesa/drivers/dri/i965/gen6_wm_state.c | 17 +++++++++++++++++ > 5 files changed, 75 insertions(+), 5 deletions(-)
> + if (brw->hiz.op) { > + /* HiZ operations emit a rectangle primitive, which requires clipping > to > + * be disabled. From page 10 of the Sandy Bridge PRM Volume 2 Part 1 > + * Section 1.3 3D Primitives Overview: > + * RECTLIST: > + * Either the CLIP unit should be DISABLED, or the CLIP unit's Clip > + * Mode should be set to a value other than CLIPMODE_NORMAL. > + */ > + BEGIN_BATCH(4); > + OUT_BATCH(_3DSTATE_CLIP << 16 | (4 - 2)); > + OUT_BATCH(0); > + OUT_BATCH(0); > + OUT_BATCH(0); > + ADVANCE_BATCH(); > + return; > + } > + > if (!ctx->Transform.DepthClamp) > depth_clamp = GEN6_CLIP_Z_TEST; This test for brw->hiz.op should have some sort of state flag associated with it in the brw_tracked_state struct. Otherwise, you have no guarantee that your upload function will get called. Same goes for other upload functions touched in this patch.
pgp8eVSukDkgt.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev