Commit Graph

9 Commits

Author SHA1 Message Date
Simon McVittie 5909b9a1cf Isolate the Altivec code so non-Altivec PPC targets can use the same binary.
Moved all the code using Altivec intrinsics to separate files. This 
means we can optionally use GCC's -maltivec on just these files, which
are chosen at runtime if the CPU supports Altivec, and compile the rest
without it, making a single binary that has Altivec optimizations but
can still work on G3.

Unlike SSE and similar extensions on x86, there does not seem to be
a way to enable conditional, targeted use of Altivec based on runtime
detection (which is what ioquake3 wants to do) without also giving the
compiler permission to use Altivec in code generation; so to not crash
on CPUs that do not implement Altivec, we'll have to turn it off
altogether, except in translation units that are only entered when
runtime Altivec detection is successful.

This has been tested on Linux PPC (on an Altivec-enabled CPU),
but we may need further work after testing trickles out to other
PowerPC devices and ancient Mac OS X builds.

I did a little work on this patch, but the majority of the effort belongs 
to Simon McVittie (thanks!).
2018-05-12 14:14:47 -04:00
Edward Betts fe42b8653d Correct spelling mistakes. 2017-11-22 01:40:20 -06:00
Zack Middleton 6f0736ce9a Fix loading renderer DLLs on Windows x86
After 'Fix floating point precision loss in renderer', Windows x86
client won't load the renderer DLLs. The problem is a 64 bit modulus.
I couldn't find any reports of this online. However, client with
built-in renderer worked with the 64 bit modulus.

Only tested with mingw-w64.
2017-09-07 20:42:31 -05:00
Zack Middleton 59b1262b82 Fix floating point precision loss in renderer [part 2]
Fix floatTime using float precision instead of double using GCC.
Fix R_BindAnimatedImage to be in sync with function table.
Fix vertexDeform bulge, vertexDeform normals, noise wave function
at high level time.

Revert unnecessary float -> double conversions.
2017-08-03 00:14:22 -05:00
Zack Middleton 30fdd88c9f Fix floating point precision loss in renderer [part 1]
Patch for https://bugzilla.icculus.org/show_bug.cgi?id=5931 by
Eugene C. from 2013 plus recent fix for tcMod rotate.

I merged the changes into the OpenGL2 renderer though the fix for
tcMod turb doesn't translate.
2017-08-02 23:44:44 -05:00
Victor Roemer 398dea397c Fix Makefile for OSX
Bump base SDK from 10.5 -> 10.7
Just use the builtin __APPLE__
2016-06-12 17:17:33 -04:00
Zack Middleton 22bcda018b Correct a few OpenGL variable types
Affectly no change for desktop OpenGL.
Use correct types for OpenGLES support.
2014-11-16 14:56:43 -06:00
Zack Middleton ae0e09aba9 Remove vertexLightmap from textureBundle_t, it's never qtrue 2013-11-02 02:59:31 -05:00
Tim Angus f6fb9eb602 renderer -> renderergl1, rend2 -> renderergl2 2013-02-15 23:46:37 +00:00
Renamed from code/renderer/tr_shade.c (Browse further)