Click Here
home features news forums classifieds faqs links search
6046 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
Home
Features
News
Forums
Classifieds
Links
Downloads
Extras
OS4 Zone
IRC Network
AmigaWorld Radio
Newsfeed
Top Members
Amiga Dealers
Information
About Us
FAQs
Advertise
Polls
Terms of Service
Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
49 crawler(s) on-line.
 12 guest(s) on-line.
 1 member(s) on-line.


 Rob

You are an anonymous user.
Register Now!
 Rob:  4 mins ago
 THRIVECoworkingAsheville:  16 mins ago
 Hammer:  37 mins ago
 cdimauro:  55 mins ago
 matthey:  1 hr 8 mins ago
 Trekiej:  1 hr 15 mins ago
 Trixie:  1 hr 37 mins ago
 MEGA_RJ_MICAL:  2 hrs 16 mins ago
 agami:  2 hrs 27 mins ago
 DiscreetFX:  4 hrs 3 mins ago

/  Forum Index
   /  Amiga Development
      /  Speed of SDL
Register To Post

Goto page ( 1 | 2 | 3 Next Page )
PosterThread
Srbin 
Speed of SDL
Posted on 28-Feb-2008 13:48:24
#1 ]
Regular Member
Joined: 11-Dec-2004
Posts: 407
From: Serbia

Does anyone know what is the speed loss when using native api and sdl api? Both for amiga and pc i am interested? Anyone with experience?

_________________
May the force be with you...

 Status: Offline
Profile     Report this post  
Jupp3 
Re: Speed of SDL
Posted on 28-Feb-2008 15:00:24
#2 ]
Super Member
Joined: 22-Feb-2007
Posts: 1225
From: Unknown

@Srbin

Quote:
Does anyone know what is the speed loss when using native api and sdl api?

Short answer is: It depends on both SDL implementation and native api. In ideal cases, native api is almost similar to sdl api, and only very simple wrapper is needed, sometimes more complex middle layer is needed. Also some SDL implementations just are faster than the others. Only real answer I can give is, "Benchmark both SDL and non-SDL solutions in all environments, you want to run them in"

On classic amiga (don't know what you mean with "amiga"), sdl port was rather slow. Might also be seriously outdated by now. Also, you can probably count out non-RTG graphics. I have no idea about OS4 implementation, but at least MOS PowerSDL is much better (that's what I'm using). Windows version (I assume that's what you mean with "pc"?) is ok too, although I haven't used it much.

imho biggest reason for choosing native api's instead of sdl might be the desire to do something that "looks like target system", using GUI's with "native" buttons etc.

Of course the biggest argument for using SDL is to "not have to write all system specific stuff for each different platform"

Also, you can create SDL version first, and later manually convert it to few selected systems (rest have to do with SDL) - but if that's the path you choose, better keep that in mind from the start!

 Status: Offline
Profile     Report this post  
Varthall 
Re: Speed of SDL
Posted on 28-Feb-2008 15:10:17
#3 ]
Super Member
Joined: 17-Feb-2004
Posts: 1555
From: Up Rough

@Jupp3

I'd love to see some SDL benchmarks run on various Amiga systems.

Varthall

EDIT: Like this one.

Last edited by Varthall on 28-Feb-2008 at 03:11 PM.

_________________
AmigaOne XE - AmigaOS 4.1 - Freescale 7457 1GHz - 1GB ram
MPlayer for OS4: https://sourceforge.net/projects/mplayer-amigaos/

 Status: Offline
Profile     Report this post  
spotUP 
Re: Speed of SDL
Posted on 28-Feb-2008 15:56:02
#4 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@Varthall

Thanx for the sources, here's the result:

SDL Benchmark tester:
http://www.os4depot.net/index.php?function=showfile&file=utility/benchmark/sdlbench.lha

AmigaOneXE g3@800mhz

Mode = 320x240, software
Pitch = 320
Hardware surfaces avail = 1
Window manager avail = 1
Blitter hardware = 1
Colorkey blit hardware = 0
Alpha blit hardware = 0
Software->Hardware accel = 0
Video memory = 0


Benchmark results:

320x240 320x240 640x480 640x480
software hardware software hardware
Slow points (frames/sec): 9.24855 190.476 1.12029 49.6894
Fast points (frames/sec): 236.599 101.668 56.8636 25.4397
Rect fill (rects/sec): 18789 85333.3 5461.33 33573.8
32x32 blits (blits/sec): 51848.1 120471 50567.9 117029

Zaurus 5500:

Pitch = 320
Hardware surfaces avail = 0
Window manager avail = 0
Blitter hardware = 0
Colorkey blit hardware = 0
Alpha blit hardware = 0
Software->Hardware accel = 0
Video memory = N/A


Benchmark results:

320x240 320x240 640x480 640x480
software hardware software hardware
Slow points (frames/sec): 0.260323 N/A N/A N/A
Fast points (frames/sec): 20.4767 N/A N/A N/A
Rect fill (rects/sec): 416.472 N/A N/A N/A
32x32 blits (blits/sec): 625.535 N/A N/A N/A

Last edited by spotUP on 28-Feb-2008 at 04:55 PM.

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
salass00 
Re: Speed of SDL
Posted on 28-Feb-2008 16:13:30
#5 ]
Elite Member
Joined: 31-Oct-2003
Posts: 2706
From: Finland

@spotUP

Same system as in my sig (A1-C 750FX 800MHz):

Pitch = 320
Hardware surfaces avail = 1
Window manager avail = 1
Blitter hardware = 1
Colorkey blit hardware = 0
Alpha blit hardware = 0
Software->Hardware accel = 0
Video memory = 0

320x240 320x240 640x480 640x480
software hardware software hardware
Slow points (frames/sec): 7.20072 117.647 0.870038 29.8507
Fast points (frames/sec): 223.191 59.9813 55.2558 14.9944
Rect fill (rects/sec): 14894.5 107789 4348.2 48761.9
32x32 blits (blits/sec): 42226.8 128000 41795.9 136533

 Status: Offline
Profile     Report this post  
Crumb 
Re: Speed of SDL
Posted on 28-Feb-2008 16:37:49
#6 ]
Elite Member
Joined: 12-Mar-2003
Posts: 2209
From: Zaragoza (Aragonian State)

@Varthall

It would be more interesting if P96Speed could use OS3-SDL/Power-SDL/OS4-SDL and you could compare the speed against CGX/P96...

But thanks for the test

I wonder if it runs on os4-emu or could be recompiled for MOS

Last edited by Crumb on 28-Feb-2008 at 04:38 PM.

_________________
The only spanish amiga news web page/club: CUAZ

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Speed of SDL
Posted on 28-Feb-2008 16:43:08
#7 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12197
From: Norway

@Crumb

Well at least can give some information on how SDL perform on classic planar graphic cards vs chunky graphics cards on AmigaOne

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
Akiko 
Re: Speed of SDL
Posted on 28-Feb-2008 16:52:52
#8 ]
Cult Member
Joined: 26-Mar-2004
Posts: 778
From: UK

On my humble A4K, 604e 233MHz, Voodoo 2000.


Pitch = 320
Hardware surfaces avail = 1
Window manager avail = 1
Blitter hardware = 1
Colorkey blit hardware = 0
Alpha blit hardware = 0
Software->Hardware accel = 0
Video memory = 0


320x240 320x240 640x480 640x480
software hardware software hardware
Slow points (frames/sec): 0.475653 29.9625 0.059882 7.54717
Fast points (frames/sec): 30.538 15.1238 7.74256 3.78089
Rect fill (rects/sec): 1577.2 42226.8 362.67 33851.2
32x32 blits (blits/sec): 6253.44 27675.7 6234.4 29257.1

Last edited by Akiko on 28-Feb-2008 at 04:53 PM.

_________________
Amiga 4000T, CSPPC@233,50 , Amiga OS3.9 / OS4.1
Amiga 1200, Blizzard IV
CD32/SX32

 Status: Offline
Profile     Report this post  
spotUP 
Re: Speed of SDL
Posted on 28-Feb-2008 16:56:26
#9 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

Someone, maka a graph of this. :)

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
swoodall 
Re: Speed of SDL
Posted on 28-Feb-2008 17:13:29
#10 ]
Regular Member
Joined: 17-Sep-2003
Posts: 248
From: Raleigh NC, USA

A1G4@800, Radeon 9200

Mode = 320x240, software
Pitch = 320
Hardware surfaces avail = 1
Window manager avail = 1
Blitter hardware = 1
Colorkey blit hardware = 0
Alpha blit hardware = 0
Software->Hardware accel = 0
Video memory = 0

320x240 320x240 640x480 640x480
software hardware software hardware
Slow points (frames/sec): 8.86918 190.476 0.732467 49.3827
Fast points (frames/sec): 194.086 100.313 41.5719 25.1696
Rect fill (rects/sec): 18533.9 93090.9 5258.02 42226.8
32x32 blits (blits/sec): 51848.1 124121 51200 124121

Software 'points' tests seem faster on G3 than G4. Did you built with static libSDL, not the newer .so version ?


Scott Woodall

 Status: Offline
Profile     Report this post  
Hans 
Re: Speed of SDL
Posted on 28-Feb-2008 17:21:28
#11 ]
Elite Member
Joined: 27-Dec-2003
Posts: 4939
From: New Zealand

Test for an A1-XE G4 @933MHz with a Radeon 9000 pro:


Mode = 320x240, software
Pitch = 320
Hardware surfaces avail = 1
Window manager avail = 1
Blitter hardware = 1
Colorkey blit hardware = 0
Alpha blit hardware = 0
Software->Hardware accel = 0
Video memory = 0

Slow points test
Fast points test
Rect fill test
32x32 Blitter test
Mode = 320x240, hardware
Slow points test
Fast points test
Rect fill test
32x32 Blitter test
Mode = 640x480, software
Slow points test
Fast points test
Rect fill test
32x32 Blitter test
Mode = 640x480, hardware
Slow points test
Fast points test
Rect fill test
32x32 Blitter test
. . . . . . . . . . . . . 320x240 320x240 640x480 640x480
. . . . . . . . . . . . . software hardware software hardware
Slow points (frames/sec): 9.14286 200 0.738007 50.3145
Fast points (frames/sec): 227.353 101.668 47.619 25.4372
. Rect fill (rects/sec): 19692.3 128000 5490.62 65015.9
.32x32 blits (blits/sec): 56109.6 141241 54613.3 120471


What I gather is that SDL apps should use hardware acceleration where available (duh). Also a few interesting items:
Quote:

Colorkey blit hardware = 0
Alpha blit hardware = 0
Software->Hardware accel = 0
Video memory = 0

No colorkey HW support? No alpha blit HW support? Doesn't the latest version of OS4 have alpha HW support? I guess that the SDL implementation hasn't been updated to take advantage of this yet. Well, EvilRich has been really busy with other stuff...

I'm not sure what software->hardware accel means, but video memory = 0 suggests that the amount of video RAM isn't being detected.

Another curious thing, why are fast-points faster in software than with hardware? That's the wrong way round. Everything else is roughly what you'd expect.

Hans

EDIT: Is there any way to get the forum software to not remove multiple spaces (i.e., preserve formatting)?

Last edited by Hans on 28-Feb-2008 at 05:30 PM.
Last edited by Hans on 28-Feb-2008 at 05:28 PM.

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
https://keasigmadelta.com/ - More of my work.

 Status: Offline
Profile     Report this post  
Varthall 
Re: Speed of SDL
Posted on 28-Feb-2008 17:57:47
#12 ]
Super Member
Joined: 17-Feb-2004
Posts: 1555
From: Up Rough

@Crumb

I believe it should be very easy to compile on MOS.

Varthall

_________________
AmigaOne XE - AmigaOS 4.1 - Freescale 7457 1GHz - 1GB ram
MPlayer for OS4: https://sourceforge.net/projects/mplayer-amigaos/

 Status: Offline
Profile     Report this post  
spotUP 
Re: Speed of SDL
Posted on 28-Feb-2008 18:24:51
#13 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@Varthall

yea... should only take a few secs.

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
Hans 
Re: Speed of SDL
Posted on 28-Feb-2008 18:33:56
#14 ]
Elite Member
Joined: 27-Dec-2003
Posts: 4939
From: New Zealand

@spotUP

Do we have any benchmark program for OpenGL that we can use with MiniGL?

@all
For comparison I ran P96Speed on a 640x480 screen:
.============= SPEEDRESULTS ==============.
| RectFill()................ 20185 op/s |
| RectFill() Pattern........ 1124 op/s |
| WritePixel().............. 384856 op/s |
| WriteChunkyPixels()....... 4202 op/s |
| WritePixelArray8()........ 4213 op/s |
| WritePixelLine8()......... 180526 op/s |
| DrawEllipse()............. 79086 op/s |
| DrawCircle().............. 83585 op/s |
| Draw().................... 27510 op/s |
| Draw() Hor/Ver............ 105330 op/s |
| ScrollRaster() X.......... 1292 op/s |
| ScrollRaster() Y.......... 1375 op/s |
| PutText()................. 37511 op/s |
| BlitBitMap().............. 37017 op/s |
| BlitBitMapRastPort()...... 36108 op/s |
| BitMapScale()............. 884 op/s |
|--------------- Intuition ---------------|
| OpenWindow().............. 1108 op/s |
| MoveWindow().............. 11485 op/s |
| SizeWindow().............. 1661 op/s |
| CON-Output................ 2609 op/s |
| ScreenToFront()........... 2129 op/s |
`========================================='


When compared to a PIV, it was significantly faster, but dismal with RectFill() Pattern. It was 0.2 times the speed of the PIV (A4000/060/PPC/PIV) at that operation.

Unfortunately this doesn't seem to be a reliable comparison with the SDL test, look at rect-fill: 65015.9 rects/sec on SDL, 20185 op/s on P96Speed. The SDL test comes out ~3x faster than the P96Speed test. I think that we're going to need a native benchmarking program.

Hans

Last edited by Hans on 28-Feb-2008 at 06:34 PM.

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
https://keasigmadelta.com/ - More of my work.

 Status: Offline
Profile     Report this post  
Samurai_Crow 
Re: Speed of SDL
Posted on 28-Feb-2008 18:39:06
#15 ]
Elite Member
Joined: 18-Jan-2003
Posts: 2317
From: Minnesota, USA

@Srbin

On Windows, the lack of hardware support for Alpha blending makes it preferable for people to use OpenGL to do the 2d graphics as well as 3d graphics. That gets rid of most of the software mode delays. Also, the Windows version CPU blits a software surface faster than a hardware accelerated surface for anything other than rectangular blits.

The OpenGL patches should be rendered obsolete by SDL 1.3 which is available (in an experimental form) from the SVN server on the SDL website for Windows, Mac, and Linux.

 Status: Offline
Profile     Report this post  
agnuz6569 
Re: Speed of SDL
Posted on 28-Feb-2008 21:19:08
#16 ]
Member
Joined: 1-May-2007
Posts: 87
From: in the Toaster

I think SDL is not the right way Amiga Programs should go. Every time i start SDL-Apps here on my Machine its getting damn slow and make the system unstable. It seems that SDL-Coders dont take care of the stability of the Apps, they are happy if it run without a GR every time. But this is against the philosophy of the AmigaOS. Surely, it will bring fast new apps on our Machine, but for what price?? You can get slowness still on you pc, so why port it to Amiga?

My opinion is: OS4 SDK Conform Coding is the real thing, all others will Amiga OS bring to bad performance results. And i use and work with my Amiga because its fast and make my day happy everytime i use it! Its not perfect and have it edges, but i like it to be fast in the future and not want to end it up like windows or linux...


Dont trust the benchmarks, they lie!

_________________
Charly says always tell your mummy before you go off use some other os!

 Status: Offline
Profile     Report this post  
Hans 
Re: Speed of SDL
Posted on 28-Feb-2008 22:48:08
#17 ]
Elite Member
Joined: 27-Dec-2003
Posts: 4939
From: New Zealand

@agnuz6569

Of course using the SDK is the best way for Amiga programs, but being able to write cross-platform stuff is important too. It's also nice to be able to compile cross-platform software developed on other OSes as well. I agree that there are some really poor SDL programs out there, but that's a result of the programmers involved, not SDL.

BTW, are you trying to run SDL on a graphics-card? Or with the classic Amiga chipset? With the classic Amiga chipset, you have chunky to planar conversions that slow everything down. This isn't the case if you have a graphics-card.

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
https://keasigmadelta.com/ - More of my work.

 Status: Offline
Profile     Report this post  
evilrich 
Re: Speed of SDL
Posted on 29-Feb-2008 3:59:29
#18 ]
Cult Member
Joined: 19-Oct-2003
Posts: 534
From: Unknown

@Hans

Quote:
No colorkey HW support? No alpha blit HW support? Doesn't the latest version of OS4 have alpha HW support?

Not without using GL or Warp3D.

Quote:
Another curious thing, why are fast-points faster in software than with hardware?

Depends what it's doing. If it's doing something that requires reading from video memory, for example, then that'll be slower. That's why if you don't have hardware acceleration for colour-key or alpha blitting, then your usually better off doing it in system memory and blitting the result to the display.

Cheers,
Rich

 Status: Offline
Profile     Report this post  
AlexC 
Re: Speed of SDL
Posted on 29-Feb-2008 4:48:27
#19 ]
Super Member
Joined: 22-Jan-2004
Posts: 1296
From: City of Lost Angels, California.

@spotUP

Quote:
Someone, maka a graph of this. :)


If you insist...


_________________
AlexC's free OS4 software collection

AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation

 Status: Offline
Profile     Report this post  
Hypex 
Re: Speed of SDL
Posted on 29-Feb-2008 5:09:26
#20 ]
Elite Member
Joined: 6-May-2007
Posts: 10606
From: Greensborough, Australia

@Hans

Quote:
BTW, are you trying to run SDL on a graphics-card? Or with the classic Amiga chipset? With the classic Amiga chipset, you have chunky to planar conversions that slow everything down. This isn't the case if you have a graphics-card.


Considering most SDL apps are 2d, and the native Amiga chipset was made for 2d, it does seem ridiculous to do the gfx in chunky and convert to planar. But I understand that SDL wasn't made for computers with good 2d gfx support, it was made for PC VGA cards.

 Status: Offline
Profile     Report this post  
Goto page ( 1 | 2 | 3 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle