Commit Graph

138 Commits

Author SHA1 Message Date
Bill Currie 14bc560624 [build] Add option to enable gcov data generation
Nice to be able to check how good the tests are (or aren't, as the case
may be).
2021-03-07 17:39:22 +09:00
Bill Currie 9617bbef97 [build] Create static libs for render targets
The static libs are used to build the plugins, but make it easy to use
only those modules needed for tests. Fixes the link error when running
"make check" with non-static plugins.
2021-03-03 16:34:16 +09:00
Bill Currie 22c0bec03a [build] Clean up obsolete QF_PROCESS_NEED_DIRS
Its need went away with the shift to non-recursive make. The macro is
still available just in case.
2021-03-03 13:02:35 +09:00
Bill Currie 7a353d5aee [model] Build vulkan model libs
The contents are currently empty (required .c files), but this gets the
build system updated.
2021-01-19 14:12:49 +09:00
Bill Currie 09a10f80e1 [util] Add basic SIMD implemented vector functions
They take advantage of gcc's vector_size attribute and so only cross,
dot, qmul, qvmul and qrot (create rotation quaternion from two vectors)
are needed at this stage as basic (per-component) math is supported
natively by gcc.

The provided functions work on horizontal (array-of-structs) data, ie a
vec4d_t or vec4f_t represents a single vector, or traditional vector
layout. Vertical layout (struct-of-arrays) does not need any special
functions as the regular math can be used to operate on four vectors at
a time.

Functions are provided for loading a vec4 from a vec3 (4th element set
to 0) and storing a vec4 into a vec3 (discarding the 4th element).

With this, QF will require AVX2 support (needed for vec4d_t). Without
support for doubles, SSE is possible, but may not be worthwhile for
horizontal data.

Fused-multiply-add is NOT used because it alters the results between
unoptimized and optimized code, resulting in -mfma really meaning
-mfast-math-anyway. I really do not want to have to debug issues that
occur only in optimized code.
2020-12-30 18:20:11 +09:00
Bill Currie 7fb335a215 [vulkan] Add support for building and loading shaders
Shaders can be built as spv files and installed into
$libdir/quakeforge/shaders or as spvc files and compiled into the
engine. Loading supports $builtin/name to access builtin shaders,
$shader/path to access external standard shaders and quake filesystem
access for all other paths.
2020-12-23 14:32:29 +09:00
Bill Currie 86b5b30b45 Merge branch 'master' into vulkan 2020-06-25 14:03:52 +09:00
Bill Currie 6d5ffa9f8e [build] Move to non-recursive make
There's still some cleanup to do, but everything seems to be working
nicely: `make -j` works, `make distcheck` passes. There is probably
plenty of bitrot in the package directories (RPM, debian), though.

The vc project files have been removed since those versions are way out
of date and quakeforge is pretty much dependent on gcc now anyway.

Most of the old Makefile.am files  are now Makemodule.am.  This should
allow for new Makefile.am files that allow local building (to be added
on an as-needed bases).  The current remaining Makefile.am files are for
standalone sub-projects.a

The installable bins are currently built in the top-level build
directory. This may change if the clutter gets to be too much.

While this does make a noticeable difference in build times, the main
reason for the switch was to take care of the growing dependency issues:
now it's possible to build tools for code generation (eg, using qfcc and
ruamoko programs for code-gen).
2020-06-25 11:35:37 +09:00
Bill Currie 9ce64a5cfb [build] Fix curses.h header check 2020-03-22 01:14:57 +09:00
Bill Currie 1a7add3f6d Merge branch 'master' into vulkan 2020-03-20 13:04:41 +09:00
Bill Currie de01cff70e [build] Install QF/keys.h into qfcc's include directory
As well as $prefix/include, of course. This fixes the problem with
external ruamoko builds failing due to keys.h and qfcc's "lockdown" on
system headers.
2020-03-03 22:22:53 +09:00
Bill Currie df2ed4b086 [qwaq] Move from tools to ruamoko
This fixes the dependency issues between qwaq and ruamoko. qwaq is
actually older than ruamoko. That little language feature test has come
a long way.

However, I'm considering moving to non-recursive make, but...
2020-03-01 00:55:15 +09:00
Bill Currie 126f8502bd Start working on a qwaq console tool
The intention is it will hopefully become a debugger. It will certainly
help with development of the progs engine.
2020-02-26 22:10:59 +09:00
Bill Currie f185e07ad2 Fix some missing dependencies
Generally not a problem with libtool and its automatic dependencies, but
best to be explicit.
2020-02-26 01:01:47 +09:00
Bill Currie bd6dcafdc8 Replace system defines/includes with qfcc's
Right now, it probably works only with modern gcc.
2020-02-19 02:35:09 +09:00
Bill Currie d4574111b5 Replace system defines/includes with qfcc's
Right now, it probably works only with modern gcc.
2020-02-19 02:31:16 +09:00
Bill Currie e9f1bc7b30 Make vulkan building actually conditional 2019-07-09 01:03:26 +09:00
Bill Currie 8ee06d75a9 Separate render and presentation initialization
This paves the way for clean initialization of the Vulkan renderer, and
very much cleans up the older renderer initialization code as gl and sw
are no longer intertwined.
2019-07-09 01:00:47 +09:00
Bill Currie 53a62e4d62 Add checks for some dlopen flags
Checks aren't used yet, though.
2019-07-09 00:45:25 +09:00
Bill Currie 2bc78e7f0a Start work on a Vulkan-based renderer
Doesn't do much other than create an instance and enumerate some stuff,
but the build system is working.
2019-07-06 14:56:15 +09:00
Bill Currie 34bcf7faab Do a pure/const/noreturn/format attribute pass.
I always wanted these, but as gcc now provides warnings for functions that
could do with such attributes, finding all the functions is much easier.
2018-10-09 12:42:21 +09:00
Bill Currie 0de0eb2fc7 Fix a bunch of bit-rot. 2018-06-08 13:21:30 +09:00
Bill Currie 735fcf68d5 Clean up usage of va_copy.
AC_TYPE_VA_LIST is no longer necessary, and the code is easier to read.
2016-01-03 21:16:23 +09:00
Bill Currie f0dc995c67 Handle c99 inline vs gnu89 inline.
The meaning of "extern inline" and "inline" swaps between the two, and
gcc-5 uses c99 inline.
2015-08-18 00:11:03 +09:00
Bill Currie 512514ca23 Limit gcc_struct checking to win32 builds.
I guess -Werror isn't used when doing compile checks.
2014-02-03 16:55:09 +09:00
Bill Currie 3fb9fb9373 Attempt to autoconfiscate gcc_struct.
It seems some tool-chains get rather picky about such things.
2014-02-03 16:47:51 +09:00
Bill Currie 48809404b1 Use qfplist for light entities.
This removes a lot of redundant code from qflight (though it does become
dependent of libQFgamecode *shrug*). The nice thing is qflight now uses the
exact same code to load entities as does the server.
2013-03-07 09:11:22 +09:00
Bill Currie 7137783e47 Disable svga support for now.
It is suffering some bitrot and I don't feel like fixing it right now, but
it causes problems for people trying to build QF. This should be ok because
it's one of those "if uncertain, say no" things.
2013-02-14 09:37:25 +09:00
Bill Currie c6f9d8b64c Reduce CFLAGS abuse a little for mingw targets.
This fixes missing debug info (useful for fixing linker errors, if nothing
else).
2013-01-28 16:21:42 +09:00
Bill Currie d139640755 Make fs_userpath default to ~/quakeforge on windows.
The ~ gets expanded to CSIDL_LOCAL_APPDATA, $HOME, $USERPROFILE or just
".", whichever succeeds first. The usual location will be:
"C:\windows\profiles\<user>\Local Settings\Application Data".

"." is now the fallback for *nix systems too.
2013-01-23 11:10:19 +09:00
Bill Currie e27d7cbd2d Handle alloca "correctly".
Use AC_FUNC_ALLOCA and the #ifdef mess suggested by the autoconf docs
(hidden in qfalloca.h).
2013-01-22 21:02:50 +09:00
Bill Currie 00639aa9d1 Require bison 2.6 or later.
It turns out the apiprefix define is quite new (I didn't realize it at the
time) and I'd rather get FTBFS reports based on configure catching the
error than gcc catching it.
2013-01-11 13:48:14 +09:00
Bill Currie 9028cda24b Add -fno-unsafe-math-optimizations to CFLAGS.
It seems -ffast-math is not necessarily faster, and the errors it causes
may not be worth the gains, but I'm not sure I want to nuke it completely,
so instead disabling the worst offender of it
(-fno-unsafe-math-optimizations) seems to be the best option. qfbsp now
produces identical text output between optimized and unoptimized builds,
and may be slightly faster than before the change (1.9s for start.map vs
2.0s)
2013-01-11 11:17:31 +09:00
Bill Currie 6eb6b6c0ba Change pointer_t to unsigned and clean up the mess.
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie cc5e0f9957 Use git-version-gen to create meaningful version strings.
git-version-gen is taken from autoconf-2.69 with the change of adding
--tags to the git command line since we don't sign our tags (yet).
2012-12-21 18:43:03 +09:00
Bill Currie 3e38c4aa48 Merge branch 'qfcc-cse'
qfcc now does local common subexpression elimination. It seems to work, but
is optional (default off): use -O to enable. Also, uninitialized variable
detection is finally back :)

The progs engine now has very basic valgrind-like functionality for
checking pointer accesses. Enable with pr_boundscheck 2
2012-12-13 20:17:28 +09:00
Bill Currie 042cae29b1 Use pkg-config when checking for sdl.
This makes setting up for cross-compiling cleaner.
2012-11-29 11:16:06 +09:00
Bill Currie 1cd58b30f4 Fix the library dependencies for the servers.
It's so rarely I build without clients...
2012-11-27 13:18:23 +09:00
Bill Currie 99b34232f8 Add a test harness for qfcc.
It's only the beginning, but finally make check is useful for qfcc :)
It even has a failing test :D
2012-11-22 21:59:01 +09:00
Bill Currie ef7678fcec Use DWARF debugging with recent gcc.
Oh, wow, I wish I'd known about it before. C macro evaluation in gdb!!!
*sob*
2012-11-14 14:51:23 +09:00
Bill Currie abc81cee85 Avoid building unneeded libs.
Having better dependency info in build_control.m4 would be nice, but this
works well enough for now.
2012-08-20 14:12:20 +09:00
Bill Currie a2f2d4d949 "Check" for the availability of pthreads.
Unfortunately, just because the header is there doesn't mean anything will
actually work :(. Also, the check is based on the host vendor/os for now.
Yes, it's rather lame but it will do for now.

With this, QF will build on an almost fresh ps3toolchain install. Only two
"fixes" are needed:
 o  In $PS3DEV/ppu/powerpc64-ps3-elf: ln -s ../include sys-include
 o  libsamplerate cross-built and installed.
2012-08-19 13:40:42 +09:00
Bill Currie 358ea4ef9a Fall back to execve/wait when execvp and waitpid are unavailable. 2012-08-19 13:18:38 +09:00
Bill Currie ceea60059a Sort the checked functions. 2012-08-19 13:07:18 +09:00
Bill Currie bf41851bd9 Check for ioctl availability.
This gets networking compiling. Now the build gets all the way to qfcc,
where it dies with waidpid/execvp errors :P
2012-08-18 22:02:02 +09:00
Bill Currie 60596038d2 Half-disable pthread for ps3toolchain.
I can't find anything for pthread other that pthread.h, but this lets nq
and qw stuff build (minus the pending networking issues).
2012-08-18 21:51:04 +09:00
Bill Currie 575693e4a0 A bunch of networking compile fixes.
This isn't everything needed to get networking compiling, but it's pretty
close.
2012-08-18 21:49:30 +09:00
Bill Currie 7f805c2527 Use pkg-config for zlib.
Helps cope with zlib being in weird places (eg, ps3toolchain)
2012-08-18 21:41:33 +09:00
Bill Currie 3b047a3cc1 Check for getuid and cope when it's not there.
The ps3toolchain doesn't have getuid or getpwent. Nor does it have
timeGetTime, so use Sys_DoubleTime instead.
2012-08-18 21:37:54 +09:00
Bill Currie ee27c49e70 Separate the checks for building dirent.c and fnmatch.c.
ps3's libc has opendir and friends, but not fnmatch.
2012-08-18 12:12:45 +09:00