Commit graph

2710 commits

Author SHA1 Message Date
Bill Currie
ad9e85b8d4 [ui] Access the canvas visibility flag safely
That wasn't so well thought out as adding fields before the flag made
for some rather interesting behavior.
2023-07-09 11:49:05 +09:00
Bill Currie
bf05da26cc [ui] Make Canvas_SetLen operate on only one canvas
I plan on using sub-canvases to fix the imui window overlap issue and
don't want the windows being affected by (eg) hud canvas size changes.
2023-07-08 20:56:40 +09:00
Bill Currie
c32ffce886 [ecs] Add a function to move a subpool to be the last
This has use when the order of components in the pool affects draw order
(or has other significance), especially at the subpool level. I plan to
use it for fixing overlapping windows in imui.
2023-07-08 19:55:37 +09:00
Bill Currie
79ab2f7ba7 [ui] Add a shaped text cache system
Shaped text is cached using all the shaping parameters as well as the
text itself as a key. This makes text shaping a non-issue for imui when
the text is stable, taking my simple test from 120fps to 1000fps
(optimized build).
2023-07-08 11:15:51 +09:00
Bill Currie
0360e33a00 [ecs] Add "tree mode" to hierarchies
As I had long suspected, building large hierarchies is fiendishly
expensive (at least O(N^2)). However, this is because the hierarchies
are structured such that adding high-level nodes results in a lot of
copying due to the flattened (breadth-first) layout (which does make for
excellent breadth-first performance when working with a hierarchy).

Using tree mode allows adding new nodes to be O(1) (I guess O(N) for the
size of the sub-tree being added, but that's not supported yet) and
costs only an additional 8 bytes per node. Switching from flat mode to
tree mode is very cheap as only the additional tree-related indices need
to be fixed up (they're almost entirely ignored in flat mode). Switching
from tree to flat mode is a little more expensive as the entire tree
needs to be copied, but it seems to be an O(N) (size of the tree).

With this, building the style editor window went from about 25% to about
5% (and most of that is realloc!), with a 1.3% cost for switching from
tree mode to flat mode.

There's still a lot of work to do (supporting removal and tree inserts).
2023-07-07 14:42:49 +09:00
Bill Currie
d4b11923b9 [ui] Add inactive labels and a style api
Labels are always good and the style api allows pushing/popping and
modifying the current style.
2023-07-06 19:34:48 +09:00
Bill Currie
08cd03e632 [ui] Allow the parent layout rules to be modified
This makes it easy to control whether a window is a fixed size or fits
its children (or any other scheme, though those are the two most
likely).
2023-07-06 19:24:23 +09:00
Bill Currie
df40a50b91 [ui] Implement dragable collapsible windows
And of course, closable.
2023-07-06 12:21:14 +09:00
Bill Currie
a6e75b7617 [ui] Add a very basic style system
Nothing can be changed at the moment, but it actually looks a little
like a UI.
2023-07-06 01:27:46 +09:00
Bill Currie
b34d3cae91 [ui] Rename the imui size control enumerators
I didn't particularly like the "kind" in the name. I'm not super happy
with percent, but it will do for now.
2023-07-06 00:15:34 +09:00
Bill Currie
0fab830be6 [ui] Implement auto-expand layout
By default, horizontal and vertical layouts expand to fill their parent
in their on-axis direction (horizontally for horizontal layouts), but
fit to their child views in their off-axis.

Flexible space views take advantage of auto-expansion, pushing sibling
views such that the grandparent view is filled on the parent view's
on-axis, and the parent view is filled by the space in the parent view's
off-axis. Flexible views currently have a background fill, allowing them
to provide background filling of the overall view with minimal overdraw
(ancestor views don't need to have any fill at all).
2023-07-05 19:33:00 +09:00
Bill Currie
104fba13a6 [ui] Add a text color component
Despite the current rendering API taking only byte color, the component
holds a uint32_t to allow for rgba color when I figure out a suitable
API.
2023-07-04 17:17:16 +09:00
Bill Currie
6701f921a4 [ecs] Add a function to safely get a component
It returns null if the entity is invalid or doesn't have the component.
Useful when the component is optional.
2023-07-04 16:48:15 +09:00
Bill Currie
5000004f7d [util] Integrate sys_mem into the build
Nicely, all that was needed was a couple of includes and renaming the
functions.
2023-07-04 14:39:36 +09:00
Bill Currie
403cf72f52 [ui] Implement a layout stack and radio buttons
Also, remove an intermittent double free caused by deleting views that
have already been deleted.
2023-07-04 01:31:04 +09:00
Bill Currie
6fa016e23b [vulkan] Delay main render resizes by 2s
This makes window resizing a little more responsive (though it could be
better yet (maybe, could be an X11 limitation)).
2023-07-03 23:38:57 +09:00
Bill Currie
e37b477739 [ui] Implement checkbox
Simplistic, but it works. Also cleaned up some of the repetitive code.
2023-07-03 23:33:15 +09:00
Bill Currie
cd4791c5d3 [vulkan] Get window resize working again
The biggest change was splitting up the job resources into
per-render-pass resources, allowing individual render passes to
reallocate their resources without affecting any others. After that, it
was just getting translucency and capture working after a window resize.
2023-07-03 20:05:27 +09:00
Bill Currie
45e09673c7 [vulkan] Increase (and unify) va context count
The increase wasn't really necessary, but I noticed that windows was
still at 4... not so good.
2023-07-03 19:53:53 +09:00
Bill Currie
6d823cca84 [ui] Rebuild the hierarchy every frame
This takes care of element order stability. It did need reworking the
mouse tracking code (including adding an active flag to views), but now
buttons seem to work correctly.
2023-07-03 03:52:07 +09:00
Bill Currie
0b6e8b60bd [ecs] Add a component rotation function
This allows rotation of components within the array. I'm not sure if
it's what I want, but it was an interesting exercise anyway.
2023-07-03 01:40:26 +09:00
Bill Currie
1caa9ed8c3 [build] Ensure generated progs headers get installed 2023-07-02 17:23:44 +09:00
Bill Currie
e98cd1355d [ui] Implement auto-layout
TextContent seems redundant at this stage since a text view is always
sized to its content, and PercentOfParent doesn't work yet. Pixels
definitely works and Null seems to work in that it does no sizing or
positioning. Vertical layout is supported but not yet tested, similar
for ChildrenSum, but I can have two buttons side by side.
2023-07-02 15:04:22 +09:00
Bill Currie
ed5ef3a5fb [ui] Implement event handling in imui
Button presses work nicely thanks to both Casey Muratori and Darian (for
clearing up some of Casey's comments about `hot`).
2023-07-02 01:25:27 +09:00
Bill Currie
e89b5a88fa [input] Add a shift enum element for numlock
I don't know why I missed this one.
2023-07-02 01:23:28 +09:00
Bill Currie
5099633bc8 [console] Start work on a debug UI
It does almost nothing (just puts a non-function button on the screen),
but it will help develop the IMUI code and, of course, come to help with
debugging in general.
2023-07-01 20:00:26 +09:00
Bill Currie
0257165b7d [ui] Add the beginnings of an immediate mode UI
Based on the articles on Hidden Grove
(https://www.rfleury.com/archive?sort=new). So far, I can get a
non-functional button on the screen :)
2023-07-01 19:55:19 +09:00
Bill Currie
4eef11c329 [ui] Add visibility control to canvases 2023-07-01 19:53:26 +09:00
Bill Currie
c1cd81222d [ui] Add font text drawing to canvas
Both passage and simple text are supported, but only simple text has
been tested at this stage. However, as passage text was taken directly
from rua_gui.c and formed the basis for simple text rendering, I expect
it's at least close to working.
2023-07-01 19:49:49 +09:00
Bill Currie
32346b6123 [ui] Add support for simple text strings
The same underlying mechanism is used for both simple text strings and
passages, but without the intervening hierarchy of paragraphs etc.
Results in only the one view for a simple text string.
2023-07-01 19:42:02 +09:00
Bill Currie
5fcc743d1a [ui] Use fontconfig to find system fonts
I'm not sure I like fontconfig (docs are...), but it is pretty standard,
and I was able to find some reasonable examples on stackexchange
(https://stackoverflow.com/questions/10542832/how-to-use-fontconfig-to-get-font-list-c-c).
Currently, only the one font is handled, no font sets for fall backs
etc. It's meant for the debug UI I'm working on, so that shouldn't be a
big deal.
2023-07-01 19:15:22 +09:00
Bill Currie
31151ec5d5 [ui] Rename Text_View to Text_PassageView
It works with passages but I want to be able to create simple text views
from strings, so Text_View was kind of polluting the namespace.
2023-07-01 14:40:20 +09:00
Bill Currie
0b0271ee76 [console] Provide control of cursor visibility
It's usually desirable to hide the cursor when playing quake, but when
using the console, or in various other states, being able to see the
cursor can be quite important.
2023-06-30 14:57:04 +09:00
Bill Currie
759e67bb7c [x11] Implement mouse visibility control
That was nicely easy.
2023-06-30 14:53:47 +09:00
Bill Currie
ec0c6ad906 [vid] Add an api function to control mouse visibility
It's currently very simplistic (visible, not visible), but it gets
things started for making QF more usable in a windowed environment (not
having a visible cursor was fine in DOS, or when full screen, but not
when windowed (and not actively playing).
2023-06-30 14:50:47 +09:00
Bill Currie
2b2398b193 [bspfile] Correct some typos in the documentation 2023-06-29 11:31:24 +09:00
Bill Currie
2a9e700c92 [sw] Separate draw frames from render frames
This is necessary because fisheye rendering draws the scene up to 6
times per frame, which results in many of the limits being hit
prematurely, but updating r_framecount that often breaks dynamic lights.
2023-06-29 01:26:54 +09:00
Bill Currie
585f1161db [renderer] Clean up R_MarkLeaves
Really? More to clean up before (vulkan) bsp rendering is thread-safe?
However, R_MarkLeaves was pretty close: just oldviewleaf and
visframecount, but that's still too much. Also, the reliance on
r_refdef.worldmodel irked me.
2023-06-29 00:49:14 +09:00
Bill Currie
ecb9a15946 [model] Clean up the brush leaf api a little
Those functions now all take mod_brush_t since they don't work with any
other type of model.
2023-06-28 21:45:41 +09:00
Bill Currie
3bdc4adb4c [vulkan] Use per-pass entity queues
While there will be some GPU resources to sort out for multi-pass bsp
processing, I think this is the last piece required before shadow passes
can be implemented.
2023-06-28 17:57:41 +09:00
Bill Currie
85128a3e86 [vulkan] Rework lighting to use splats
It's currently slower, and the cone splats are buggy, but the lighting
code itself got some nice cleanups.
2023-06-28 01:01:56 +09:00
Bill Currie
614ca744ab [vulkan] Support multi-layer OIT rendering
This fixes fisheye rendering. I'm not too happy with always allocating
the cube OIT heads buffer, but that's for another day.
2023-06-26 18:00:46 +09:00
Bill Currie
8f1de6865f [vulkan] Get fisheye working except for translucency
The OIT heads buffer is only a single-layer image, which breaks cube
map rendering, but once this is sorted, it looks like fisheye will work
well.
2023-06-26 14:03:19 +09:00
Bill Currie
25dfa75505 [vulkan] Support disabling pipelines
This is useful for selecting post-processing pipelines at run-time.
2023-06-26 11:54:28 +09:00
Bill Currie
0a50fb1bf1 [cexpr] Add support for the bool type
It's currently rather limited, but enough to make use of it in vkgen and
vkparse.
2023-06-26 10:59:16 +09:00
Bill Currie
17ee6911f9 [vulkan] Clean up the sampler config loading
Samplers have no direct relation to render passes or pipelines, so
should not necessarily be in the same config file. This makes all the
old config files obsolete, and quite a bit of support code in vkparse.c.
2023-06-25 23:41:21 +09:00
Bill Currie
f2d2db9ef3 [vulkan] Integrate screen capture in the new system
This gets screenshots working again. As the implementation is now a
(trivial) state machine, the pause when grabbing a screenshot is
significantly reduced (it can be reduced even further by doing the png
compression in a separate thread).
2023-06-25 23:41:21 +09:00
Bill Currie
eb176c37e2 [vulkan] Get brush models rendering again
The new system seems to work quite nicely with brush models, which was
the intent, but it's nice to see. Hopefully, it works well when it comes
to shadows. There's still water warp and screen shots to fix, and
fisheye to get working, as well.
2023-06-25 00:22:03 +09:00
Bill Currie
65a63e7423 [vulkan] Fix a silly typo
Sprites seem to be rather slow to draw, so "sprint" makes even less
sense.
2023-06-25 00:20:19 +09:00
Bill Currie
b9bb841744 [vulkan] Use the descriptor set manager
This cleans up a lot of ugly code that I always thought was rather dumb.
2023-06-24 21:42:46 +09:00
Bill Currie
8470ae5a28 [vulkan] Create a descriptor set manager
The manager allows recycling of descriptor sets and takes care of
creating pools as needed.
2023-06-24 17:23:34 +09:00
Bill Currie
92368eafb2 [vulkan] Clean out old pipeline and layout refs
It's not perfect as some subsystems still create resources from the old
system (necessarily), but this cleans up a lot of the mess.
2023-06-24 11:53:00 +09:00
Bill Currie
5140346c22 [vulkan] Nuke the old render pass code from orbit
Gotta be sure :)

With the new system mostly up and running (just bsp rendering and
descriptor sets/layout handling to go, and they're independent of the
old render pass system), the old system can finally be cleared out.
2023-06-24 10:42:27 +09:00
Bill Currie
41d69586d2 [vulkan] Get particles mostly working in the new system
The particles die instantly due to curFrame not updating (next commit),
but otherwise work nicely, especially sync is better (many thanks to
Darian for his help with understanding sync scope).
2023-06-24 03:26:22 +09:00
Bill Currie
87356a5211 [vulkan] Hook up sprite rendering in the new system
That one went smoothly for a change.
2023-06-23 20:37:06 +09:00
Bill Currie
e4df35ac48 [vulkan] Move scr_funcs handling into vulkan_draw
This was necessary to get the 2d elements drawn after the fence had been
fired (thus indicating descriptors could be updated) but before actual
rendering of the 2d elements (which is how it was done before the switch
to the new system).
2023-06-23 18:07:40 +09:00
Bill Currie
0ec2aa2bf7 [vulkan] Get iqm rendering working again
It turns out there was a bug in the old iqm push constants spec (I still
need to figure out how to use layouts in the new system so I can
completely delete the old).
2023-06-23 09:38:41 +09:00
Bill Currie
a186df90f3 [vulkan] Connect the main and output render steps
The output system's update_input takes a parameter specifying the render
step from which it is to get the output view of that step and updates
its descriptors as necessary.

With this, the full render job is working for alias models (minus a few
glitches).
2023-06-23 02:30:58 +09:00
Bill Currie
7eb14b0a32 [vulkan] Get the compose subpass working
That seems to be the main render pass working. Next is to get the output
render pass to use the main render pass's output.
2023-06-23 02:30:58 +09:00
Bill Currie
942b503486 [vulkan] Get lighting mostly working
Lights seem to be good in renderdoc, but still need to get the compose
subpass working.
2023-06-23 02:30:58 +09:00
Bill Currie
d2e85f775d [vulkan] Get alias model rendering mostly working
Mostly because no lighting or compositing to the output buffer is done,
but the model is there in renderdoc's image viewer.
2023-06-23 02:30:58 +09:00
Bill Currie
854b612597 [vulkan] Name the managed command buffer pool
Not that it mattered in the end, but it helps with debugging (found the
bug while doing the edits).
2023-06-22 20:06:46 +09:00
Bill Currie
12f1b31701 [vulkan] Use a command buffer pool manager
Many thanks to Peter and Darian for clearing up my misunderstanding of
how vkResetCommandPool works. The manager creates command buffers from
the command pool on an as-needed basis (when the queue of available
buffers is empty), and keeps track of those buffers in a queue. When the
pool is reset, the queues (one each for primary and secondary command
buffers) are reset such that the tracked buffers are available again.
2023-06-22 20:05:36 +09:00
Bill Currie
bba82d3da1 [vulkan] Move frames from vulkan_ctx to renderctx
Part of the command buffer fix, but also a step towards cleaning up
vulkan_ctx.
2023-06-22 16:47:15 +09:00
Bill Currie
6deeed1829 [vulkan] Get the output step working for draw
It leaks command buffers (due to a misunderstanding of
vkResetCommandPool), but it seems 2d draw (sliced quads) is working
nicely.
2023-06-22 11:17:03 +09:00
Bill Currie
3de39f5408 [vulkan] Destroy frame buffers on shutdown
With this, the new render system, though not doing anything useful, at
least passes validation.
2023-06-22 11:17:03 +09:00
Bill Currie
25cfef18d6 [vulkan] Use per-swapchain images for output framebuffers
Imageless framebuffers would probably be easier and cleaner, but this
takes care of the validation error attempting to present the second
frame (because rendering was being done to the first frame's swapchain
image instead of the second frame's).
2023-06-21 14:47:19 +09:00
Bill Currie
503013dd38 [vulkan] Use per-frame command buffer pools
Command buffer pools can't be reset until the commands have all been
executed. Having per-frame pools makes keeping track of pool lifetime
fairly easy.
2023-06-21 13:46:29 +09:00
Bill Currie
7da8399220 [vulkan] Pass validation for the first frame
The new render system now passes validation for the first frame (but
no drawing is done by the various subsystems yet). Something is wrong
with how swap chain semaphores are handled thus the second frame fails.

Frame buffer attachments can now be defined externally, with
"$swapchain" supported for now (in which case, the swap chain defines
the size of the frame buffer).

Also, render pass render areas and pipeline viewport and scissor rects
are updated when necessary.
2023-06-20 15:18:58 +09:00
Bill Currie
2cadf040d3 [vulkan] Add a step and task to create a framebuffer
I don't like the current name (update_framebuffer), but if the
referenced render pass doesn't have a framebuffer, one is created. The
renderpass is referenced via the active renderpass of the named render
step. Unfortunately, this has uncovered a bug in the setup of renderpass
objects: main.deferred has output's renderpass, and main.deferred_cube
and output have bogus renderpass objects.
2023-06-18 18:42:07 +09:00
Bill Currie
8e25fb13d1 [cexpr] Add string and voidptr types
The string type is useful for passing around strings (the only thing
that they can do, currently), particularly as arguments to functions.
The voidptr type is (currently) never generated by the core cexpr
system, but is useful for storing pointers via cexpr (probably a bit of
a hack, but it seems to work well in my current use).
2023-06-18 17:20:38 +09:00
Bill Currie
d8239bf9e2 [qtypes] Support auto in pre-c23 compilers
I'm not yet ready to do a full-on transition to gcc-13 with -std=gnu2x,
but I'm tired of __auto_type's ugliness.
2023-06-18 17:16:58 +09:00
Bill Currie
3235bb70c8 [vulkan] Move attachement specs into frambuffer
This does a better job of keeping related data together.
2023-06-17 12:13:38 +09:00
Bill Currie
14b24e5b75 [vulkan] Clean up job allocation size calculation
It does the same thing, but it's just nicer to read (thanks for the
idea, HomelikeBrick42).
2023-06-16 23:15:31 +09:00
Bill Currie
274e821c06 [vulkan] Pass the current command buffer to tasks
Compute and render tasks need to be able to submit commands.
2023-06-16 22:34:08 +09:00
Bill Currie
b0d1c0e75b [vulkan] Make push constant ranges structured
Being able to specify the types in the push constant ranges makes it a
lot easier to get the specification correct. I never did like having to
do the offsets and sizes by hand as it was quite error prone. Right now,
float, int, uint, vec3, vec4 and mat4 are supported, and adheres to
layout std430.
2023-06-16 19:05:53 +09:00
Bill Currie
3c65f1494b [vulkan] Get some subsystems passing validation
This is with the new render job scheme. I very much doubt it actually
works (can't start testing until everything passes, and it's disabled
for the moment (define in vid_render_vulkan.c)), but it's helping iron
out what more is needed in the render system.
2023-06-15 15:17:39 +09:00
Bill Currie
97f9fd81d6 [vulkan] Switch around renderpass and subpass names
The old structs will go away eventually, and I'm tired of seeing that _
tail.
2023-06-15 13:13:52 +09:00
Bill Currie
8ff60b4603 [simd] Add unsigned vector types
Mostly as a convenience for working with very small arrays of unsigned
ints.
2023-06-15 09:36:50 +09:00
Bill Currie
dbd3d6502a Nuke qboolean from orbit
I never liked it, but with C2x coming out, it's best to handle bools
properly. I haven't gone through all the uses of int as bool (I'll leave
that for fixing when I encounter them), but this gets QF working with
both c2x (really, gnu2x because of raw strings).
2023-06-13 18:06:11 +09:00
Bill Currie
9871b44d68 [build] Fix a warning in attribute const check
The warning flag check worked too well: it enabled the warning and
autoconf's default main wanted the const attribute. The bug has been
floating around for a while, it seems.
2023-06-13 13:08:38 +09:00
Bill Currie
d5156a2320 [set] Add an edge detection iterator
set_while checks the iterator's current element membership and skips to
the first element with different membership. ie, if the current element
is in the set, then set_while returns the next element *not* in the set,
but if the current is not in the set, then set_while returns the next
element that *is* in the set. Rather handy for dealing with clusters of
set elements.
2023-05-26 21:46:34 +09:00
Bill Currie
89e60bd521 [set] Add functions to add and remove ranges
It is often necessary to add or remove whole ranges of elements, but
doing so one at a time can be quite inefficient.
2023-05-26 16:55:07 +09:00
Bill Currie
6d5e8922a5 [qfcc] Add a handle type for engine resources
I never liked the various hacks I had come up with for representing
resource handles in Ruamoko. Structs with an int were awkward to test,
pointers and ints could be modified, etc etc. The new @handle keyword (@
used to keep handle free for use) works just like struct, union and
enum in syntax, but creates an opaque type suitable for a 32-bit handle.
The backing type is a function so v6 progs can use it without (all the
necessary opcodes exist) and no modifications were needed for
type-checking in binary expressions, but only assignment and comparisons
are supported, and (of course) nil. Tested using cbuf_t and QFile: seems
to work as desired.

I had considered 64-bit handles, but really, if more than 4G resource
objects are needed, I'm not sure QF can handle the game. However, that
limit is per resource manager, not total.
2023-05-25 10:41:28 +09:00
Bill Currie
d07bd20552 [gib] Correct the header in gib.h 2023-05-24 21:04:24 +09:00
Bill Currie
eb8fc0fb9a [vulkan] Be clearer about descriptor set layouts vs sets
This get pretty confusing when you refer to both the sets and the set
layouts in close vicinity.
2023-03-29 09:45:17 +09:00
Bill Currie
511389a973 [set] Use correct size for set_bits_t on arm64 2023-03-28 17:10:55 +09:00
Bill Currie
d39f1307c5 [set] Make static init sets compatible with normal
When using SET_STATIC_INIT, the set size needs to be the same as what
set_new() would create for the same number of bits, otherwise the set
will possibly get resized incorrectly (which is bad news when the array
was allocated using alloca). While this is really a symptom of
set_bits_t not getting the right size, getting weird segfaults is not a
good way to diagnose the problem, and set_bits_t being the wrong size is
just a minor pessimism.
2023-03-28 17:01:05 +09:00
Bill Currie
47bfa23d09 [vulkan] Stub out the basic job execution
Really, a bit more than stub as the basic code is there, but nothing
works properly yet due to missing resources (especially descriptor sets
and pools), and the frame buffer creation is still disabled.
2023-03-28 10:28:44 +09:00
Bill Currie
34ece7ad03 [vulkan] Add buffer and buffer view support
Not fully implemented, but the parsing is done. Needed image view refs
to be renamed.
2023-03-28 00:15:04 +09:00
Bill Currie
aba057b827 [vulkan] Correct type of queue family
No idea why I had int32_t instead of uint32_t.
2023-03-27 23:51:32 +09:00
Bill Currie
a1e15603a3 [vulkan] Implement job initialization
The step dependencies are not handled yet as threading isn't used at
this stage, but since I'll require dependencies to always come earlier,
this shouldn't cause a problem.
2023-03-26 18:22:46 +09:00
Bill Currie
ef2793010c [simd] Improve portability for aarch64
No need for compiler flags for 64-bit arm, and the few intrinsics that
are actually needed are in a different header.
2023-03-25 21:21:13 +09:00
Bill Currie
a1c67ea24b [vulkan] Implement most of the new job system
There's still the actual job objects to create, but all the vulkan bits
have been created and get destroyed on shutdown.
2023-03-22 19:32:49 +09:00
Bill Currie
793525a50a [sw] Free alias model cache memory when clearing models
This fixes a Sys_Error when loading the level for the first demo (and
probably many other times). It was mod_numknown getting set to 0 that
triggered the issue, but that seems to be necessary for the other
renderers. I think the whole model loading and caching system needs an
overhaul as this doesn't feel quite right due to removing part of the
advantage of caching the model data.
2023-03-20 17:45:28 +09:00
Bill Currie
654b208641 [plist] Add functions to extend dictionaries and arrays
The idea is to make it easy (and efficient) to merge property list
items.
2023-03-15 19:47:30 +09:00
Bill Currie
7d4c1d79b1 [plist] Use reference counts for items
This makes it much easier to share items between property lists (eg,
targets and the main entity list in cl_light).
2023-03-13 11:26:13 +09:00
Bill Currie
ea77df2daa [plist] Add parsing for bare dictionaries and arrays
Requiring top-level {} or () for (usually) hand-written files is awkward
and even a little error prone, and certainly ugly at times. With this,
loaders that expect a particular format can specify the format a little
more directly.
2023-03-12 14:31:17 +09:00
Bill Currie
4cf1c167bd [vulkan] Start work on a render job system
The jobs will become the core of the renderer, with each job step being
one of a render pass, compute pass, or processor (CPU-only) task. The
steps support dependencies, which will allow for threading the system in
the future.

Currently, just the structures, parse support, and prototype job
specification (render.plist) have been implemented. No conversion to
working data is done yet, and many things, in particular resources, will
need to be reworked, but this gets the basic design in.
2023-03-10 19:47:40 +09:00
Bill Currie
f12b3ea134 [vid] Allow render systems to unload late
This cleans up the tangled mess of attempting to unload the gl driver in
X11: for whatever reason, the display gets tied in to the library.
2023-03-06 21:15:15 +09:00