VOGONS


First post, by diagon_swarm

User metadata
Rank Newbie
Rank
Newbie

It seems that Windows 2000 DDK contains S3 Virge driver with OpenGL support through MCD* driver model. Has anyone ever tried OpenGL MCD on S3 Virge? Do you know if there is a compiled version of this available somewhere?

I know that there is a D3D wrapper for GLQuake, a S3D wrapper for Quake II-based games (by Techland) and Brian Paul's MESA 3D OpenGL ICD driver for S3 Virge cards. However, none of these works in the windowed mode (and this should).

*) MCD = Microsoft's OpenGL software renderer, where a hardware vendor adds acceleration only for features that are supported by the cards (the scene is rendered in the framebuffer, but polygons with unsupported features are done in software). I have successfully tested OpenGL MCD drivers for Matrox Millennium I & II, ATI Rage II+ and ATI Rage Pro (the one that was available before ATI finished full ICD)

I found mentions about MCD for Virge in this discussion:
https://groups.google.com/g/comp.graphics.api … knU09GfQJ?pli=1

There are some broken links to MS web:
https://www.opengl.org/archives/resources/faq … cal/mslinks.htm (the links don't work even with web.archive.org)

Windows 2000 DDK can be downloaded here:
http://old-dos.ru/index.php?page=files&mode=f … do=show&id=3662

I just quickly checked the archives and they do have S3 Virge driver sources with MCD files:

[DestinationDirs] ... Files_5=49000,"src\video\displays\s3virge" ... [Files_5] bank.c,NVID_DDK_FILE_43 bitblt. […]
Show full quote

[DestinationDirs]
...
Files_5=49000,"src\video\displays\s3virge"
...
[Files_5]
bank.c,NVID_DDK_FILE_43
bitblt.c,NVID_DDK_FILE_44
bltmm.c,NVID_DDK_FILE_45
brush.c,NVID_DDK_FILE_46
color.c,NVID_DDK_FILE_47
d3d.c,NVID_DDK_FILE_48
d3ddrv.h,NVID_DDK_FILE_49
d3ddx6.c,NVID_DDK_FILE_50
d3dgntri.c,NVID_DDK_FILE_51
d3dline.c,NVID_DDK_FILE_52
d3dmath.h,NVID_DDK_FILE_53
d3dpoint.c,NVID_DDK_FILE_54
d3dstate.c,NVID_DDK_FILE_55
d3dtess.c,NVID_DDK_FILE_56
d3dtri.c,NVID_DDK_FILE_57
d3dutil.c,NVID_DDK_FILE_58
ddraw.c,NVID_DDK_FILE_59
ddraw3d.c,NVID_DDK_FILE_60
debug.c,NVID_DDK_FILE_61
debug.h,NVID_DDK_FILE_62
dma.c,NVID_DDK_FILE_63
driver.h,NVID_DDK_FILE_64
enable.c,NVID_DDK_FILE_65
escape.c,NVID_DDK_FILE_66
fillpath.c,NVID_DDK_FILE_67
heap.c,NVID_DDK_FILE_68
hw.h,NVID_DDK_FILE_69
hw3d.h,NVID_DDK_FILE_70
icd.c,NVID_DDK_FILE_71
iline.c,NVID_DDK_FILE_72
lines.c,NVID_DDK_FILE_73
lines.h,NVID_DDK_FILE_74
lpb.c,NVID_DDK_FILE_75
lpb.h,NVID_DDK_FILE_76
makefile,NVID_DDK_FILE_77
mcd.c,NVID_DDK_FILE_78
mcdclip.c,NVID_DDK_FILE_79
mcdhw.h,NVID_DDK_FILE_80
mcdline.c,NVID_DDK_FILE_81
mcdmath.h,NVID_DDK_FILE_82
mcdpoint.c,NVID_DDK_FILE_83
mcdprim.c,NVID_DDK_FILE_84
mcdrend.c,NVID_DDK_FILE_85
mcdtex.c,NVID_DDK_FILE_86
mcdtri.c,NVID_DDK_FILE_87
mcdutil.c,NVID_DDK_FILE_88
mcdutil.h,NVID_DDK_FILE_89
misc.c,NVID_DDK_FILE_90
mpc.h,NVID_DDK_FILE_91
multi.c,NVID_DDK_FILE_92
nodma.c,NVID_DDK_FILE_93
paint.c,NVID_DDK_FILE_94
palette.c,NVID_DDK_FILE_95
pointer.c,NVID_DDK_FILE_96
precomp.h,NVID_DDK_FILE_97
s3common.h,NVID_DDK_FILE_98
s3def.h,NVID_DDK_FILE_99
s3dline.c,NVID_DDK_FILE_100
s3dmacro.h,NVID_DDK_FILE_101
s3dtri.c,NVID_DDK_FILE_102
s3ioctl.h,NVID_DDK_FILE_103
S3Virge.htm,NVID_DDK_FILE_104
s3virge.inf,NVID_DDK_FILE_105
sources,NVID_DDK_FILE_106
strips.c,NVID_DDK_FILE_107
stroke.c,NVID_DDK_FILE_108
strtch3d.c,NVID_DDK_FILE_109
text3d.c,NVID_DDK_FILE_110
textout.c,NVID_DDK_FILE_111
thunk.c,NVID_DDK_FILE_112
virge.rc,NVID_DDK_FILE_113
virge1.h,NVID_DDK_FILE_114

S3Virge.htm contains following information:

S3Virge […]
Show full quote

S3Virge

SUMMARY

This sample display driver demonstrates the implementation of the following Windows® 2000 features:

DirectDraw
Direct3D
Video Port Extensions

BUILDING THE SAMPLE
Build the sample using the standard Windows 2000 driver installation guide. There are no special requirements for installing this driver. Once built, it produces the binary S3mvirge.dll. Both checked and free builds are available.

This driver works on both x86 and Alpha platforms, and the code builds properly with Visual C 6.0. The driver supports Plug and Play, Power Management, VPE (Video port extensions), DirectDraw, Direct3D, and OpenGL/MCD.

RESOURCES

More information about Windows 2000 video driver development can be found online at http://www.microsoft.com/hwdev/video/.
KNOWN ISSUES

This is a beta release of this sample driver. Following is a list of known issues in the Beta 2 sample.
DDK: S3VIRGE: DD: DISPLAY: Fails PC98 test Downloadable Ramdac

DDK: S3VIRGE: DD: DISPLAY: S3Virge failing Video Memory Management Tests

DDK: S3VIRGE: DD: DISPLAY: Failing PC98 Perform Double Buffer Swaps with no tearing test

S3VIRGE: MINI: DDK: Resource claimed but not all paths free it when done. (Hardware resource leak)

CODE TOUR
File Manifest

File Description

Readme.htm The documentation for this sample (this file)
Sources The generic file for building the code sample
Bank.c All the banking code for the display driver
Bitblt.c High-level DrvBitBlt and DrvCopyBits functions
Bltmm.c The low-level memory-mapped IO blt functions
Brush.c Handles all brush/pattern initialization and realization
Color.c Color dithering code
D3d.c Main D3D driver file (Context, texture, caps mgmt)
D3ddrv.h D3D file: Globally used structures in the D3D driver
D3ddx6.c D3D file: DrawPrimitive2 callbacks
D3dgntri.c D3D file: Generator file for all hw triangle rendering funcs
D3dline.c D3D file: Hw line primitive rendering
D3dmath.h D3D file: Mathematical utilities
D3dpoint.c D3D file: Hw point primitive rendering
D3dstate.c D3D file: Render state management
D3dtess.c D3D file: Triangle UV tesselation for oversized triangles
D3dtri.c D3D file: Hw triangle primitive rendering
D3dutil.c D3D file: Utility functions
Ddraw.c Direct Draw functions
Ddraw3d.c DirectDraw components for D3D
Debug.c Debugging functions and utilities
Debug.h Debugging symbols and inline functions
Dma.c DMA management
Driver.h Prototypes for the display driver
Enable.c All functions that enable and disable the driver, the pdev, and the surface
Escape.c OpenGL escape functions
Fillpath.c The DrvFillPath routine
Heap.c Video memory management
Hw.h HW 2D register addresses and macros
Hw3d.h HW 3D register addresses and macros
Lines.c Required GDI line support routines
Lines.h Line drawing constants and structures
Lpb.c Contains most of the DirectDraw VPE stuff
Lpb.h LPB Register Definitions
Makefile Drivers makefile
Mcd.c Main OpenGl MCD file.
Mcdclip.c OpenGL MCD: Primitive clipping
Mcdhw.h OpenGL MCD: Hw related structures and defines
Mcdline.c OpenGL MCD: Hw line rendering
Mcdmath.h OpenGL MCD: Mathematical utility macros
Mcdpoint.c OpenGL MCD: Hw point rendering
Mcdprim.c OpenGL MCD: Primitive preprocessing
Mcdrend.c OpenGL MCD: State management and setup
Mcdtex.c OpenGL MCD: Texture setup and management
Mcdtri.c OpenGL MCD: Hw triangle rendering
Mcdutil.c OpenGL MCD: Utility functions
Mcdutil.h OpenGL MCD: Utility defines and macros
Misc.c Miscellaneous common routines
Mpc.h MPC routines
Multi.c Multiple display boards support routines
Nodma.c Utility macros
Paint.c DrvPaint routine
Palette.c Color palette support routines
Pointer.c Hardware/software pointer routines
Precomp.h Precompiled headers
S3common.h Common S3 function routines
S3def.h Common S3 function definition header
S3dline.c OpenGL MCD: Hw line rendering
S3dmacro.h D3D file: Hw related macros and defines
S3dtri.c OpenGL MCD: Hw triangle rendering
S3ioctl.h Miniport IO control routines
Strips.c Contains the low-level line drawing routines called by DrvStrokePath
Stroke.c DrvStrokePath routine
Strtch3d.c DrvStretchBlt routine
Text3d.c DrvTextout routine
Textout.c Textout support routines
Thunk.c Debug routines
Virge.rc Resource file for the display driver
Virge1.h Constant and structure definition header

Vintage computers / SGI / PC and UNIX workstation OpenGL performance comparison

Reply 1 of 3, by diagon_swarm

User metadata
Rank Newbie
Rank
Newbie

I successfully compiled the driver from DDK, but it was not necessary. The final version is bundled in Windows 2000 and it is presumably the only video card driver bundled in Windows 2000 that has support for OpenGL 😀 I tested it only in PCem and the OpenGL driver responds with PFD_GENERIC_ACCELERATED=1, which means that MCD is active. PCem clearly routes the OpenGL programs to its 3D accelerator emulation and it emulates Virge to the level that alpha-blended polygons have the infamous dithering artifacts around them.

The driver works surprisingly well - you can run multiple OpenGL programs at the same time, move their windows freely (or partially cover them). The driver is robust enough to run GLQuake or programs like 3D Studio MAX. However, after the first resolution/color-depth change, the graphics driver switches back to software until you reboot the computer (at least that happens in PCem, but I assume that it is a driver problem).

Unlike with Brian Paul's MESA 3D Virge driver for Windows 9x, this driver uses OpenGL hardware acceleration only in 16-bit color modes (MESA works also with 24-bit).

Attachments

Vintage computers / SGI / PC and UNIX workstation OpenGL performance comparison

Reply 3 of 3, by diagon_swarm

User metadata
Rank Newbie
Rank
Newbie

Well... not so good 😀

s3-virge-MCD.png
Filename
s3-virge-MCD.png
File size
122.88 KiB
Views
1109 views
File license
CC-BY-4.0

Online table was updated: http://swarm.cz/gpubench/_GPUbench-results.htm

If I compare it with the Brian Paul's OpenGL ICD driver for Virge, I get following from the results:
- Simple smooth-shaded triangles are drawn like they also have alpha-blending enabled, so the speed is halved here (triangles without textures are drawn with the same speed regardles the blending settings)
- Textured polygons with high-resolution textures are drawn so slow that MCD maybe draws them using software renderer... if low-res textures are used, the performance is 25-30% lower than with ICD
- As usual, MCD has high driver overhead on drawcalls: 30 thousand drawcalls per second compared to 140 with ICD

I tried GLQuake timedemo with S3 Virge GX (75MHz, EDO):
MCD in Windows 2000: 8.6 fps (point sampling) / 8.0 fps (bilinear filtering)
S3 Direct3D DX5 wrapper for GLQuake in Windows 98: 14,8 fps (point sampling) / 11.3 fps (bilinear filtering)

Vintage computers / SGI / PC and UNIX workstation OpenGL performance comparison