VOGONS


FitzQuake for DOS [fxMesa]

Topic actions

Reply 23 of 86, by __ggorts

User metadata
Rank Member
Rank
Member

This binary shows the mmx, too, so this one would meet your request fully as think possible for the cvg (instead of the immediately prior one).

Attachments

  • Filename
    glide3_cvg_qdos51_high_opts_2.7z
    File size
    140.46 KiB
    Downloads
    79 downloads
    File comment
    glide3 libs for cvg (qdos/mesa51) with all optimizations on (verified version instead of prior one)
    File license
    Fair use/fair dealing exception

Reply 26 of 86, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

I'm going to upload a new version shortly that has the few small changes to CVGs source tree (added stipple alpha support). I want you to test that compile for me too then.

Reply 30 of 86, by __ggorts

User metadata
Rank Member
Rank
Member

Here it is:

Attachments

  • Filename
    glide3_cvg_qdos51_opts_stipp.7z
    File size
    140.44 KiB
    Downloads
    87 downloads
    File comment
    glide3 libs for cvg (qdos/mesa51) with all optimizations and stipple alpha
    File license
    Fair use/fair dealing exception

Reply 35 of 86, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

Things get more interesting in that my gcc4 builds of glide3x (no matter which version) had proper working SLI on voodoo 5. On sezero's builds I usually got corrupt screens in SLI mode.

After much fiddling around I think I found the issue... Compiling with -O1 instead of -O2 -ffast-math in gcc3 seems to have resolved the issue. The extra flags also appear to be unnecessary as timedemos were exactly the same.

Maybe GCC3 is more aggressive with its floating point math?

Reply 36 of 86, by __ggorts

User metadata
Rank Member
Rank
Member

You have very interesting findings. On glide3 makefiles I've seen prior, they have this:

ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
OPTFLAGS ?= -O1 -ffast-math -mcpu=pentium
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
OPTFLAGS ?= -O1 -ffast-math
endif

I recall that this is documented (maybe a code comment?) somewhere about the troubles of -O2 and resorting to -O1 for building glide3, at least in one or more models (likely originally tested via gcc295). If the timedemo is not significantly different, as you discovered along with these parameter values, then the configuration should be ideal. It is really a surprise, though, that the SLI issues are caused by the compiler version, but I'm glad it's not some obscure bug.

If gcc3 had -O1 -ffast-math working, then it should be the compiling of the C code, maybe rearranged compiled code which is producing an unintended result. However, if I read it correctly, and -ffast-math was disabled, then it could be tested with -O2 where it is disabled there, too; in that case, I would think the floating point math is aggressive, but there are parameters to disable each component of that optimization, so it is possible to test the common problem spots.

Reply 37 of 86, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

Well, I could get nuts and try to find out specifically what switch it is... but considering there isn't even a performance degradation it's probably not worth the effort.

I've noticed in general that playing with optimzer flags usually does no good. Even GCC warns about it. For small, simpler programs it probably makes a difference but large projects like these all it seems to do is introduce subtle bugs.

Reply 38 of 86, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie
__ggorts wrote:
You have very interesting findings. On glide3 makefiles I've seen prior, they have this: […]
Show full quote

You have very interesting findings. On glide3 makefiles I've seen prior, they have this:

ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86
OPTFLAGS ?= -O1 -ffast-math -mcpu=pentium
else
CFLAGS += -DGLIDE_USE_C_TRISETUP
OPTFLAGS ?= -O1 -ffast-math
endif

I recall that this is documented (maybe a code comment?) somewhere about the troubles of -O2 and resorting to -O1 for building glide3, at least in one or more models (likely originally tested via gcc295). If the timedemo is not significantly different, as you discovered along with these parameter values, then the configuration should be ideal. It is really a surprise, though, that the SLI issues are caused by the compiler version, but I'm glad it's not some obscure bug.

If you can find out specifically, what version you found this information and if there was a comment in the readme/makefile/CHANGES/VERSION/etc I'd like to know about it.

It may be possible at one point someone tried -O2 -ffast-math when a newer GCC update rolled around and it mysteriously started working again.