English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 09 September 2018, 21:15   #1
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Do I need WaitBlit before releasing image buffers?

I want to use BltBitMapRastPort() or BltMaskBitMapRastPort() and when these functions return I would like to release the bitmap plane buffers (the planar image) as soon as possible without wasting time.

Do I need to call WaitBlit() before using FreeMem() or is it guaranteed that the blitting is already finished when these two functions return?
PeterK is offline  
Old 09 September 2018, 21:33   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
I would imagine you would need to call WaitBlit() because the allocation scheme would have no knowledge of custom chip usage and could end up with a race condition between the blitter and CPU.
Samurai_Crow is offline  
Old 09 September 2018, 21:48   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
Yes, the RKM says:
"The graphics library rendering and data movement routines generally wait to get access to the blitter, start their blit, and then exit without waiting for the blit to finish. Therefore, you must WaitBlit() after a graphics rendering or data movement call if you intend to immediately deallocate, examine, or perform order-dependent processor operations on the memory used in the call."
mark_k is offline  
Old 09 September 2018, 22:22   #4
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Many thanks, that's exactly what I wanted to know. So I better keep the WaitBlit() in my code.
PeterK is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to flush HDD buffers to disk? jarp support.Apps 13 10 January 2017 12:55
WAITBLIT macro phx Coders. Asm / Hardware 20 18 February 2014 14:22
Releasing Unreleased Amiga Games fondpondforever Amiga scene 1 17 October 2013 13:16
REQ:ASM How to use buffers jman Coders. Tutorials 7 01 December 2010 01:41
re - releasing old games plasmatron Retrogaming General Discussion 2 17 June 2003 01:20

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11150 seconds with 13 queries