|Summary:||Flickering shadows in unreleased title trace|
|Product:||Mesa||Reporter:||Courtney Goeltzenleuchter <courtney>|
|Component:||Drivers/DRI/i965||Assignee:||Mike Stroyan <mike>|
|Status:||RESOLVED FIXED||QA Contact:||Intel 3D Bugs Mailing List <intel-3d-bugs>|
|i915 platform:||i915 features:|
|Bug Depends on:|
Experimental patch that appears to work around flickering shadows issue.
[PATCH] i965: allocate at least 1 BLEND_STATE element
Description Courtney Goeltzenleuchter 2014-06-24 21:07:32 UTC
Created attachment 101697 [details] Experimental patch that appears to work around flickering shadows issue. Shadows are intermittently disappearing during trace playback. The effect is random (run to run), but consistent (within a run). We’ve triaged to the point we believe it has to do with uniform buffer update timing or caching. Inserting a batch buffer flush only for glBufferSubData with GL_UNIFORM_BUFFER circumvents the issue, but we do not considered it a fix. It does hack around it with no performance loss. More research is needed to find real root cause.
Comment 1 Matt Turner 2015-02-11 23:53:02 UTC
Comment 2 Mike Stroyan 2015-02-12 00:11:52 UTC
I found that adding BRW_NEW_FS_PROG_DATA to gen7_sf_clip_viewport fixes the flickering shadows. But I could not find any documented reason that would explain why the additional _3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL commands should be needed.
Comment 3 Dan Ginsburg 2015-06-24 00:03:17 UTC
This issue is cropping up in the newly released Dota 2 Reborn Beta. Someone is reporting seeing the bug here: https://github.com/ValveSoftware/Dota-2-Reborn/issues/55 I am seeing it on Intel Iris Pro both in mesa 10.3.2 and mesa 10.5.8 on Ubuntu 14.10 x86_64 Intel(R) Core(TM) i7-4770R CPU @ 3.20GHz I can't fully rule out an application bug at this point (I'm a developer on Dota 2 Reborn), but I'm not seeing the behavior on any other GPU/driver.
Comment 4 Mike Stroyan 2015-07-01 16:40:26 UTC
Created attachment 116847 [details] [review] [PATCH] i965: allocate at least 1 BLEND_STATE element I found the root cause for this. _3DSTATE_BLEND_STATE_POINTERS was pointing to random state data. That sometimes used alpha testing that suppressed rendering to depth buffer. Previous workarounds were just increasing the chance that the data was harmless. They created more state data that was workable as BLEND_STATE.