Summary: | [GEN8+] Hang when discarding a fragment if dual source blending is enabled but shader doesn't support it | ||
---|---|---|---|
Product: | Mesa | Reporter: | Danylo <danylo.piliaiev> |
Component: | Drivers/DRI/i965 | Assignee: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | danylo.piliaiev |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=107306 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 107306 |
Description
Danylo
2018-07-02 13:58:53 UTC
Sent a patch to fix it https://patchwork.freedesktop.org/patch/235939/ (In reply to Danylo from comment #0) > The hang was found in Unigine Heaven 4.0 running in dx11 mode under wine > during the investigation of the bug > https://bugs.freedesktop.org/show_bug.cgi?id=103556. I believe this two > hangs are separate issues since one in the original bug seems to happened > with native Unigine version and doesn't happen anymore. Does Mesa use this drirc entry also when Heaven is run through Wine: --------------------------------------------------------------- <application name="Unigine Heaven (64-bit)" executable="heaven_x64"> <option name="allow_glsl_extension_directive_midshader" value="true" /> <!-- remove dual_color_blend_by_location if 4.1 ever comes out --> <option name="dual_color_blend_by_location" value="true" /> </application> --------------------------------------------------------------- ? (did you try native Heaven with Heaven drirc blend part commented out?) (In reply to Eero Tamminen from comment #2) > (In reply to Danylo from comment #0) > > The hang was found in Unigine Heaven 4.0 running in dx11 mode under wine > > during the investigation of the bug > > https://bugs.freedesktop.org/show_bug.cgi?id=103556. I believe this two > > hangs are separate issues since one in the original bug seems to happened > > with native Unigine version and doesn't happen anymore. > > Does Mesa use this drirc entry also when Heaven is run through Wine: > --------------------------------------------------------------- > <application name="Unigine Heaven (64-bit)" executable="heaven_x64"> > <option name="allow_glsl_extension_directive_midshader" > value="true" /> > <!-- remove dual_color_blend_by_location if 4.1 ever comes out > --> > <option name="dual_color_blend_by_location" value="true" /> > </application> > --------------------------------------------------------------- > ? No, under Wine process is "heaven.exe". > > (did you try native Heaven with Heaven drirc blend part commented out?) When blend workaround is commented in drirc there is a hang. Fixed by: commit eca4a6548d07bbbb02a7768edb397bad7b72cfc2 Author: Danylo Piliaiev <danylo.piliaiev@gmail.com> Date: Mon Jul 2 17:04:23 2018 +0300 i965: Disable dual source blending when shader doesn't support it on gen8+ Dual source blending behaviour is undefined when shader doesn't have second color output, dismissing fragment in such situation leads to a hang on gen8+ if depth test in enabled. Since blending cannot be gracefully fixed in such case and the result is undefined - blending is simply disabled. v2 (Kenneth Graunke): - Listen to BRW_NEW_FS_PROG_DATA in 3DSTATE_PS_BLEND - Also whack BLEND_STATE[] to keep the two in sync, since we're not sure exactly which copy of the redundant info the hardware will use. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107088 Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Kenneth, thanks for the review and improvements! Yeah! Thanks for reminding me about the patch, I completely forgot that you'd sent that months ago. :( Thanks for fixing! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.