News for hackers. Stuff that matters.

tuxalin

And alternatives for Substance Painter and Designer: InstaMaterial (free for under 100k revenue) - https://instamaterial.com/
To fix or at least improve some of the thermal throttle issues you could use an USB fan that's aimed at the CPU area, and/or use Intel XTU to undervolt the CPU (on my SB2 around -120mv is very stable, but varies a lot from CPU), disabling Turbo Short Boost helps a bit too. I think, as others have mentioned, the thermal issues are due to having the CPU and display as one part, the airflow is limited but display also produces some heat compared to normal laptops.
Correct, you could also use a double buffering approach to avoid that, if possible, depending on your use case. Feel free to reach out if you have any other questions.
Glad to hear that!

I dont have anymore the exact numbers, usually when you have around 1000 commands/calls you won't really feel a difference, in that case even using std::sort is fast enough and there's no point in using radix sort, however when you go over 10k commands/calls you'll feel it (can be up to a msec on the dispatch side).

You can check this great post that provides numbers (see part 4): https://blog.molecular-matters.com/2014/11/06/stateless-laye...

The performance should be very similar and it even goes further by adding thread local storage to reduce false sharing even more, which I didn't add but should be considered as it's easy to do.

Indeed, that's a limitation of OpenGL which is addressed with Vulkan, however you can still use this with Vulkan and make use of the other features like: command sorting, less verbose API or command keys. However, in most cases you wouldn't need the lock-free aspect of it (i.e. should be configurable), since in the end you would dispatch commands from their own threads, as monocasa well-pointed, that is something I do plan to do at some point (a solution better suited for Vulkan/D3D12), but sadly didn't had the free time.
No worries, too much work tends to do that to you, I recommend some beers to fix the state of mind.

Regarding the implemention, I presumed you asked about the lock-free logic, apart from m_currentIndex which is used with the m_commands vector, the LinearAllocator also has to be lock-free, see it's alloc function. The allocator is used for storing the command packets (along with their command data) and also their auxiliary data (if they have that).

Another implementation detail of the allocator is that it has two modes, an auto-alignment mode which requires two atomic operations (load acquire and compare_exchange_weak) and will be slower but lower memory usage, therother mode uses the alignment of the CommandPacket class which will be faster (one fetch_add) but consume more memory.

And another detail is the CommandPacket uses a intrusive list approach, that's how you actually chain multiple commands together and do an indirect function call (instead of virtual or other blasphemies) with dispatch of the command.

Hope that clears some things up about it.