[Bug 98664] Fragment shader while loop causes geometry corruption

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Nov 18 21:51:01 UTC 2016


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

--- Comment #16 from Roland Scheidegger <sroland at vmware.com> ---
(In reply to Nicolai Hähnle from comment #14)
> I suspect the reason that the blob drivers do it this way is that if you
> don't, you're likely to hit a subtle bug with emit inside control flow. And
> making the effort to exploit the undefined-ness probably pays off very
> rarely, so...

Also, you can do this with dx10, so app developers porting things are somewhat
likely to get it wrong (I suppose that's similar to other such subtle issues
like discard killing your derivatives if you have per-pixel control flow with
gl, but not with dx10).
At least I think so from the description of emit:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh447053(v=vs.85).aspx
"emit causes all declared o# registers to be read out of the Geometry Shader to
generate a vertex." Doesn't say explicitly the registers are still valid
afterwards, but since reading a register usually doesn't nuke the value, the
reg getting undefined would be a side-effect which should have been
mentioned...

-- 
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/20161118/673ca7ed/attachment.html>


More information about the dri-devel mailing list