@SebAaltonen For some reason 'mini_gpu' sounds like a software renderer to me, like it's a 'mini gpu' running inside your program.
Not like a mini layer for interacting with the gpu.
@falco_girgis I'm guessing the inlined version was copied into multiple places that meant they were worse for the Icache than having one copy of the code.
Depending on the CPU there might also be some unexpected branch predictor results.
Can you use a profiler to see what's actually happening?
@cotterzz It's kind of like old Welltris, although that might have had one tile falling at a time that you could move around the 4 walls.
https://t.co/ypLMel17kX
@yutongwu111140 You could make it a union with an array of 20 u64s and then static assert that the offsetof the last elements (or all of them) are the same.
And then add an operator[] to make this use case more obviously intentional and supported.
@gregnacu The tools are good to have, but if the line you're writing is doing too much just split it up.
const lengths = https://t.co/zKX1sJqcRO(x => String(x).length);
const width = Max.max(...lengths);
@soft_fox_lad Recent windows does that too (unless you regedit hack to disable a bunch of start menu stuff).
Win+"notepad"+enter too fast does a Bing search now, instead of just finding notepad.
@eeuoss I definitely have, writing cross-platform code with various kinds of assert macros.
It's nice to have this sort of thing standardised over needing vendor-specific solutions.
@avrldotdev I was going to complain about the duplicated math, but then realised that it's required for the exploit.
If the loop used 'imageSize' it would have been safe. It'd still have a bug in the int overflow case, but that bug would be an incomplete texture instead of buffer overflow.
@charliermarsh If it's initialising globals, why can't one of them be 'globals_initialised' which it checks itself?
Saves the caller needing to know about that implementation detail entirely.
@yutongwu111140 If your ternary doesn't fit on a line, see if you can just use an if instead.
That statement has way too much going on at once.
char c = *start;
char inc;
if (c <= '9' ) {
inc = c - '0';
} else {
char lower = c | 0x20;
inc = lower - 'a' + 10;
}
cur = cur * 16 + inc;
@ravenzballr I like the hp bars being there, but it should probably show percentages instead of exact values, just to make sure nobody can ever exploit it to see an opponents exact hp.