SpiritQuaddicted / reQuiem

reQuiem is a custom OpenGL Quake engine for Windows and Linux. It's designed for maximum compatibility with all things Quake - past, present and future. It's fast, reliable, and easy to configure. In short: it fixes what was broken, improves what needed improving, and leaves the rest alone. It was developed by jdhack.
GNU General Public License v2.0
17 stars 2 forks source link

Finalise the makefile for linux #39

Closed SpiritQuaddicted closed 10 years ago

SpiritQuaddicted commented 10 years ago

I needed to add "CFLAGS += -m32" and to the linker options "-ldl -m32" to get it to compile on my 64 bit system. I have no idea if I should add those permanently or not.

ffast-math could be removed to avoid the lightmap corruption issues. I did some totally unscientific bigass1.dem benchmarking which gave me a 2% performance loss when using "-march=pentium" and ~9% for "-march=pentium4 -msse -mfpmath=sse" with "-ffast-math" being removed. Both with framerates above 1000 fps, so not really something significant.

szo said "AFAICS, the -funsigned-char, -funroll-loops and -fno-strength-reduce switches can be safely removed."

I would say easier and safer compiling beats performance gained by special compiler flags. There is probably way more potential for performance improvement within the engine itself.

SpiritQuaddicted commented 10 years ago

For a demo with ~1400 Spawns/Torches on marcher the differences are even lower. No difference at all for the pentium4 binary, ~1% for the pentium one. Difference between same options but pentium4 vs pentium are ~8%.

I am on a i5 CPU.

neogeographica commented 10 years ago

Safe is good. :-)

FWIW, the Visual Studio project also builds a 32-bit (x86) executable. No unusual compiler options, just /O2 (to make tradeoffs for speed instead of for smaller executable). Using the Windows build I don't see the lightmap problems that you saw in the jam1 maps.

P.S. It's fine to remove -funroll-loops in the Linux options, but I don't think that could cause any functionality differences. It should just be trading off executable size to gain speed. (Might not make any speed difference in practice.)

SpiritQuaddicted commented 10 years ago

There was some discussion about the makefile in http://forums.inside3d.com/viewtopic.php?f=3&t=5488

I am now making it the safer choice after I derped around for an hour wondering what was broken, only to realise we still had the offending stuff inside...

SpiritQuaddicted commented 10 years ago

Fixed by https://github.com/SpiritQuaddicted/reQuiem/commit/dbc97e11d3bc687d1e8586bb17a7f02c78a7ce33