Thread: Blitter queues
View Single Post
Old 21 August 2019, 16:22   #26
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Sunny Bournemouth, UK
Posts: 433
Quote:
Originally Posted by zero View Post
Another down-side of interrupts is that it can be tricky to generate the queue as the blits are taking place. Imagine the blitter finishes and the interrupt sees the end of the queue so stops, but then after that another item is added to the queue. You need to either avoid that, or detect it and re-start the blitter.

The other issue with interrupts is that you have to make sure updates to your queue are atomic. The interrupt could trigger half way through an update to the queue, so there is a little bit of overhead to manage that. I'd avoid pausing interrupts during the update and just use some kind of counter that can be written atomically.
This is why you double buffer your list...
DanScott is offline  
 
Page generated in 0.04074 seconds with 11 queries