{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
+ uint32_t dw1 = brw->meta_in_progress ? 0 : GEN6_CLIP_STATISTICS_ENABLE;
uint32_t dw2 = 0;
/* _NEW_BUFFERS */
BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_CLIP << 16 | (4 - 2));
- OUT_BATCH(GEN6_CLIP_STATISTICS_ENABLE);
+ OUT_BATCH(dw1);
OUT_BATCH(GEN6_CLIP_ENABLE |
GEN6_CLIP_API_OGL |
GEN6_CLIP_MODE_NORMAL |
const struct brw_tracked_state gen6_clip_state = {
.dirty = {
.mesa = _NEW_TRANSFORM | _NEW_LIGHT | _NEW_BUFFERS,
- .brw = (BRW_NEW_CONTEXT),
+ .brw = BRW_NEW_CONTEXT | BRW_NEW_META_IN_PROGRESS,
.cache = CACHE_NEW_WM_PROG
},
.emit = upload_clip_state,
{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
- uint32_t dw1 = GEN6_CLIP_STATISTICS_ENABLE, dw2 = 0;
+ uint32_t dw1 = 0, dw2 = 0;
/* _NEW_BUFFERS */
struct gl_framebuffer *fb = ctx->DrawBuffer;
bool render_to_fbo = _mesa_is_user_fbo(fb);
+ /* BRW_NEW_META_IN_PROGRESS */
+ if (!brw->meta_in_progress)
+ dw1 |= GEN6_CLIP_STATISTICS_ENABLE;
+
/* CACHE_NEW_WM_PROG */
if (brw->wm.prog_data->barycentric_interp_modes &
BRW_WM_NONPERSPECTIVE_BARYCENTRIC_BITS) {
_NEW_POLYGON |
_NEW_LIGHT |
_NEW_TRANSFORM),
- .brw = BRW_NEW_CONTEXT,
+ .brw = BRW_NEW_CONTEXT | BRW_NEW_META_IN_PROGRESS,
.cache = CACHE_NEW_WM_PROG
},
.emit = upload_clip_state,