On 27 May 2016 at 21:11, Jason Ekstrand <ja...@jlekstrand.net> wrote:
> On Fri, May 27, 2016 at 11:49 AM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > >> Hello. >> >> http://en.cppreference.com/w/cpp/thread/future >> http://en.cppreference.com/w/cpp/thread/async >> >> Assumption: Shader compilation will need run on separate thread(s). >> >> From a certain perspective, one of the easy ways of removing Mesa shader >> compilation from the "main" thread would be to use std::future for some >> fields in struct gl_program (defined in mtypes.h) and in related source >> code. >> > > Given that mtypes.h is included (and struct gl_program) is used by a *lot* > of C code, I think using any sort of C++ there is a non-starter, 2011 or > otherwise. > > As far as threading goes, we have other ways of dealing with threading > than introducing C++11. Something that works with C is probably a better > path forward. > > >> Using std::future in the source code would mean that some parts of Mesa >> need to be converted from C to C++11. >> > > The "some parts" you're talking about are almost all of mesa. I don't > think that's going to happen. > > >> This post to mesa-dev is just to start the discussion and to determine >> how many devs are in favor of C++11 (and why) and how many are against >> C++11 (and why) in Mesa. >> >> I believe that most people agree with Jason here, at least I do. In general the less time we spend re-factoring, the more time we'll have for bringing features (and/or perf. improvements) to new and old hardware. Surely one can resolve the said issue, with a smaller hammer (and thus quicker) than C++11 ? Regards, Emil P.S. Don't be shy to reply on the build fix patch I've Cc'd you earlier. A "seems to work/Tested-by: ..." or any other input is welcome.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev