On Mon, Oct 17, 2016 at 8:21 PM, Brian Paul <bri...@vmware.com> wrote: > The series looks OK to me. > > Acked-by: Brian Paul <bri...@vmware.com> > > I guess I have a general question though. Over the years of debugging GL > apps I've seen a few that generate pretty huge shaders (in terms of TGSI > instructions). I recall one (can't remember the app) in which a moderate > size shader compiled into several 10s of thousands of instruction. The > cause was all the function call inlining. > > I'm wondering if there are cases where not inlining everything and using > actual subroutines would make sense. Has anyone ever taken a look into > that? Do any modern devices have a limit on program instructions?
No, there is no limit on program instructions since DX10 I think. Shaders are just memory allocations that end with an "end" instruction. I guess compilation takes longer with longer shaders, but function inlining usually decreases register usage, which increases GPU occupancy and improves latency hiding, which means better performance. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev