mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
i965: Consider all viewports before enabling guardband clipping
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
bdff9a6e47
commit
d3ee8ba346
1 changed files with 9 additions and 5 deletions
|
|
@ -96,11 +96,15 @@ upload_clip_state(struct brw_context *brw)
|
|||
dw2 |= (ctx->Transform.ClipPlanesEnabled <<
|
||||
GEN6_USER_CLIP_CLIP_DISTANCES_SHIFT);
|
||||
|
||||
if (ctx->ViewportArray[0].X == 0 &&
|
||||
ctx->ViewportArray[0].Y == 0 &&
|
||||
ctx->ViewportArray[0].Width == (float) fb->Width &&
|
||||
ctx->ViewportArray[0].Height == (float) fb->Height) {
|
||||
dw2 |= GEN6_CLIP_GB_TEST;
|
||||
dw2 |= GEN6_CLIP_GB_TEST;
|
||||
for (unsigned i = 0; i < ctx->Const.MaxViewports; i++) {
|
||||
if (ctx->ViewportArray[i].X != 0 ||
|
||||
ctx->ViewportArray[i].Y != 0 ||
|
||||
ctx->ViewportArray[i].Width != (float) fb->Width ||
|
||||
ctx->ViewportArray[i].Height != (float) fb->Height) {
|
||||
dw2 &= ~GEN6_CLIP_GB_TEST;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* BRW_NEW_RASTERIZER_DISCARD */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue