Commit Graph

3976 Commits

Author SHA1 Message Date
Bill Currie 143030fec4 [gamecode] Use text for all v6p opcode names
This makes the v6p instruction table consistent with the ruamoko
instruction table, and clears up some of the ugliness with the load,
store, and assign instructions (. .= and = are now spelled out). I think
I'd still prefer an enum code (faster) but at least this is more
readable.
2022-01-20 09:26:01 +09:00
Bill Currie 30008aeb13 [qfcc] Fix a missed address expression conversion
Found while testing operator renaming.
2022-01-20 00:42:29 +09:00
Bill Currie 105d57f5e7 [qfcc] Improve handling of type names as variables
This is allowed in C so long as the scopes are different.
2022-01-19 23:17:49 +09:00
Bill Currie 07c4d28638 [qfcc] Handle bare "short"
Missed this case in duplicate_type. Allows "short foo" and
"sizeof(short)" (even though qfcc and the engine have two ideas of the
size: I expect trouble later).
2022-01-19 21:23:11 +09:00
Bill Currie 9f42cf726b [qfcc] Clean up duplicate specifier check code
I don't like the name, but having two identical copies of code is never
a good thing, especially something that big.
2022-01-19 21:20:31 +09:00
Bill Currie df890432b7 [qfcc] Add support for unsigned, long, etc
long is ignored for double, and v6p progs are stuck with 32 bits for
longs (don't feel like extending v6p any further), but the basics are
there for Ruamoko.

short is ignored for ints because the minimum size is 32, and signed is
just noise for ints anyway (and no chars, so...).

unsigned, however, is finally implemented properly (or at least seems to
be working correctly: tests pass after getting things compiling again,
and lt.u is used where it should be :)
2022-01-19 18:08:58 +09:00
Bill Currie e11fa77a34 [qfcc] Use pr_type_names to generate is_TYPE
This means basic types will always have a check function automatically.
2022-01-19 18:07:54 +09:00
Bill Currie 380cb3ba7f [qfcc] Clean up the type tables for binary expressions
More index labels and remove the null entries since they're not needed
with the labels.
2022-01-19 10:52:07 +09:00
Bill Currie 17add5e00f [qfcc] Use pr_type_names to create basic type defs
This takes care of the type structs and the ev_* to type map.
2022-01-18 22:59:53 +09:00
Bill Currie 57fe669099 [qfcc] Shorten type_function and type_pointer names
To type_func and type_ptr to match the ev type names.
2022-01-18 22:34:52 +09:00
Bill Currie 068c04ece6 [gamecode] Add ev_ushort and partial support
Really, only just enough to get everything compiling (which does include
vkgen running correctly).
2022-01-18 22:08:37 +09:00
Bill Currie 6df79b2b06 [qfcc] Correct xdef structures and usage in test
Attempting to add ev_ushort caused ptraliasenc to break, but that was
because it was already broken: I had implemented the scan of the xdef
table incorrectly, thus adding only 1 ev type resulted in the walked
pointer being out of phase with its data due to it first passing over
the type encodings (which is why adding long and ulong didn't cause any
obvious trouble).
2022-01-18 21:42:53 +09:00
Bill Currie 5b97aa3897 [qfcc] Use index labels for the type arrays
The one place that needed it most... constfold.c
2022-01-18 21:22:18 +09:00
Bill Currie cd30408675 [gamecode] Rename ev_quat to ev_quaternion
I much prefer the full name, though the short version is easier to type.
2022-01-18 17:05:12 +09:00
Bill Currie e9e54d08c0 [gamecode] Rename func_t to pr_func_t
Even more consistency.
2022-01-18 15:36:58 +09:00
Bill Currie afd1eb775b [gamecode] Rename ev_pointer to ev_ptr
Rather short (no worse than ev_int, though) but more consistency is
usually a good thing.
2022-01-18 14:36:06 +09:00
Bill Currie cfe7c44df0 [gamecode] Rename ev_integer to ev_int
And other related fields so integer is now int (and uinteger is uint). I
really don't know why I went with integer in the first place, but this
will make using macros easier for dealing with types.
2022-01-18 13:27:19 +09:00
Bill Currie 2df64384c1 [gamecode] Clean up string_t and pointer_t
They are both gone, and pr_pointer_t is now pr_ptr_t (pointer may be a
little clearer than ptr, but ptr is consistent with things like intptr,
and keeps the type name short).
2022-01-18 12:11:14 +09:00
Bill Currie 0bd05c71ac [gamecode] Use unsigned for entity values
I don't know why they were ever signed (oversight at id and just
propagated?). Anyway, this resulted in "unsigned" spreading a bit, but
all to reasonable places.
2022-01-16 22:15:18 +09:00
Bill Currie 66528e34fc [qfcc] Give return expressions their own type
Very simple for now (just the return value if not a void return), but
that's the last of the statements masquerading as expressions.
2022-01-09 16:28:08 +09:00
Bill Currie 563de20208 [qfcc] Give branch expressions their own type
This includes calls and unconditional jumps, relative and through a
table. The parameters are all lumped into the one object, with some
being unused by the different types (eg, args and ret_type used only by
call expressions). Just having nice names for the parameters (instead of
e1 and e2) makes it nice, even with all the sub-types lumped together.

No mysterious type aliasing bugs this time ;)
2022-01-09 14:02:16 +09:00
Bill Currie 4111d44dcc [gamecode] Move progs auxiliary headers into a subdirectory
Just another step along the road of tidying up the QF include directory
(and desirable for generated data).
2022-01-09 00:26:52 +09:00
Bill Currie 63795e790b [qfcc] Clean out some old code
The move operator names are definitely obsolete (due to dropping the
expressions a year or two ago) and the precedence checks seem to be
handled elsewhere. Memset and state expressions went away a while back
too.
2022-01-08 21:21:31 +09:00
Bill Currie 14352ea65a [qfcc] Really fix those type aliasing bugs
Found the cause: revered to wrong case for template code :/
2022-01-08 18:49:35 +09:00
Bill Currie 62d58a2255 Revert "[qfcc] Fix another type aliasing bug"
This reverts commit d14f695c68.

Found the cause: revered to wrong case for template code
2022-01-08 18:48:54 +09:00
Bill Currie 134f5ca6a4 Revert "[qfcc] Fix some type aliasing bugs"
This reverts commit da210db720.

Found the cause: revered to wrong case for template code
2022-01-08 18:48:23 +09:00
Bill Currie 65b6c366c3 [qfcc] Give assignment expressions their own type
This is getting easier (know where to look, I guess). Nicely, I found
the source of those weird type aliasing bugs :)
2022-01-08 18:44:29 +09:00
Bill Currie d14f695c68 [qfcc] Fix another type aliasing bug
This one exposed by the address expression cleanup.
2022-01-08 16:54:08 +09:00
Bill Currie fa482e8ee5 [qfcc] Give address expressions their own type
Definitely a pain to get working after the switch, but definitely worth
the effort. Still exposing type aliasing bugs.
2022-01-08 16:52:24 +09:00
Bill Currie cf8061c4d3 [qfcc] Mark opcode_get as pure
Because gcc told me to :P
2022-01-08 12:14:27 +09:00
Bill Currie da210db720 [qfcc] Fix some type aliasing bugs
I have no idea why sorting out expression aliasing exposed these type
aliasing bugs, but it did. All tests *build* again (and pass).
2022-01-08 12:10:30 +09:00
Bill Currie 23c9a317f8 [qfcc] Give alias expressions their own type
While this was a pain to get working, that pain only went to prove the
value of using proper "types" (even if only an enum) for different
expression types: just finding all the places to edit was a chore, and
easy to make mistakes (forgetting bits here and there).

Strangely enough, this exposed a pile of *type* aliasing bugs (next
commit).
2022-01-08 12:06:52 +09:00
Bill Currie 420d55406f [qfcc] Add a rule to build the qfcc tests
This makes it easier to build and run (by hand) the tests when things
aren't working.
2022-01-08 03:09:15 +09:00
Bill Currie f5be54b6d2 [qfcc] Sanitize expr type enum
Got tired of dealing with out of date string tables.
2022-01-07 23:12:20 +09:00
Bill Currie 479d82f380 [qfcc] Create separate instruction init and lookup
v6 vs v6p are more or less as before, with ruamoko added in. qfcc will
now try (and fail, due to the opcode table opnames being wrong) to
create ruamoko progs when given the ruamoko target option.
2022-01-07 19:56:15 +09:00
Bill Currie 14d95f81d1 [gamecode] Remove PR_Opcode_Init
It was idempotent, then it became impotent. Now it's just not needed.
2022-01-07 19:25:34 +09:00
Bill Currie 7e303a1151 [qfcc] Hide details about instruction type
At this stage, I doubt emit.c will need to know the details of the
target (v6, v6p, ruamoko) since the instruction formats are identical,
just different meanings for the opcode itself.
2022-01-07 19:05:26 +09:00
Bill Currie d9ccf3a394 [qfcc] Remove a pile of stale externs
Those opcode pointers haven't been used for years.
2022-01-07 18:54:59 +09:00
Bill Currie 2d245b8cdc [qfcc] Replace [no-]v6only with target=
This allows v6, v6p (older QF VM) or ruamoko (new QF VM) to be targeted.
Currently defaults to v6p to allow QF to continue building without too
much hassle.
2022-01-07 18:34:05 +09:00
Bill Currie fe153b5b22 [qfcc] Add progs version to qfo and check in linker
While qfcc dealing sensibly with mixed target VMs in the object files
has always been an outstanding issue, with the new instruction set it
has become a priority. Most importantly, this should allow QF to
continue building while I work on qfcc targeting the new IS.
2022-01-07 17:56:05 +09:00
Bill Currie c96cb1f302 [qfcc] Fix some stale documentation comments
It does little good for documentation to refer to fields that don't
exist (because a certain someone forgot to change the docs when changing
the field names, I wonder who :P).
2022-01-07 15:59:06 +09:00
Bill Currie c9b2a740a0 [gamecode] Add etypes for long and ulong
And partial implementations in qfcc (most places will generate an
internal error (not implemented) or segfault, but some low-hanging fruit
has already been implemented).
2022-01-05 22:32:07 +09:00
Bill Currie 8a2788c267 [gamecode] Add PROG_V6P_VERSION and bump PROG_VERSION
This allows the VM to select the right execution loop and qfcc currently
still produces only the old IS (it doesn't know how to deal with the new
IS yet)
2022-01-03 13:56:43 +09:00
Bill Currie 0c17c6dc24 [gamecode] Rename the old opcodes
To reflect their basis on v6 progs instructions, they sport the v6p tag
where the p is for "plus" due to the QuakeForge extensions.
2022-01-02 21:30:02 +09:00
Bill Currie f56fd6ffb6 [qfcc] Preserve requested alignment if larger
build_struct was unconditionally setting the type's alignment. This was
not a problem before because no types were requesting alignments larger
than those requested by their members (for structs). However, with the
upcoming new instruction set, quaternions need to be 4-word aligned.
2022-01-02 11:44:48 +09:00
Bill Currie 97034d9dde [simd] Add 2d vector types
For int, long, float and double. I've been meaning to add them for a
while, and they're part of the new Ruamoko instructions set (which is
progressing nicely).
2022-01-02 00:57:55 +09:00
Bill Currie 365762b8a6 [gamecode] Switch to using indexed initializers
The opcode table is a nightmare to maintain, but this does clean it up
and speed up opcode lookups since they can now be indexed. Of course, it
turns out I had missed adding several instructions, so had to fix that,
and qfcc needed a bit of a re-jigger to get the opcode out of the table.
2021-12-31 19:16:02 +09:00
Bill Currie be474d9937 [gamecode] Remove the wart from def and function names
I never liked the leading s_ (though I guess it means one is supposed to
interpret the int as a string pointer, but meh).
2021-12-31 15:02:31 +09:00
Bill Currie 44c48feb56 [qfcc] Add attached node's parents to source edges
The assignment to the node's variable must come after any uses of that
node, which the node's parent set indicates. In the swap test, this was
not a problem as the node had no parents, and in the link order test, it
just happened(?) to work.
2021-12-28 09:23:14 +09:00
Bill Currie 8433905015 [qfcc] Extend reachable to the label node's parents
While using just the label node's reachable set was sufficient for a
simple swap (t = a; a = b; b = t;), it is not sufficient for
read-before-write dependencies such as found in linked-list building:

    { o = array[ind]; o.next = obj; obj = o; }

The assignment to o.next uses obj, but that use is hidden because obj's
reachable nodes does not include o thus assigning o to obj causes the
array dereference to be assigned directly to obj and thus o.next winds
up pointing to o instead of whatever obj was. The parent nodes of obj's
node are its users, so any new assigned to obj must come after those
parents as well as any node reachable by obj's node.

Fixes a runaway loop error when adding a frikbot to the server.
2021-12-27 14:25:55 +09:00
Bill Currie 4ad84b3786 [qfcc] Add a test for use/write dependencies
I ran into this with frikbot causing an infinite loop due to incorrectly
linked objects.
2021-12-27 14:17:12 +09:00
Bill Currie 44dd183d55 [qfcc] Make it a little easier to see extra info
instead of having to find an #if 0, just uncomment the define.
2021-12-27 14:15:51 +09:00
Bill Currie 95991e0d77 [qfcc] Check switch test expression early
Avoids a segfault when the test expression has errors.
2021-12-27 00:47:35 +09:00
Bill Currie 3059aa7979 [qfcc] Preserve input qfo data in qfo_to_progs
qfo_to_progs was modifying the space data pointers in the input qfo,
making it impossible to reuse the qfo. However, qfo_relocate_refs needs
the updated pointers, thus do a shallow copy of the qfo and its spaces
(but not any of the data)
2021-12-27 00:27:15 +09:00
Bill Currie dcf8beeccc [qfcc] Remove a union wart from qfo_mspace_t 2021-12-26 20:37:01 +09:00
Bill Currie 1d3970bc38 [qfcc] Allow extern builtin function declarations
build_builtin_function does the right thing, and it was only legacy
syntax functions that were affected anyway. Certainly, external
variables should not be initialized, but klik uses @extern { } wrapped
around several builtin functions and I had added the feature to allow
just this as it is rather convenient.
2021-12-26 15:01:38 +09:00
Bill Currie 22c67fc268 [qfcc] Use flow analysis for dealloc check
I decided that the check for whether control reaches the end of the
function without performing some necessary action (eg, invoking
[super dealoc] in a derived -dealoc) is conceptually the return
statement using a pseudo operand and the necessary action defining that
pseudo operand and thus is the same as checking for uninitialised
variables. Thus, add a pseudo operand type and use one to represent the
invocation of [super alloc], with a special function to call when the
"used" pseudo operand is "uninitialised".

While I currently don't know what else pseudo operands could be used
for, the system should be flexible enough to add any check.

Fixes #24
2021-12-25 17:04:26 +09:00
Bill Currie f903211362 [qfcc] Make operand union anonymous
This one was easy enough and gets rid of that little o. wart.
2021-12-25 12:40:24 +09:00
Bill Currie 7c24f116b4 [qfcc] Rename tmpaddr to pseudo_addr
I want to use the function's pseudo address that was used for managing
aliased temporary variables for other pseudo operands as well. The new
name seems to better reflect the variable's purpose even without the
other pseudo operands as temporary variables are, effectively, pseudo
operands until they are properly allocated.
2021-12-25 12:21:59 +09:00
Bill Currie 79b760b1d0 [qfcc] Add failing test for multi-path dealloc
This test checks for control reaching the end of the function without
invoking [super dealloc] in all paths.
2021-12-24 22:45:43 +09:00
Bill Currie 8385046486 [qfcc] Warn when super dealloc invocation is missing
Forgetting to invoke [super dealloc] in a derived class's -dealloc
method has caused me to waste far too much time chasing down the
resulting memory leaks and crashes. This is actually the main focus of
issue #24, but I want to take care of multiple paths before I consider
the issue to be done.

However, as a bonus, four cases were found :)
2021-12-24 22:45:43 +09:00
Bill Currie ff1cdb6f89 [qfcc] Give select expressions their own type
While get_selector does the job of getting a selector from a selector
reference expression, I have long considered lumping various expression
types under ex_expr to be a mistake. Not only is this a step towards
sorting that out, it will make working on #24 easier.
2021-12-24 22:45:43 +09:00
Bill Currie bdd3870d2f [qfcc] Add failing test for dealloc warning
I have gotten tired of chasing memory leaks caused by me forgetting to
add [super dealloc] to my dealloc methods, so getting qfcc to chew me
out when I do seems to be a good idea (having such a warning would have
saved me many hours, just as missing return warnings have).
2021-12-24 22:45:43 +09:00
Bill Currie bdc9e9c39f [qfcc] Unalias types before checking for equality
Fixes a bogus redefinition when going from struct declaration to
typedef.
2021-12-24 06:45:13 +09:00
Bill Currie e0497c7fff [tools] Add a tool to dump sprite info 2021-12-17 08:31:28 +09:00
Bill Currie ca9566a425 [qfbsp] Print the number of textures in the bsp
I needed to check what sort of numbers to expect for bsp texture counts.
It turns out id maps use only 81 max, but oum uses up to 173.
2021-12-17 08:28:02 +09:00
Bill Currie 3b1acf8a7b [qfcc] Correct some errors in the man page 2021-11-29 11:38:54 +09:00
Bill Currie 88b3965794 [vulkan] Pick up vulkan.h from correct location
Well... it could be done better, but this works for now assuming it's in
/usr/include (and it's correct for mxe builts). Does need proper
autoconfiscation, though.
2021-11-19 22:36:19 +09:00
Bill Currie 7ed12e2f37 [qfcc] Fix static function declarations
I'm surprised it took this long for static not working to cause a
problem.
2021-09-24 19:49:55 +09:00
Bill Currie 6144100d9b [qfcc] Check init exists before checking compound
Fixes a segfault that occurred during a parse error in a def
initializer.
2021-09-24 19:44:14 +09:00
Bill Currie 8a5c3c1ac1 [util] Add sys function to get cpu count
And use it in qfvis.
2021-08-13 21:26:48 +09:00
Bill Currie d88bd96390 [qfvis] Use cmem for portal flow stack node allocation
The portal flow stack nodes contain a simd vector, which requires
16-byte alignment. However, on 32-bit Windows, malloc returns 8-byte
aligned memory, leading to eventual segfaults. Since pstack_t is 48
bytes on 32-bit systems, it fits nicely into a 64-byte aligned cache
line (or two on 64-bit systems due to being 80 bytes).
2021-08-13 11:33:03 +09:00
Bill Currie 6fb6885b88 [qfvis] Allocate only 128MB for the main hunk
Even ad_tears didn't really need 1GB, and 32-bit machines can't really
handle 1GB (at least on windows).
2021-08-13 11:33:03 +09:00
Bill Currie 2828500f04 [qfvis] Delay freeing of winding memory
If anything, this is probably a nano-optimization, depending on how
often portals are vis-rejected. I couldn't see any actual difference.
2021-08-08 12:34:18 +09:00
Bill Currie 9a93bf8d4a [qfvis] Make cluster reconstruction O(N)
For most (if not all) maps. The heapsort is needed only if the clustered
leafs are not contiguous, but most bsp compilers output contiguous leaf
clusters, so is just a bit of protection. The difference isn't really
noticeable on a fast machine, but no point in doing more work than
necessary.
2021-08-08 12:34:18 +09:00
Bill Currie 648ae3f877 [qfvis] Clean up the code and output a little
Dead code removed, and the job progress lines are now consistent and
have a job completion time when done.
2021-08-03 21:52:24 +09:00
Bill Currie fe998f41b4 [qfvis] Convert leaf vis to cluster vis
Now that only 3852 clusters need to be checked for each cluster, fat-pvs
construction for ad_tears completes in about 0.7s, most of which seems
to be loading, conversion, compression and writing. O(N^3) cuts both
ways (hurts like crazy when N increases, does wonders when N decreases,
especially by a factor of 25). And then throw in improved cache
performance...

I suspect having an off-line compiler is still useful, but even if
qfvis's implementation never actually gets used, if cluster
reconstruction is put in the engine, large maps will be feasible even
for quakeworld. Just the reduced memory requirements alone will be a
huge benefit (~3GB down to 1.8MB).
2021-08-03 15:48:45 +09:00
Bill Currie 8da019e31c [qfvis] Reconstruct the leaf clusters in a bsp
This is only the first half (vertical) in that the vis bits are still
for the leafs rather than the clusters, but ad_tears goes from 500s to
7s for calculating the fat pvs (3852 clusters).
2021-08-03 11:37:24 +09:00
Bill Currie 421047328a [qfvis] Catch a missed winding mark stat 2021-08-02 23:17:55 +09:00
Bill Currie ec54c54226 [build] Fix some windows bitrot 2021-08-02 14:02:41 +09:00
Bill Currie f514345d77 [qfbsp] Show correct object counts for bsp29 files
Yes, this was the goal of that size_t change, but it made sense anyway.
2021-08-01 22:05:31 +09:00
Bill Currie 674ffa0941 [util] Make bsp_t counts size_t
and other bsp data counts unsigned, and clean up the resulting mess.
2021-08-01 21:54:05 +09:00
Bill Currie 40367e5bca [qfvis] Thread the ambient sounds computation 2021-08-01 18:14:28 +09:00
Bill Currie e671b3f230 [qfvis] Thread the portal vis compaction
The compaction deals with merging all the portal visibility into cluster
visibility, expanding out to leafs, and final compression.
2021-08-01 17:06:13 +09:00
Bill Currie 523ab007d6 [qfvis] Produce more details base-vis stats
And nicely, things add up (after fixing 32-bit overflows :P)
2021-07-30 23:07:12 +09:00
Bill Currie ca8dcf3fa9 [qfvis] Use cluster sphere culling for base vis
While this doesn't give as much of a boost as does basic sphere culling
(since it's just culling sphere tests), it took ad_tears' base vis from
1000s to 720s on my machine.
2021-07-30 18:52:47 +09:00
Bill Currie 9461779ba7 [qfvis] Remove the cluster portals limit
This removes the last of the arbitrary limits from qfvis. The goal is
not so much supporting crazy maps, but more about better data usage
(cluster_t is now 24 (or 16) bytes instead of 1048 (or 528). And
passages isn't used (yet?)...
2021-07-29 21:03:07 +09:00
Bill Currie 756214ca8e [qfvis] Use unsigned for the plane side tests
Doesn't make any difference to the number of instructions, but seeing
sar instead of shr bothers me when working with bit patterns.
2021-07-29 15:25:37 +09:00
Bill Currie 72a1fef714 [qfvis] Use hunk to manage winding memory
It turns out cmem is not so good for many large allocations (probably a
bug in handling the blocks), but was really meant for lots of little
churning allocations anyway. After an analysis of winding lifetimes, it
became clear that the hunk allocator would work very well. The base
windings are allocated from a global hunk (currently 1GB, plenty for
even ad_tears), and ephemeral windings are allocated from a per-thread
hunk of 1MB (seems to be way more than enough: gmsp3v2 uses a maximum of
only 56064 bytes, and ad_tears got through 30% before I gave up on it).
Any speed difference (for gmsp3v2) seems to be lost in the noise: still
completing in 38.4s on my machine.
2021-07-29 11:49:18 +09:00
Bill Currie e39bc83a6a [qfvis] Optionally use utf8 to encode run lengths
Adds 50 bytes to marcher's fat-pvs, but removes about 4.7MB from
ad_tear's fat-pvs.
2021-07-27 23:29:14 +09:00
Bill Currie b9d2882e02 [qfvis] Write out the fat-pvs file
The output fat-pvs data is the *difference* between the base pvs and fat
pvs. This currently makes for about 64kB savings for marcher.bsp, and
about 233MB savings for ad_tears.bsp (or about 50% (470.7MB->237.1MB)).
I expect using utf-8 encoding for the run lengths to make for even
bigger savings (the second output fat-pvs leaf of marcher.bsp is all 0s,
or 6 bytes in the file, which would reduce to 3 bytes using utf-8).
2021-07-27 20:04:19 +09:00
Bill Currie 49c3dacbbc [util] Rename set_size to set_count
After seeing set_size and thinking it redundant (thought it returned the
capacity of the set until I checked), I realized set_count would be a
much better name (set_count (node->successors) in qfcc does make much
more sense).
2021-07-27 11:52:21 +09:00
Bill Currie 946867c82e [qfvis] Start work on an off-line fat pvs compiler
Extremely large maps take a very long time to process their PVS sets for
PHS or shadows, so having an off-line compiler seems like a good idea.
The data isn't written out yet, and the fat pvs code may not be optimal
for cache access, but it gets through ad_tears in about 500s (12
threads, compared to 2100s single-threaded in the qw server).
2021-07-26 22:42:03 +09:00
Bill Currie 60d23bdc8f [qfbsp] Remove all arbitrary bsp limits
Planes, verts, etc can now all get crazy big.
2021-07-26 13:10:06 +09:00
Bill Currie 13e1682f5e [qfbsp] Add an option to dump info about a bsp file
Just the header plus some basics of model info.
2021-07-25 12:14:04 +09:00
Bill Currie 342ba65f57 [qfcc] Handle aliased field types
Fixes use of structs as entity fields. The test is currently
compile-only.
2021-07-24 18:09:54 +09:00
Bill Currie 8369a2206a [glstub] Add functions needed to get glsl working
Pity vulkan won't be so easy.
2021-07-22 10:12:41 +09:00
Bill Currie 6b38a17cf1 [gamecode] Clean up state imlementations
This makes the code easier to read. Also, yay for automated tests:
caught a mistyped time :)
2021-07-15 16:55:02 +09:00
Bill Currie 0a847f92f1 [util] Use mmap/munmap for cmem internal alloc/free
This reduces the overhead needed to manage the memory blocks as the
blocks are guaranteed to be page-aligned. Also, the superblock is now
alllocated from within one of the memory blocks it manages. While this
does slightly reduce the available cachelines within the first block (by
one or two depending on 32 vs 64 bit pointers), it removes the need for
an extra memory allocation (probably via malloc) for the superblock.
2021-07-12 16:33:47 +09:00
Bill Currie 6db6f8f0e2 [win] Fix a pile of bitrot
Man, those bits rot quickly. Must be stored with a rotfish.
2021-07-11 13:30:52 +09:00