On Fri, Feb 10, 2017 at 3:23 PM, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > On 10.02.2017 15:01, Nicolai Hähnle wrote: >> >> On 08.02.2017 19:03, Marek Olšák wrote: >>> >>> From: Paul Berry <stereotype...@gmail.com> >>> >>> This is not yet used in the build, just generated. >>> >>> v2: Add missing build dependencies. >>> v3: Avoid mixing declarations and code, remove logic for avoiding >>> emitting >>> code that the compiler's optimizer can deal with anyway. >> >> >> For the unmarshalling, have you considered simply generating a function >> pointer table indexed by DISPATCH_CMD_*? >> >> gcc transforms the giant switch into a jump table anyway, I suspect the >> compiler will generate a jump table anyway, but ends up having an >> additional call indirection (call _mesa_unmarshal_dispatch_cmd + call >> actual unmarshal function). > > > Never mind, this would only be interesting for commands with custom > unmarshaling, and there are probably quite few of those.
Mesa with glthread might spend more time in the umarshalling code than in the Mesa/Gallium code, so a lot of optimizations will be necessary there to make the dispatch more efficient at least for lower latency if not for performance. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev