Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
64 user(s) are online (47 user(s) are browsing Forums)

Members: 2
Guests: 62

NinjaCyborg, Kamelito, more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
What parts of AmigaOS4 graphics are hardware accelerated?
Just can't stay away
Just can't stay away


See User information
I have kind of lost track as to which bits of our OS are hardware accelerated.
Clearly Warp3D programs are, but what about everything else?

Workbench - Compositing?
OWB?
Video playback - Compositing?
Apps like Blender and Sketchblock?

What room is there for improvement over compositing?

I know I should know this, but a summary is definitely needed for my aging head!

AmigaOne X1000.
Radeon RX550

http://www.tinylife.org.uk/
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Amigans Defender
Amigans Defender


See User information
CompositeTags() in gfx.lib definitely is.
BltBitMapTags() people keep telling me is, but I don't believe it as it's dog slow compared to the same operation using CompositeTags() (and ditto wrt BitMapScale())

I'm still looking for a hardware-accelerated way of blitting an ALPHATEMPLATE to the screen applying a particular solid colour. BltBitMapTags() isn't it, and CompositeTags() isn't either, as you still have to use BltBitMapTags() before you can call it...

Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Just can't stay away
Just can't stay away


See User information
Thanks Chris.
So does the full screen need to be redrawn in OWB with every update?

AmigaOne X1000.
Radeon RX550

http://www.tinylife.org.uk/
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Amigans Defender
Amigans Defender


See User information
@ddni

No idea. Is this relevant? That's software optimisation rather than hardware acceleration.

Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@Chris

Quote:
I'm still looking for a hardware-accelerated way of blitting an ALPHATEMPLATE to the screen applying a particular solid colour. BltBitMapTags() isn't it, and CompositeTags() isn't either, as you still have to use BltBitMapTags() before you can call it...


In correct you use WritePixelArray to move it to video memory (DMA operation), once the gfx is in video memory, you can composite the graphics as many times you like.

BltBitMapTags() always do clipping, while CompositionTags() never do clipping.
CompositionTags() is there for slightly faster if you don't need clipping.
CompositionTags() scales and rotates, BltBitMapTags() does not.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@Chris
Quote:
CompositeTags() in gfx.lib definitely is.
BltBitMapTags() people keep telling me is, but I don't believe it as it's dog slow compared to the same operation using CompositeTags() (and ditto wrt BitMapScale())

It depends on what you're doing with BltBitMapTags. A straight blit between two bitmaps is HW accelerated provided that both bitmaps have the same pixel format. Anything that involves converting between pixel formats or scaling isn't accelerated.

@LiveForIt
Quote:
BltBitMapTags() always do clipping, while CompositionTags() never do clipping.

You mean clipping to a rastport? Yes, CompositeTags() renders straight to bitmaps. However, as you know, you can use DoHookClipRects() with CompositeTags() to render into a rastport; it takes care of the clipping. Just remember to lock the layer beforehand so that the window/layer doesn't change between reading its dimensions and the actual rendering.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Amigans Defender
Amigans Defender


See User information
@LiveForIt

I wanted to avoid caching at point B, as it's a PITA. But, if there's no route direct from A to C then I'll have to give it another try.

Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@ddni Quote:
So does the full screen need to be redrawn in OWB with every update?

While I haven't seen the source code, I rather doubt it. On the other hand, I do believe that (intentionally) Timberwolf does redraw the whole screen with every update (and you can see the impact that has on it's speed).

But as Chris says, that's just a software optimisation issue.

Author of the PortablE programming language.
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Quite a regular
Quite a regular


See User information
I Noticed that when you resize a Window it's very slow, so i guess that this operation is not hardware accelerated.

Moreover, there are colors transform functions that are HW accelerated?

Retired
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Not too shy to talk
Not too shy to talk


See User information
@Hans

Hello
>you can use DoHookClipRects() with CompositeTags()
very interesting : do you have a piece of code that show how to do that ?

BTW Are there other OS functions (I mean not CompositeTags()) that can do a simple draw draw with alpha ? (I mean alpha 0 is transp / other solid)

Thanks

Alain Thellier

Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Amigans Defender
Amigans Defender


See User information
@Hans

Quote:
It depends on what you're doing with BltBitMapTags. A straight blit between two bitmaps is HW accelerated provided that both bitmaps have the same pixel format. Anything that involves converting between pixel formats or scaling isn't accelerated.


Yes, sorry, I did actually make a big error here. It's only blits involving alpha channels that are noticeably very slow. I accept that normal blits are hardware accelerated.

Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Just can't stay away
Just can't stay away


See User information
@Chris

Alpha blits are currently only h/w accelerated when using CompositeTags() IIRC.

Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@thellier

Quote:
>you can use DoHookClipRects() with CompositeTags()
very interesting : do you have a piece of code that show how to do that ?

Yes, the following snippet shows how:

/** Contains data needed by compositeHookFunc().
 */
typedef struct CompositeHookData_s {
    
struct BitMap *srcBitMap// The source bitmap
    
int32 srcWidthsrcHeight// The source dimensions
    
int32 offsetXoffsetY// The offsets to the destination area relative to the window's origin
    
int32 scaleXscaleY// The scale factors
    
uint32 retCode// The return code from CompositeTags()
CompositeHookData;

/** The hook for performing compositing to a rastport.
 *
 * Thanks to Fredrik Wikstrom (a.k.a., salass00) for the example code...
 *
 * @param rastPort pointer to the RastPort to render to
 * @param msg pointer the backfill
 */
ULONG compositeHookFunc(struct Hook *hookstruct RastPort *rastPortstruct BackFillMessage *msg) {
    
CompositeHookData *hookData = (CompositeHookData*)hook->h_Data;

    
hookData->retCode IGraphics->CompositeTags(
        
COMPOSITE_Src_Over_DesthookData->srcBitMaprastPort->BitMap,
        
COMPTAG_SrcWidth,   hookData->srcWidth,
        
COMPTAG_SrcHeight,  hookData->srcHeight,
        
COMPTAG_ScaleX,     hookData->scaleX,
        
COMPTAG_ScaleY,     hookData->scaleY,
        
COMPTAG_OffsetX,    msg->Bounds.MinX - (msg->OffsetX hookData->offsetX),
        
COMPTAG_OffsetY,    msg->Bounds.MinY - (msg->OffsetY hookData->offsetY),
        
COMPTAG_DestX,      msg->Bounds.MinX,
        
COMPTAG_DestY,      msg->Bounds.MinY,
        
COMPTAG_DestWidth,  msg->Bounds.MaxX msg->Bounds.MinX 1,
        
COMPTAG_DestHeightmsg->Bounds.MaxY msg->Bounds.MinY 1,
        
COMPTAG_Flags,      COMPFLAG_SrcFilter COMPFLAG_IgnoreDestAlpha COMPFLAG_HardwareOnly,
        
TAG_END);

    return 
0;
}

/** Composites a bitmap to fill the given window (the window's interior).
 *
 * @param bitmap the bitmap
 * @param window the window to render to
 *
 * @return uint32 the compositing operation's return-code
 */
uint32 fillWindowWithBitMap(struct BitMap *bitMapstruct Window *window)
{
    
ILayers->LockLayer(0window->RPort->Layer);
    
// Need to composite onto the window's rastport. Since CompositeTags() only renders to bitmaps,
    // we use ILayers->DoHookClipRects().
    
CompositeHookData hookData;
    
struct Rectangle rect;
    
struct Hook hook;

     
rect.MinX window->BorderLeft;
     
rect.MinY window->BorderTop;
     
rect.MaxX window->Width window->BorderRight 1;
     
rect.MaxY window->Height window->BorderBottom 1;
     
float destWidth rect.MaxX rect.MinX 1;
     
float destHeight rect.MaxY rect.MinY 1;
     
float scaleX = (destWidth 0.5f) / SOURCE_WIDTH;
     
float scaleY = (destHeight 0.5f) / SOURCE_HEIGHT;

    
hookData.srcBitMap bitMap;
    
hookData.srcWidth SOURCE_WIDTH;
    
hookData.srcHeight SOURCE_HEIGHT;
    
hookData.offsetX window->BorderLeft;
    
hookData.offsetY window->BorderTop;
    
hookData.scaleX COMP_FLOAT_TO_FIX(scaleX);
    
hookData.scaleY COMP_FLOAT_TO_FIX(scaleY);
    
hookData.retCode COMPERR_Success;

    
hook.h_Entry = (HOOKFUNC)compositeHookFunc;
    
hook.h_Data = &hookData;

    
ILayers->DoHookClipRects(&hookwindow->RPort, &rect);

    
ILayers->UnlockLayer(window->RPort->Layer);

    return 
hookData.retCode;
}


Quote:
BTW Are there other OS functions (I mean not CompositeTags()) that can do a simple draw draw with alpha ? (I mean alpha 0 is transp / other solid)

Not that I know of.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@AmigaBlitter

Quote:
I Noticed that when you resize a Window it's very slow, so i guess that this operation is not hardware accelerated.

The speed depends on what's in the window, and what the app that owns the window does. For example, you should find resizing a shell window very fast.

Quote:
Moreover, there are colors transform functions that are HW accelerated?

No.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Quite a regular
Quite a regular


See User information
@Hans

About the HW colors transform, it's something difficult to implements?

Retired
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@Chris

Quote:

@LiveForIt

I wanted to avoid caching at point B, as it's a PITA. But, if there's no route direct from A to C then I'll have to give it another try.


Well you can lock bitmap and paint into any bitmap, but you don't wont to do that.
You should not plot pixel into VRAM, because you can't do DMA an pixel, it's better to move things in big chunks using DMA.

So things you need to paint do it in RAM, things you can blend do in on VRAM.

Sure you might waste a bit of RAM having to keep two versions of the Bitmaps, but is the only way you can get best performance.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information


Edited by LiveForIt on 2015/9/8 19:17:53
Edited by LiveForIt on 2015/9/8 19:18:23
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Quite a regular
Quite a regular


See User information
@LiveForIt
We need UVD

Amiga600/Vampire2/PrismaMegaMix​/32GB CF Card/2x Rys Mk2/A604n/IndivisionECS/Gotek
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@tommysammy

No we need AGA graphics or maybe AAA graphics
No one likes PC hardware.
People fall off shares scramming Ammmmmiiiiigggggaaaa Ammmmiiiiiggggggaaaaa Ammmmiiiiggggaaaa at Demo parties looking at 320x200 graphics

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: What parts of AmigaOS4 graphics are hardware accelerated?
Home away from home
Home away from home


See User information
@AmigaBlitter

Quote:
About the HW colors transform, it's something difficult to implements?

What exactly do you mean with "colors transform?" Do you mean things like converting from ARGB to BGRA? If so, then that's pretty easy on the driver side; in fact, CompositeTags() effectively already does it. You can composite a 32-bit bitmap onto a 16-bit screen and vice-versa. Updating the graphics libraries to use HW accelerated pixel format conversion would take a bit more effort, though.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top

  Register To Post
(1) 2 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project