[Bug 93594] Flickering Shadows in The Talos Principle

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 17 21:12:29 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=93594

--- Comment #12 from Roland Scheidegger <sroland at vmware.com> ---
(In reply to Marek Olšák from comment #10)
> The GLSL shader is using discard followed by fwidth. This is undefined
> behavior.
> 
> Therefore, it's an application bug.

I wasn't aware of this difference, but seeing this bug made me suspicious, and
indeed d3d10 is saying for discard:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh446968%28v=vs.85%29.aspx
"This instruction flags the current pixel as terminated, while continuing
execution, so that other pixels executing in parallel may obtain derivatives if
necessary. Even though execution continues, all Pixel Shader output writes
before or after the discard instruction are discarded."

That's very interesting...

gallium docs don't actually say anything about this neither naturally. (I think
it should work in llvmpipe, because indeed we only update the pixel alive
mask.)

Due to d3d10 being different there, I wouldn't be surprised if other apps make
the same mistake.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160217/040f179f/attachment-0001.html>


More information about the dri-devel mailing list