Commit Graph

11474 Commits

Author SHA1 Message Date
Bill Currie d36a75e3de [qwaq] Fix incorrect screen refresh
Or, at least, I think it's incorrect, since stdscr (which was being
refreshed) should not be used when using panels.
2021-06-07 15:56:57 +09:00
Bill Currie 5e8376340d [qwaq] Add method to get group's owning view 2021-06-07 15:56:20 +09:00
Bill Currie 3d42f986c3 [qwaq] Add wrapper for wmove 2021-06-07 15:53:35 +09:00
Bill Currie 204578772d [gl] Move clearing to screen's render frame
This allows 2d-only to be cleared properly.
2021-06-04 16:32:42 +09:00
Bill Currie 88c9517629 [qfprogs] Dump class ivars when dumping modules 2021-06-04 14:59:15 +09:00
Bill Currie f50d27ec11 [qwaq] Show dereferenced data for poitner defs
The code currently assumes a single value is referenced rather than the
beginning of an array.
2021-06-04 13:35:53 +09:00
Bill Currie 22b9bb29f6 [qwaq] Calculate type sizes for compound types 2021-06-04 13:34:15 +09:00
Bill Currie 7275d9bbf5 [qwaq] Fully load target types into debugger
Fully loading the types means that code using the target's type
definitions does not need to worry about pulling in sub-types for
structured data.
2021-06-04 13:31:43 +09:00
Bill Currie 5e29cecf44 [ruamoko] Add pr_type_size array to types.[rh] 2021-06-04 13:29:27 +09:00
Bill Currie 53b553e892 [qwaq] Rework def views to support multi-row defs
Needed for structured types (arrays, structs, etc). The multiple rows
aren't implemented yet, but the initial groundwork is done.
2021-06-01 23:52:04 +09:00
Bill Currie dc5ebd5c3d [ruamoko] Actually hook up the stdlib builtins 2021-06-01 23:44:51 +09:00
Bill Currie 713862c511 [util] Fix format issue in set test
I guess I hadn't done a "make check" on 64-bit since getting windows
builds to work.
2021-06-01 19:11:51 +09:00
Bill Currie 897f8ebfbe [vulkan] Fix vkgen linking
I had missed the edit while getting qf to build on my eeepc due to not
having vulkan.
2021-06-01 19:10:01 +09:00
Bill Currie 758a44a946 [vulkan] Fix an uninitialized variable warning
semi-bogus, but I prefer false positives to false negatives.
2021-06-01 19:09:03 +09:00
Bill Currie 5ca792c40e [ruamoko] Add some stdlib function wrappers
For now, just bsearch (normal and fuzzy), qsort, and prefixsum (not in
C's stdlib that I know of, but I think having native implementations of
float and int prefix sums will be useful.
2021-06-01 18:53:53 +09:00
Bill Currie d98c92a5c4 [qwaq] Start work on cursor management
For now, the cursor is always hidden, but the plan is to have it visible
in only the focused view if that view has enabled the cursor.
2021-06-01 18:53:53 +09:00
Bill Currie bcc5686606 [util] Add fuzzy and reentrant bsearch
Fuzzy bsearch is useful for finding an entry in a prefix sum array
(value is >= ele[0], < ele[1]), and the reentrant version is good when
data needs to be passed to the compare function. Adapted from the code
used in pr_resolve.
2021-06-01 18:53:53 +09:00
Bill Currie 00fb0972a8 [qwaq] Fix some incorrect parameter acesses
They weren't wrong as such (the data was being accessed correctly
anyway, just not ideal as the parameter access was slightly hidden.
2021-06-01 18:53:53 +09:00
Bill Currie 73cffe283a [qwaq] Ensure qwaq_event_t's when is aligned
While qfcc will always align double values to 8 bytes (really, two
global words) regardless of the underlying hardware, gcc does not:
doubles are only 4-byte aligned on 32-bit hardware.

This fixes the invalid debug target handle when running on i686.
2021-06-01 18:53:53 +09:00
Bill Currie 0293167bd2 [util] Get simd tests working for emulated simd
A bit of a mess for optimized vs unoptimized, but the tests acknowledge
the differences in precision while checking that the code produces the
right results allowing for that precision.
2021-06-01 18:53:53 +09:00
Bill Currie ef9b04ba83 [util] Get tests working with sse2
It seems that i686 code generation is all over the place reguarding sse2
vs fp, with the resulting differences in carried precision. I'm not sure
I'm happy with the situation, but at least it's being tested to a
certain extent. Not sure if this broke basic (no sse) i686 tests.
2021-06-01 18:53:53 +09:00
Bill Currie c5f2aca07d [vulkan] Conditionalize vulkan tests 2021-06-01 18:53:53 +09:00
Bill Currie 85087177bf [vulkan] Conditionalize build of vkgen
vkgen cannot be built if vulkan headers are unavailable.
2021-06-01 18:53:53 +09:00
Bill Currie 778c07e91f [util] Get vectors working for non-SSE archs
GCC does a fairly nice job of producing code for vector types when the
hardware doesn't support SIMD, but it seems to break certain math
optimization rules due to excess precision (?). Still, it works well
enough for the core engine, but may not be well suited to the tools.
However, so far, only qfvis uses vector types (and it's not tested yet),
and tools should probably be used on suitable machines anyway (not
forces, of course).
2021-06-01 18:53:53 +09:00
Bill Currie a461c09586 [util] Make cmem consistent on 32 and 64 bit systems
I don't know that the cache line size is 64 bytes on 32 bit systems, but
it should be ok to assume that 64-byte alignment behaves well on systems
with smaller cache lines so long as they are powers of two. This does
mean there is some waste on 32-bit systems, but it should be fairly
minimal (32 bytes per memblock, which manages page sized regions).
2021-06-01 18:53:52 +09:00
Bill Currie 0a6cb3ad53 [vulkan] Don't build vkgen when vulkan is unavailable 2021-06-01 18:53:52 +09:00
Bill Currie 9dca47c0e1 Make the set tests word size agnostic. 2021-06-01 18:53:52 +09:00
Bill Currie 1cf40be484 [vulkan] Create shadow maps and basic data
I will definitely need to look into sparse images later (2.3GB for
marcher) but the shadow map images, views and matrices are created.
2021-04-29 20:54:38 +09:00
Bill Currie 562f3c2fe2 [vulkan] Add tan and cos perspective projection
The tan and cos versions allow specifying the fov directly from the tan
or cos of the half angle, useful for dealing with lights.
2021-04-29 19:27:01 +09:00
Bill Currie cb7d2671d8 [simd] Make mmulf safe for src=dst
I guess I'd forgotten that the parameters are actually pointers.
2021-04-29 19:25:31 +09:00
Bill Currie c86f0c9449 [vulkan] Move projection matrix code to its own file
And move more stuff over to simd.
2021-04-25 15:48:21 +09:00
Bill Currie 8b6136e6f5 [mathlib] Add Blend macro
The Blend macro supports any non-integral type supporting * and +
(float, double, vec4f_t, etc), so it is essentially a scalar VectorBlend
or QuatBlend.
2021-04-25 15:02:30 +09:00
Bill Currie e6bc5e3e11 [simd] Add qexpf function 2021-04-25 15:02:08 +09:00
Bill Currie 590f0f18bc [vulkan] Check leaf sky visibility for suns
And fix some out-by-one errors for leaf visibility (pvs index 0 is
actually leaf index 1)
2021-04-25 12:27:07 +09:00
Bill Currie d5454faeb7 [gamecode] Set legacy progs def sizes from type
Legacy progs do not have the extended defs data (and usually won't have
anything more complicated than a vector), so use the basic type size for
the def size. Fixes broken edict prints.
2021-04-25 12:27:07 +09:00
Bill Currie ae231319ea [vulkan] Implement all the extended light models
Standard quake has just linear, but the modding community added inverse,
inverse-square (raw and offset (1/(r^2+1)), infinite (sun), and
ambient (minlight). Other than the lack of shadows, marcher now looks
really good.
2021-04-25 12:27:07 +09:00
Bill Currie 52168da93e [vulkan] Don't lose other sky cube faces
Because LoadImage uses Hunk_TempAlloc, the face images need to be copied
individually. Really, what's neeeded is to be able to load the image
data into a pre-allocated buffer (ideally, the staging buffer for
vulkan, but that's for later).
2021-04-25 08:38:48 +09:00
Bill Currie 40aa629ef8 [image] Add function to get image memory size 2021-04-25 08:38:13 +09:00
Bill Currie 785be9d340 [vulkan] Clean up buffer barriers a bit
This even fixes a couple of minor issues that snuck past validation.
2021-04-24 15:47:31 +09:00
Bill Currie dc9b64fadd [vulkan] Clean up image barriers a bit
Mostly, this gets the stage flags in with the barrier, but also adds a
couple more barrier templates. It should make for slightly less verbose
code, and one less opportunity for error (mismatched barrier/stages).
2021-04-24 12:42:29 +09:00
Bill Currie 8c03ed8be5 [vulkan] Start work on shadows
This gets the shaders needed for creating shadow maps, and the changes
to the lighting pipeline for binding the shadow maps, but no generation
or reading is done yet. It feels like parts of various systems are
getting a little big for their britches and I need to do an audit of
various things.
2021-04-24 10:40:39 +09:00
Bill Currie c29e9828b6 [vulkan] Clean up misuse of va for vulkan handles
The built up "path" name of the handle resource was not always surviving
the intervening call to cexpr_eval_string (in particular, when other
handles were created in the process of creating a handle). Rather than
simply increase the number of va buffers (where would it end?), just
regenerate the path when adding the new handle. It's probably quick
enough, and the code is not usually not on a critical path.
2021-04-22 19:47:42 +09:00
Bill Currie 140425be33 [vulkan] Name some more objects
Shaders and descriptor set layouts.
2021-04-19 18:07:45 +09:00
Bill Currie 2918410b30 [vulkan] Fix a couple of minor issues
Magic number for compose descriptors and mistaken masking of vulkan
plist parse errors.
2021-04-19 18:07:45 +09:00
Bill Currie 52bfb0aeb0 [vulkan] Label the drawing command buffers 2021-04-19 18:07:45 +09:00
Bill Currie da39bb2df3 [vulkan] Use more correct dependency flags
I was reading about multi-pass rendering on mobile devices
(https://developer.oculus.com/blog/loads-stores-passes-and-advanced-gpu-pipelines/)
and discovered that I had used the wrong flags (but then, I think Graham
Sellers had, too, since used his Vulkan Programming Guide as a
reference). Doesn't seem to make any difference on desktop, but as
there's no loss there, but potential gains on mobile, I'd say it's a
win.
2021-04-18 18:56:31 +09:00
Bill Currie 1e9329ccf6 [nq,qw] Stop wring to config.cfg
QF now uses its own configuration file (quakeforge.cfg for now) rather
than overwriting config.cfg so that people trying out QF in their normal
quake installs don't trash their config.cfg for other quake clients. If
quakeforge.cfg is present, all other config files are ignored except
that quake.rc is scanned for a startdemos command and that is executed.
2021-04-12 22:09:09 +09:00
Bill Currie 87eccb9e6f [nq] Ensure stuffcmd is done for cl_quakerc 0
This was done years ago for qw, but missed for nq.
2021-04-11 20:09:03 +09:00
Bill Currie 9fb337fac4 [net] Move found host caching into net_main
This unifies all the checks and plugs a set of potential buffer
overflows.
2021-04-04 18:38:14 +09:00
Bill Currie a630c95eb6 [nat] Remove the datagram test commands
They seem to be related to the server list protocol, probably from its
development, but no longer needed.
2021-04-04 18:31:57 +09:00