https://bugs.freedesktop.org/show_bug.cgi?id=83785
Roland Scheidegger <srol...@vmware.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |enhancement Component|Mesa core |Other --- Comment #1 from Roland Scheidegger <srol...@vmware.com> --- Are you talking about specific drivers? Doesn't look like a mesa core problem to me, since if it's a uniform glsl can't do anything, and drivers will have to handle that appropriately (typically hw either has if/else constructs with implicit built-in mask evaluation so there's jump addresses specified there (intel hd graphics seems to work like that) or the jump is done explicitly (radeon gcn seems to do that). If you're talking llvmpipe, you would be right it always evaluates all branches, no matter the current condition mask (which, in case the branch condition is based only on uniforms, indeed means one part of the branch will always be executed for nothing), and simply masks out the values for the not taken branch part when storing the values. This is probably both due to simplicity and historical reasons (don't forget early programmable hw did not always have true branches neither). It is something I was thinking about, I think there'd definitely be benefits but I never looked at it closely enough to know how much work it would be. For starters, you'd need to put the code in the branches into different basic blocks, and get all the things right related to it. In some cases it could possibly be a loss due to missing some optimizations (if both branches need to be evaluated - I don't think you'd want to do this just in case of uniform branch condition, though this might be a start). -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev