English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 09 September 2018, 22:15   #1
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,386
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, 22:33   #2
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 44
Posts: 1,118
Send a message via Yahoo to Samurai_Crow
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, 22:48   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
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, 23:22   #4
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,386
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 13:55
WAITBLIT macro phx Coders. Asm / Hardware 20 18 February 2014 15:22
Releasing Unreleased Amiga Games fondpondforever Amiga scene 1 17 October 2013 14:16
REQ:ASM How to use buffers jman Coders. Tutorials 7 01 December 2010 02:41
re - releasing old games plasmatron Retrogaming General Discussion 2 17 June 2003 02: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 22:56.


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