diff options
author | vadym.shovkoplias <[email protected]> | 2018-05-24 14:16:46 +0300 |
---|---|---|
committer | Rafael Antognolli <[email protected]> | 2018-07-27 10:07:44 -0700 |
commit | 399228ecad37f420be3028165b94d5d8d33516fc (patch) | |
tree | e23a053570a7c0aee27e81b5c53a3981ab42ae3d /src | |
parent | 665fc9cf55d820dedfbfc6e2d1ab31e6ba4a2c20 (diff) |
i965: Disable guardband clipping on SandyBridge for odd dimensions
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104388
Signed-off-by: Andriy Khulap <[email protected]>
Acked-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_state_upload.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index 9e0a17b9d93..672035c36ef 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -2508,6 +2508,17 @@ brw_calculate_guardband_size(uint32_t fb_width, uint32_t fb_height, */ const float gb_size = GEN_GEN >= 7 ? 16384.0f : 8192.0f; + /* Workaround: prevent gpu hangs on SandyBridge + * by disabling guardband clipping for odd dimensions. + */ + if (GEN_GEN == 6 && (fb_width & 1 || fb_height & 1)) { + *xmin = -1.0f; + *xmax = 1.0f; + *ymin = -1.0f; + *ymax = 1.0f; + return; + } + if (m00 != 0 && m11 != 0) { /* First, we compute the screen-space render area */ const float ss_ra_xmin = MIN3( 0, m30 + m00, m30 - m00); |