VOGONS


First post, by vvbee

User metadata
Rank Oldbie
Rank
Oldbie

S3d is the name of the hardware 3D engine in ViRGE. S3d Toolkit Library is S3's C API for programming the S3d engine. What I'm talking about is the performance of the S3d engine as programmed using the S3d Toolkit Library. The performance of S3d for short.

I wrote a test scene based on one of Tomb Raider's levels. It consists of about 400 triangles of completely static, fully textured geometry. All transformations are baked into the mesh, little runtime load on the CPU. Supports the DOS and Win32 versions of S3d.

s3dtr.gif
Filename
s3dtr.gif
File size
255.43 KiB
Views
340 views
File license
Fair use/fair dealing exception

The first results on a ViRGE/DX at 640 x 480 with an Athlon 64, vsync disabled:

ca6cf42ef3c9.png
Filename
ca6cf42ef3c9.png
File size
14.26 KiB
Views
340 views
File license
Fair use/fair dealing exception

Though all were run from Windows 98, the DOS versions tended to run faster, which isn't too surprising.

The ViRGE isn't a 640 x 480 platform and the numbers show it, but non-textured performance isn't too bad. The non-textured test used a black color for all vertices, which may or may not affect performance. Ideally I'd pick a color from the texture, and I might make that modification.

What surprises me is that getting rid of screen clear (S3DTK_RectFill) had no impact on performance. I'd expect it to be a relatively fast operation, but not that fast.

That removing perspective correction made no difference in FPS might or might not be due to the particular geometry of the scene, which again is also static.

UV and XY range guards (S3DTK_VERIFY_UVRANGE | S3DTK_VERIFY_XYRANGE) were always enabled. I don't know about the UV coordinates, but there's slight XY overflow.

Last edited by vvbee on 2025-01-05, 19:09. Edited 1 time in total.

Reply 1 of 6, by Joseph_Joestar

User metadata
Rank l33t++
Rank
l33t++

I'm guessing you already know this: pressing F2 in while running Tomb Raider in S3D mode will display the frame rate. You can then leave the game at the main menu for a bit, until it starts playing the demo, which will keep showing the frame rate.

If you capture that demo loop, you may be able to get an average frame rate value. I think @BitsUndBolts wrote a utility that would go over every frame of the recording, grab the FPS numbers and put them in a spreadsheet. You can see him using it near the end of this video.

PC#1: Pentium MMX 166 / Soyo SY-5BT / S3 Trio64V+ / Voodoo1 / YMF719 / AWE64 Gold / SC-155
PC#2: AthlonXP 2100+ / ECS K7VTA3 / Voodoo3 / Audigy2 / Vortex2
PC#3: Core 2 Duo E8600 / Foxconn P35AX-S / X800 / Audigy2 ZS
PC#4: i5-3570K / MSI Z77A-G43 / GTX 970 / X-Fi

Reply 2 of 6, by vvbee

User metadata
Rank Oldbie
Rank
Oldbie
Joseph_Joestar wrote on 2025-01-05, 19:08:

I'm guessing you already know this: pressing F2 in while running Tomb Raider in S3D mode will display the frame rate. You can then leave the game at the main menu for a bit, until it starts playing the demo, which will keep showing the frame rate.

If you capture that demo loop, you may be able to get an average frame rate value. I think @BitsUndBolts wrote a utility that would go over every frame of the recording, grab the FPS numbers and put them in a spreadsheet. You can see him using it near the end of this video.

Using a custom renderer has the benefit of being able to toggle more options, and to run the same test using the DOS and Win32 versions of S3d. I do also have a custom capture program that can estimate and average the FPS regardless of whether the game displays it, but what I'm also interested in is the S3d developer experience, which in-game benchmarks won't tell me as much about.

Reply 3 of 6, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie

Nice! The screenshot reminds me of the first room in TR1's "Tomb of Qualopec" level 😀 I know it, 'couse TR1 game is my "universal DOS test" for S3, 3dfx, Rendition and Matrox (unfortunately I can't get any PowerVR PCX1 or PCX2 cards) first (sometimes second) generation of 3D videocards and their proprietary APIs.

Does your test-demo has an option to change the resolution to a lower one (320 x 240 or 512 x 384)? TR1 at 512 x 384 on a fast (70+ MHz) S3 ViRGE/DX or GX is almost "playable" as for the mid '90s 3D gaming standards 😁

Do you intend to share your test-demo?

from СМ630 to Ryzen gen. 3
engineer's five pennies: this world goes south since everything's run by financiers and economists
this isn't voice chat, yet some people, overusing online communications, "talk" and "hear voices"

Reply 5 of 6, by Putas

User metadata
Rank Oldbie
Rank
Oldbie
vvbee wrote on 2025-01-05, 18:55:

What surprises me is that getting rid of screen clear (S3DTK_RectFill) had no impact on performance. I'd expect it to be a relatively fast operation, but not that fast.

That removing perspective correction made no difference in FPS might or might not be due to the particular geometry of the scene, which again is also static.

Parallelization of perspective correction is expected from the /DX. You might want to try to disable all the other features except texturing to see if there is a difference.

Reply 6 of 6, by vvbee

User metadata
Rank Oldbie
Rank
Oldbie

Tests in 512 x 384 and 320 x 200 with 16-bit color on the ViRGE/DX (driver 3.42), same as before:

f2d69debeb5d.png
Filename
f2d69debeb5d.png
File size
17.07 KiB
Views
184 views
File license
CC-BY-4.0
a10cd6d91557.png
Filename
a10cd6d91557.png
File size
12.23 KiB
Views
184 views
File license
CC-BY-4.0

Unlit texture means texture colors aren't blended with vertex colors. For whatever reason disabling bilinear filtering had no real performance improvement in the DOS version at 320 x 200, double checked. Screen clear continued to have no obvious effect on performance, but visually it's being done.

Baseline difference in performance between the DOS and Win32 versions of S3d at different resolutions:

b49feaf05cbe.png
Filename
b49feaf05cbe.png
File size
11.52 KiB
Views
184 views
File license
CC-BY-4.0

Direct3D 5 performs about equal to the Win32 version of S3d on the ViRGE/DX:

7f98bd176154.png
Filename
7f98bd176154.png
File size
12.14 KiB
Views
184 views
File license
CC-BY-4.0

Not sure what's going on at 512 x 384, something's holding S3d back. I double checked the result. Visually, Direct3D has problems with alpha reject.

Putas wrote on 2025-01-06, 05:51:
vvbee wrote on 2025-01-05, 18:55:

What surprises me is that getting rid of screen clear (S3DTK_RectFill) had no impact on performance. I'd expect it to be a relatively fast operation, but not that fast.

That removing perspective correction made no difference in FPS might or might not be due to the particular geometry of the scene, which again is also static.

Parallelization of perspective correction is expected from the /DX. You might want to try to disable all the other features except texturing to see if there is a difference.

I'll see about this.