diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2016-03-10 15:30:36 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2016-03-18 18:42:30 -0700 |
commit | 0de64ab7881cc4d343fecf8a2b5b9b9ca7b34416 (patch) | |
tree | 26e8eb41e975442208cce62fc05d99174f9583cb /src/mesa/drivers/dri/i965/gen6_sf_state.c | |
parent | d000a4989f66921832a33742ea07fa191393231b (diff) | |
download | external_mesa3d-0de64ab7881cc4d343fecf8a2b5b9b9ca7b34416.zip external_mesa3d-0de64ab7881cc4d343fecf8a2b5b9b9ca7b34416.tar.gz external_mesa3d-0de64ab7881cc4d343fecf8a2b5b9b9ca7b34416.tar.bz2 |
i965: Scissor to the viewport when rendering points/lines.
We're about to start allowing wide points/lines whose vertices are
outside the viewport past the clipper. This scissoring hack ensures
that any fragments generated are still restricted to the viewport.
It is not necessary on Gen8+ as those platforms already discard
fragments which are outside the viewport.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94453
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94454
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_sf_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_sf_state.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c index 3a337e8..42f9a5c 100644 --- a/src/mesa/drivers/dri/i965/gen6_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c @@ -351,8 +351,9 @@ upload_sf_state(struct brw_context *brw) unreachable("not reached"); } - /* _NEW_SCISSOR */ - if (ctx->Scissor.EnableFlags) + /* _NEW_SCISSOR _NEW_POLYGON BRW_NEW_GEOMETRY_PROGRAM BRW_NEW_PRIMITIVE */ + if (ctx->Scissor.EnableFlags || + is_drawing_points(brw) || is_drawing_lines(brw)) dw3 |= GEN6_SF_SCISSOR_ENABLE; /* _NEW_POLYGON */ |