Broadwell's winding order, polygon fill, and viewport Z test fields have
moved to DWord 1 of 3DSTATE_RASTER.
v2: Add a perf_debug for a future optimization and improve commit
message (both suggested by Eric Anholt).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
&gen8_vs_state,
&gen7_gs_state,
&gen7_sol_state,
- &gen7_clip_state,
+ &gen6_clip_state,
&gen8_raster_state,
&gen8_sbe_state,
&gen8_sf_state,
dw2 |= GEN6_CLIP_NON_PERSPECTIVE_BARYCENTRIC_ENABLE;
}
- if (brw->gen >= 7) {
+ if (brw->gen >= 7)
dw1 |= GEN7_CLIP_EARLY_CULL;
+ if (brw->gen == 7) {
/* _NEW_POLYGON */
if ((ctx->Polygon.FrontFace == GL_CCW) ^ _mesa_is_user_fbo(fb))
dw1 |= GEN7_CLIP_WINDING_CCW;
}
}
- if (!ctx->Transform.DepthClamp)
+ if (brw->gen < 8 && !ctx->Transform.DepthClamp)
dw2 |= GEN6_CLIP_Z_TEST;
/* _NEW_LIGHT */
ctx->ViewportArray[i].Width != (float) fb->Width ||
ctx->ViewportArray[i].Height != (float) fb->Height) {
dw2 &= ~GEN6_CLIP_GB_TEST;
+ if (brw->gen >= 8) {
+ perf_debug("Disabling GB clipping due to lack of Gen8 viewport "
+ "clipping setup code. This should be fixed.");
+ }
break;
}
}