Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
110 user(s) are online (100 user(s) are browsing Forums)

Members: 1
Guests: 109

K-L, more...

Support us!

Headlines

 
  Register To Post  

« 1 2 (3) 4 5 6 »
Re: A small (and dangerous) new years gift for the os4 community :)
Amigans Defender
Amigans Defender


See User information
@Hans

AFAIK all BltBitMap#?() calls are software-only. I've never seen any evidence of hardware acceleration there, even when doing simple alpha-supporting blits (BLITA_UseSrcAlpha).

CompositeTags() is always much faster.

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Just can't stay away
Just can't stay away


See User information

OS4 team, please release the popupmenu..library fixed.

It seems that Banana is affected too by Popupmenu.library problem (like CPUDock and x1ktemp.docky).

DSI when RMB (not often but sometimes)

http://zzd10h.amiga-ng.org/Divers/Cra ... a_2014-01-03_19-40-28.txt

Symbol info:
Instruction pointer 0x7F85175C belongs to module "banana" (PowerPC)
Symbol: NormalSettingsPage + 0x1B8 in section 1 offset 0x00006738

Stack trace:
[normaltransform.c:794] NormalSettingsPage()+0x1b8 (section 1 @ 0x6738)
[normaltransform.c:794] NormalSettingsPage()+0x1ac (section 1 @ 0x672C)
[main.c:487] MenuHandlerFunc()+0xac (section 1 @ 0x21BC)
native kernel module kernel+0x00049c40
module CLASSES:popupmenu.class at 0x7FF4EC60 (section 5 @ 0xC3C)
native kernel module kernel+0x00049d80
module LIBS:popupmenu.library at 0x7FDC1B9C (section 5 @ 0x4B78)
module CLASSES:popupmenu.class at 0x7FF50354 (section 5 @ 0x2330)
native kernel module intuition.library.kmod+0x0001824c
native kernel module intuition.library.kmod+0x00018470
native kernel module intuition.library.kmod+0x00008448
native kernel module intuition.library.kmod+0x00008088
[main.c:585] main()+0xa0c (section 1 @ 0x2C70)
native kernel module newlib.library.kmod+0x000020a4
native kernel module newlib.library.kmod+0x00002d54
native kernel module newlib.library.kmod+0x00002ee8
_start()+0x170 (section 1 @ 0x16C)
native kernel module dos.library.kmod+0x00024f18
native kernel module kernel+0x00042514
native kernel module kernel+0x00042594

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Home away from home
Home away from home


See User information
@Chris

Quote:
@Hans

AFAIK all BltBitMap#?() calls are software-only. I've never seen any evidence of hardware acceleration there, even when doing simple alpha-supporting blits (BLITA_UseSrcAlpha).


Wrong! You don't honestly think that all blitting is done in software, do you? All graphics would be painfully slow in that case, particularly on the high-resolution screens that we use these days.

Regarding "simple alpha-supporting blits," that's a recent fairly addition to the API that is actually more complicated than blits without transparency. Yes, BltBitMapTags() does alpha blits in software, but you should be using CompositeTags() for that task, anyway.

Hans



Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Amigans Defender
Amigans Defender


See User information
@zzd10h

Quote:
OS4 team, please release the popupmenu..library fixed.

It seems that Banana is affected too by Popupmenu.library problem (like CPUDock and x1ktemp.docky).

DSI when RMB (not often but sometimes)


*sigh* I was moaning about this for over two years and it's only now that programs show up that are affected by it?

Oh well, at least it's fixed. I can finally remove upteen workarounds and add some other things I've been holding off when it gets released.

Techy note: it is caused by the allocation of signals. If other code can be removed that allocates signals, the chances are that popupmenu will stop crashing.

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Amigans Defender
Amigans Defender


See User information
@Hans

Quote:
Wrong! You don't honestly think that all blitting is done in software, do you? All graphics would be painfully slow in that case, particularly on the high-resolution screens that we use these days.


All I know is that BltBitMapTags is much much slower than CompositeTags for alpha-supporting blits. I made the assumption that it was slower for normal blits too, although I'd never noticed nor tested this. I was wrong, sorry.

Quote:

Yes, BltBitMapTags() does alpha blits in software, but you should be using CompositeTags() for that task, anyway.


Why shouldn't BltBitMapTags hardware accelerate that task too?

Especially as BltBitMapTags is a lot more flexible than CompositeTags - for example, it can blit Alpha Templates, which CompositeTags can't do. It would be a great help to me if this particular functionality was hardware accelerated, as at the moment it is a relatively painful operation.


Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Home away from home
Home away from home


See User information
@Chris

Quote:
Why shouldn't BltBitMapTags hardware accelerate that task too?

That would require new functions in the driver API that don't exist. Drivers would have to be updated to implement those new functions too. In the case of the RadeonHD driver, those functions would have to be implemented several times, once for each chipset series. That's not impossible, but would be a lot of work.

Quote:
Especially as BltBitMapTags is a lot more flexible than CompositeTags - for example, it can blit Alpha Templates, which CompositeTags can't do. It would be a great help to me if this particular functionality was hardware accelerated, as at the moment it is a relatively painful operation.


Personally, I think that CompositeTags() is much more flexible than BltBitMapTags(). That's why its autodoc entry is several times longer.

BTW, you could probably simulate your alpha templates using CompositeTags() with vertex arrays. It won't be as convenient as BltBitMapTags(), but you could get the same effect (excluding some draw modes like INVERT). The reason for using the vertex array mode would be so that you could put your foreground colour in a tiny source bitmap (you should only need 1 pixel in that colour), and use that with your alpha mask.**

Hans


** NOTE: Vertex arrays don't have a software falback yet, so you'd still have to use BltBitMapTags() as a backup.

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Just can't stay away
Just can't stay away


See User information
@zzd10h

I dont know if its the same problem but also runinuae when pressing RMB over the icon to get the menu it gets a DSI too.

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Amigans Defender
Amigans Defender


See User information
@Hans

Quote:

That would require new functions in the driver API that don't exist. Drivers would have to be updated to implement those new functions too. In the case of the RadeonHD driver, those functions would have to be implemented several times, once for each chipset series. That's not impossible, but would be a lot of work.


Hmm, interesting. So how does CompositeTags achieve the same results without this?

Quote:

BTW, you could probably simulate your alpha templates using CompositeTags() with vertex arrays. It won't be as convenient as BltBitMapTags(), but you could get the same effect (excluding some draw modes like INVERT). The reason for using the vertex array mode would be so that you could put your foreground colour in a tiny source bitmap (you should only need 1 pixel in that colour), and use that with your alpha mask.


I don't want to "simulate" an alphatemplate, as I'm getting my alphatemplates from elsewhere. If I can convert an alphatemplate to a vertex array in code without too much overhead then I'm interested, although I have no idea where to even start with this.

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Home away from home
Home away from home


See User information
@Chris

Quote:

Hmm, interesting. So how does CompositeTags achieve the same results without this?


A function was added to the driver's API specifically for CompositeTags(). It's by far the most complex function that the driver has to implement.

Quote:
I don't want to "simulate" an alphatemplate, as I'm getting my alphatemplates from elsewhere. If I can convert an alphatemplate to a vertex array in code without too much overhead then I'm interested, although I have no idea where to even start with this.


Sorry, I meant "simulate" an alphatemplate blit operation. You're trying to render a solid coloured shape using an alpha template, right? Well, here's how I would do that with CompositeTags():
- Write the foreground colour to a single pixel in a tiny source bitmap
- Use CompositeTags() to render that single pixel to a region on-screen with the alpha template as the source alpha mask

The reason for using vertex arrays instead of a regular rectangular composite, is that you can provide independent coordinates for the source bitmap and alpha mask.

Hans



Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Amigans Defender
Amigans Defender


See User information
@Hans

Quote:
A function was added to the driver's API specifically for CompositeTags(). It's by far the most complex function that the driver has to implement.


I feel like I'm going in circles, but why can't BltBitMapTags also use this? The functionality is already there!

Quote:

Sorry, I meant "simulate" an alphatemplate blit operation. You're trying to render a solid coloured shape using an alpha template, right? Well, here's how I would do that with CompositeTags():
- Write the foreground colour to a single pixel in a tiny source bitmap
- Use CompositeTags() to render that single pixel to a region on-screen with the alpha template as the source alpha mask


Right, great. I did try this at some point in the past but with a bigger bitmap and no vertex arrays. I didn't get the results I was expecting.

So, I need to use my 1px colour bitmap as the source, and the AlphaTemplate as the SrcAlphaMask? Then I do something I don't understand with vertices?

Some example code would really help here as I don't have a clue about vertex arrays.

Quote:
The reason for using vertex arrays instead of a regular rectangular composite, is that you can provide independent coordinates for the source bitmap and alpha mask.


That's probably at least part of the reason it didn't work last time.

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Home away from home
Home away from home


See User information
@Chris

Quote:
I feel like I'm going in circles, but why can't BltBitMapTags also use this? The functionality is already there!


The driver's compositing function is designed specifically for CompositeTags(). In theory BltBitMapTags() could internally call CompositeTags() when appropriate, but that adds extra overhead. Why not avoid the extra overhead and just call CompositeTags() directly?

For the cases that CompositeTags() can't handle (e.g., an alpha template in INVERT draw mode), you're still stuck with software rendering, so you haven't gained anything.


Quote:
Right, great. I did try this at some point in the past but with a bigger bitmap and no vertex arrays. I didn't get the results I was expecting.

If you didn't get the results that you wanted using a larger bitmap (filled with a solid colour), then vertex arrays won't help you either.

There's a chance that you used the wrong settings (e.g., forgot to use COMPFLAG_IgnoreDestAlpha).


Quote:
So, I need to use my 1px colour bitmap as the source, and the AlphaTemplate as the SrcAlphaMask? Then I do something I don't understand with vertices?

Some example code would really help here as I don't have a clue about vertex arrays.


Unfortunately, I don't know of any simple example code. There is source code to Composite3DDemo, but it's pretty complex. However, the CompositeTags() documentation does have a good explanation.

In brief: in vertex array mode, you render a set of triangles, with the coordinates for each vertex stored in an array. Since you want different coordinates for the source and alpha bitmaps, your vertex data would look like:
typedef struct VertexDSA_s // DSA = dest, source, & alpha coordinates
{
    
float dstXdstY// The coordinate on the destination bitmap
    
float srcSsrcTsrcW// The coordinate on the source bitmap/texture in homogeneous coordinates
    
float alphaSalphaTalphaW // The coordinate on the alpha bitmap/texture in homogeneous coordinates
VertexDSA

VertexDSA vertexData
[] = { /* Insert vertex data here */ };


NOTES:
- For the structure above, COMPTAG_VertexFormat should be set to: COMPVF_STW0_Present | COMPVF_STW0_Present
- Unless you're doing warping/perspective projection, set srcW & alphaW to 1.0, and the S & T coordinates to the location on the source & alpha bitmaps where you want to read the data from
- For the single colour instance, (srcS, srcT, srcW) = (0.0, 0.0, 1.0). This means that the colour of source pixel (0,0) is used for all output pixels

I hope that this helps get you started.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Just can't stay away
Just can't stay away


See User information
@Chris

You could take a look at the Qt sources. I use Hans' method for rendering glyphs. The file qt/src/gui/text/qpaintengine_amiga.cpp should give you some pointers (look for ::drawFreetype() function, I think).

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Just can't stay away
Just can't stay away


See User information
@Alfkill
I sent you mails, did you received it ?

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Just can't stay away
Just can't stay away


See User information
@zzd10h

Yes. Reply sent.

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Not too shy to talk
Not too shy to talk


See User information
Hello

see aminet compositepoc.lha for an exemple using vertex array


Alain

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Quite a regular
Quite a regular


See User information
@thellier

alain wazp3d are working on Euae not jit for now :P 1 fps on Xe but are working :)

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Home away from home
Home away from home


See User information
@Hans Quote:
The driver's compositing function is designed specifically for CompositeTags(). In theory BltBitMapTags() could internally call CompositeTags() when appropriate, but that adds extra overhead. Why not avoid the extra overhead and just call CompositeTags() directly?

Errr, because it would magically speed-up software that doesn't use CompositeTags (for whatever reason). If the overhead is not negligible, then they can always try using CompositeTags later.

I really don't understand the logic that "we won't optimise an OS function because the speed-up would be smaller than everyone rewriting their apps".

Author of the PortablE programming language.
Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Just popping in
Just popping in


See User information
@Chris

I used the code of this

http://aminet.net/dev/src/CompositePOC.lha

to understand how Compositing works.

Its a bit complex, too (and sometimes a bit weird ;) ), but its not as complex as Hans´ demo (which is great, btw.!).

It´s nearer to the application you´d have for CompositeTags(), because its typical 2D programming (replace blits by CompositeTags() using vertex mode and several source bitmaps, including some bitmaps bigger than the "blit" target).

I learned a lot about vertex mode reading this code.

@Hans

Would it be a good idea to use the CompositeTags() call to replace standard Blt...() calls (like BltBitMapRastPort())? E.g. for blitting a background buffer to a window? Would it be faster?

Edit: oh, missed that somebody already mentioned it

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Amigans Defender
Amigans Defender


See User information
@hans

Yes, that makes more sense than the Autodocs, thanks.

@alfkil

Quote:
You could take a look at the Qt sources. I use Hans' method for rendering glyphs. The file qt/src/gui/text/qpaintengine_amiga.cpp should give you some pointers (look for ::drawFreetype() function, I think).


That is more-or-less exactly what I need. However, I can't find it. Did you mean qfontengine_amiga.cpp? There's no reference to Composite in that file.

@others

I had a quick look at CompositePOC and it made my SAM reset itself...

Go to top
Re: A small (and dangerous) new years gift for the os4 community :)
Just can't stay away
Just can't stay away


See User information
@Chris

Argh, sorry, it is of course in the src/gui/painting... drawer! :P

Go to top

  Register To Post
« 1 2 (3) 4 5 6 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project