Paint: hardware-accelerated flood fill#2333
Conversation
Use VGA Read Mode 1 for hardware-accelerated color comparison to optimize flood fill operations. Add segment expansion functions that leverage VGA color compare features for improved performance with bit-level optimizations.
Move initialization of VGA color comparison mode from implicit calls in cmp8() to explicit calls where needed. This provides better control over VGA mode setting and prevents unnecessary reinitialization.
|
Very nice work using VGA hardware acceleration to greatly increase drawing speed! Your work is definitely showing how closer attention to the hardware can eliminate what we might have once thought were permanent bottlenecks. I'm thinking perhaps this approach might also be able to be used to increase the speed of non-XOR cursor drawing, for certain filled cursor shapes. I haven't figured out how that might work yet, though. |
|
another |
|
Looks good, I'll commit now. I would say that if in the upper level you calculated a premultiplied y offset for each line, and then tracked x via offset only, that would eliminate lots of x >> 3 and x << 3, and cmp8 would only have to add the x + y offsets together to get the byte.
I've been in Paris for the last week, working on my French lol. Will be around for another week! :) |
I see—have fun! The concentration of ELKS enthusiasts in Europe has become dangerously high, so I’ll be flying to China tomorrow to restore some balance 🙂. Meanwhile, as you brush up on your French, I’ve got a fresh case of ELKS panic attack for you. |
Use VGA Read Mode 1 for hardware-accelerated color comparison to optimize flood fill operations. Add segment expansion functions that leverage VGA color compare features for improved performance with bit-level optimizations.