mesa/src
Kenneth Graunke ece0e535a4 i965: Always scissor on Gen6-7.5 instead of disabling guardband.
Previously we disabled the guardband when the viewport was smaller than
the framebuffer on Gen6-7.5, to prevent portions of primitives from
being draw outside of the viewport.  On Gen8+, we relied on the viewport
extents test to effectively scissor this away for us.

We can simply always enable scissoring instead.  We already include the
viewport in the scissor rectangle, so this will effectively do the
viewport extents test for us.  (The only difference is that the scissor
rectangle doesn't support sub-pixel values.  I think that's okay.)

Given that the viewport extents test is essentially a second scissor,
and is enabled for basically all 3D drawing on Gen8+, it stands to
reason that scissoring is cheap.  Enabling the guardband reduces the
cost of clipping, which is expensive.

The Windows driver appears to never disable guardband clipping, and
appears to use scissoring in this case.  I don't know if they leave
it on universally though.

This fixes misrendering in Blender, where the "floor plane" grid lines
started rendering at wrong angles after I disabled XY clipping of line
primitives.  Enabling the guardband seems to solve the issue.

Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99339
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-02-06 17:40:14 -08:00
..
amd radv: pass FMASK alignment to application 2017-02-07 10:42:01 +10:00
compiler spirv: add SPV_KHR_shader_draw_parameters support 2017-02-01 15:08:33 +00:00
egl android: fix droid_create_image_from_prime_fd_yuv for YV12 2017-02-03 07:44:33 +02:00
gallium swr: [rasterizer core] Removed unused clip code. 2017-02-06 16:30:50 -06:00
gbm gbm/dri: fix memory leaks in error path 2017-01-27 17:56:58 +00:00
getopt Introduce .editorconfig 2016-08-31 17:06:54 -07:00
glx glx: guard swap-interval functions against destroyed drawables 2017-02-06 17:39:30 +01:00
gtest gtest: Update to 1.8.0. 2017-01-20 11:40:52 -08:00
hgl glapi/hgl: remove the final user of _glapi_check_table() 2016-10-06 15:03:46 +01:00
intel anv/pipeline: set ThreadDispatchEnable conditionally 2017-02-06 10:27:44 +01:00
loader loader: Add an environment variable to override driver name choice. 2017-02-06 12:44:06 -08:00
mapi mapi: automake: include builddir prior to srcdir 2017-01-27 17:56:56 +00:00
mesa i965: Always scissor on Gen6-7.5 instead of disabling guardband. 2017-02-06 17:40:14 -08:00
util glsl: Switch to disable-by-default for the GLSL shader cache 2017-01-31 09:51:30 +11:00
vulkan vulkan/wsi: Lower the maximum image sizes 2017-01-25 09:05:30 -08:00
Makefile.am vulkan: automake: do not use EXTRA_DIST in a conditional 2017-01-18 13:41:32 +00:00
SConscript scons: put the generated git_sha1.h file in top-level src/ directory 2016-06-17 10:33:00 -06:00