Inadequate performance with Win32

I’m having severe problems getting adequte fps under Win32, DirectX 5,
using SDL 1.1.6. This occurs when I’m doing sw -> sw or sw -> hw blits.
I have previous experience with DirectX and I know for a fact that
blitting sw surfaces with IDirectDrawx::BltFast and IDirectDrawx::Blt
are sluggish, replacing it with a simple lock and memcpy() would speed
things up greatly. So I was thinking if SDL uses the built-in DirectX
blitting routines for all blits? If so, that could prove to be why I get
terrible framerates. I tried browsing the source code but that got me a
head ache very quick ;). So if anyone knows in which file and what
function (and possibly line number) to look I’d appriciate it.

Staffan

Hi,

Is it really so that sw->hw with simple lock and memcpy is faster than
hardware blit? (of course if your video card supports such option)
Also if you use memcpy, it wont allow you to do things like alpha and color
keyed blits.
What cpu and video card you have and what framerates do you get?

Kovacs> ----- Original Message -----

From: gimaker@xpress.se (Staffan Gimaker)
To:
Sent: tresdiena, 2000. gada 20. decembris 0:59
Subject: [SDL] Inadequate performance with Win32

I’m having severe problems getting adequte fps under Win32, DirectX 5,
using SDL 1.1.6. This occurs when I’m doing sw -> sw or sw -> hw blits.
I have previous experience with DirectX and I know for a fact that
blitting sw surfaces with IDirectDrawx::BltFast and IDirectDrawx::Blt
are sluggish, replacing it with a simple lock and memcpy() would speed
things up greatly. So I was thinking if SDL uses the built-in DirectX
blitting routines for all blits? If so, that could prove to be why I get
terrible framerates. I tried browsing the source code but that got me a
head ache very quick ;). So if anyone knows in which file and what
function (and possibly line number) to look I’d appriciate it.

Staffan

No, of course it’s not faster if it is hardware accelerated. My hardware
doesn’t support this, and I suspect that most don’t. Now if this is the case,
yes memcpy() is much faster. I wrote my own function some time ago to do
colorkeyed blits and it was still far superior. As for alpha blending, this is
NEVER done in hardware with DirectDraw and therefore must be done with SDLs own
routine, I do not doubt that this routine offers adequate speed.

Anyways, my main issue is sw -> sw. The only blit I’ll be doing from sw -> hw
is my “flip”. I have an old Riva128 card, STB Velocity 128 I believe, and a PII
333. I get about 25 (I think, if my memory doesn’t fail me) fps blitting images
worth less that 640 * 480 * 2 pixels.

Staffan

Kovacs wrote:> Hi,

Is it really so that sw->hw with simple lock and memcpy is faster than
hardware blit? (of course if your video card supports such option)
Also if you use memcpy, it wont allow you to do things like alpha and color
keyed blits.
What cpu and video card you have and what framerates do you get?

Kovacs

----- Original Message -----
From: “Staffan Gim?ker” <@Staffan_Gimaker>
To:
Sent: tresdiena, 2000. gada 20. decembris 0:59
Subject: [SDL] Inadequate performance with Win32

I’m having severe problems getting adequte fps under Win32, DirectX 5,
using SDL 1.1.6. This occurs when I’m doing sw -> sw or sw -> hw blits.
I have previous experience with DirectX and I know for a fact that
blitting sw surfaces with IDirectDrawx::BltFast and IDirectDrawx::Blt
are sluggish, replacing it with a simple lock and memcpy() would speed
things up greatly. So I was thinking if SDL uses the built-in DirectX
blitting routines for all blits? If so, that could prove to be why I get
terrible framerates. I tried browsing the source code but that got me a
head ache very quick ;). So if anyone knows in which file and what
function (and possibly line number) to look I’d appriciate it.

Staffan