Commit graph

2056 commits

Author SHA1 Message Date
Bill Currie
1b89598b28 [renderer] Clean up SCR_UpdateScreen a little
SCR_UpdateScreen_Legacy now takes only the screen functions pointer (it
didn't need camera or realtime), and the camera sizzle code has been
moved into one place to make cleaning it up easier (when I get around to
auditing AngleVectors etc).
2023-07-11 11:41:14 +09:00
Bill Currie
7e758327f6 [glsl] Use a unified queue for batched quads
This makes the glsl renderer compatible with canvases, and thus imui. It
also makes for much saner draw call counts.
2023-07-10 19:12:41 +09:00
Bill Currie
4e7bd11415 [build] Clean up make distcheck issues 2023-07-10 11:12:22 +09:00
Bill Currie
8bb5d2e1c9 [vulkan] Plug a memory leak in capture
I probably need to do this for other subsystems as well, but it stood
out when chasing down another memory leak.
2023-07-08 11:15:51 +09:00
Bill Currie
300badc96a Fix a couple of windows build issues
There's still the problem with unused variables when building for
windows because of vulkan debug stuff, but this fixes the important
errors. It actually still works (at least under wine).
2023-07-06 02:04:47 +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
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
4471a40494 [vulkan] Get the forward renderer passing validation
It looks horrible due to the lack of lighting etc, but it's good enough
for basic testing, especially of my render job design (that passed with
flying colors).
2023-07-02 19:58:56 +09:00
Bill Currie
260a10d75c [vulkan] Add a very basic forward rendering pass
It's not fully compliant yet, but it sorta kinda maybe worked on my
pinebook (still slow, but no hardware vulkan :( )
2023-07-02 18:31:22 +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
c834516c3c [vulkan] Drop the id buffer for now
I've decided to just get things working the usual way for now, and I
wasn't too happy about mixing the id writing into irrelevant shaders.
2023-06-30 12:19:46 +09:00
Bill Currie
e2b6e0728e [vulkan] Render object id to a buffer
Currently the instance id is written (with the idea that it can be
mapped back to entity in C). The plan is to use it for mouse picking.
2023-06-30 03:34:16 +09:00
Bill Currie
d45b76313c [vulkan] Use correct type for parsing int32
Using size_t doesn't work too well for -1.
2023-06-30 03:31:52 +09:00
Bill Currie
665d88c353 [vulkan] Default a view's format to that of its image
Just one less thing to duplicate.
2023-06-30 03:03:21 +09:00
Bill Currie
154d1cbfcb [vkgen] Handle int32_t correctly
I'm not sure why parse_basic doesn't work for int, but I'm not too
worried about it right now.
2023-06-30 03:00:15 +09:00
Bill Currie
4adb7dfbd1 [vkgen] Support custom parsers for .parse blocks
This let me keep clearValue's simple default rgba float interpretation,
but also have full control over access to the float32, int32 and uint32
fields.
2023-06-29 18:41:18 +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
d7e312ab8b [vulkan] Don't sort brush model entities
I really don't remember why I sorted them (perhaps to ease debugging),
but it's an unnecessary cost.
2023-06-28 18:08:43 +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
afa84afc79 [vulkan] Abandon light splats
They were an interesting idea and might be useful in the future, but
they don't work as well as I had hoped for quake's maps due to the
overlapping light volumes causing contention while doing the additive
blends in the frame buffer. The cause was made obvious when testing in
the marcher map: most of its over 400 lights have infinite radius thus
require full screen passes: all those passes fighting for the frame
buffer did very nasty things to performance. However, light splats might be
useful for many small, non-overlapping light volumes, thus the code is
being kept (and I like the cleanups that came with it).
2023-06-28 13:26:37 +09:00
Bill Currie
49dab2af85 [vulkan] Prepare to abandon light splats
Move things around a bit so I can restore the previous behavior of doing
all lights in a single full screen pass but keep the code improvements
from trying to do splatted lighting.
2023-06-28 12:53:58 +09:00
Bill Currie
b113e8a46c [vulkan] Add debug lines for light splats
Disabled, but all that's needed is to uncomment the debug pipeline in
the compose subpass.
2023-06-28 11:47:26 +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
03cfd2530b [vulkan] Ensure staging buffer packets align to 16 bytes
Unaligned packets make it rather unsafe to use vector instructions to
transfer data to them (which optimizing compilers like to do these
days).
2023-06-28 00:27:51 +09:00
Bill Currie
4932987b08 [vulkan] Hook up the view model again
And with that, the vulkan renderer is fully back to where it was before
this mini-project (and even a little ahead). Time for shadows (finally).
2023-06-26 18:14:38 +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
7ba347cb6c [vulkan] Get water warp and fisheye mostly working
Water warp works quite well, but fisheye is having a little trouble
(current issue is framebuffer size mismatch).
2023-06-26 12:07:22 +09:00
Bill Currie
ab4ea1b333 [vulkan] Fix incorrect reference to imageviews
The old system used just "views", but I had at some time decided that I
might want to support specifying buffers and buffer views, but forgot to
change the name in vkparse.c.
2023-06-26 11:55:15 +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
3e28ad62f4 [vkgen] Add support for c23 bool
Even though I'm not using c23 yet :P (properly).
2023-06-26 11:00:51 +09:00
Bill Currie
f5e7d5fbbc [vulkan] Clean out the old vkparse support functions
Lots and lots of deletions.
2023-06-26 00:59:57 +09:00
Bill Currie
05c17d7247 [vulkan] Clean up the old config files 2023-06-26 00:59:57 +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
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
6ce42fd347 [vulkan] Document the texture sets
I got tired of wondering what they were for.
2023-06-24 17:23:34 +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
4abf316f6c [vulkan] Update curFrame at end of render job
This fixes the insta-death of particles. Interestingly, other than
particles (due to the ring of buffers not being used correctly),
everything else worked nicely, so I guess 1-frame rendering got tested.
2023-06-24 03:32:21 +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
dbe00c3dfa [vulkan] Clear the entity queues
bsp_draw_queue isn't the right place, but it's just place-holder code to
help get the rest of the renderers up and running before I tackle bsp
rendering. Fixes the segfault in demo1 when the zombies get gibbed,
resulting in zombie entities.
2023-06-23 18:15:01 +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
54712be41b [vulkan] Enable alpha blend for the compose step
Now the text looks good when over the player model.
2023-06-23 02:30:58 +09:00
Bill Currie
a2a237b854 [vulkan] Correct depth and winding issues
Quake data needs clockwise winding, and both min and max depth of 0
makes for some very strange results.
2023-06-23 02:30:58 +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
2122d923d9 [vulkan] Move the subpass command labels out a layer
Just for easier debugging in renderdoc.
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
836290aa74 [vulkan] Update the active command buffer indices
When creating a new command buffer and appending it to a queue, the
active buffer count needs to be incremented too otherwise the new
command buffer will be accidentally reused prematurely. Not noticed
earlier because only one buffer was being created.
2023-06-22 20:05:52 +09:00
Bill Currie
3c9bd77346 [vulkan] Port line rendering to the new system
I'd already done the programming side when doing slice rendering, but
hadn't hooked up line rendering in the render spec.
2023-06-22 20:05:52 +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
f0d32ba956 [vulkan] Rearrange allocations for alignment
Interleaving Vulkan objects with stucts containing vec4f_t results in
the vectors becoming unaligned when there is an odd number of objects in
a set, thus producing a segfault. Putting all the structs first prevents
any such issue.
2023-06-21 13:43:04 +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
38453f3d2f [vulkan] Increment render pass index one at a time
This fixes the bogus render pass objects.
2023-06-18 19:58:10 +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
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
b33a897ae4 [vulkan] Submit particle physics push constants directly
Trying to do it in the task system meant copying pointers in a larger
buffer, which rarely ends well.
2023-06-16 22:37:27 +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
c1b85a3db7 [vkgen] Support custom parsing in multi-type fields
This allows the likes of:

    qfv_pushconstantrangeinfo_s = {
	.name = qfv_pushconstantrangeinfo_t;
	.type = (QFDictionary);
	.dictionary = {
	    .parse = {
		type = (labeledarray, qfv_pushconstantinfo_t, name);
		size = num_pushconstants;
		values = pushconstants;
	    };
	    stageFlags = $name.auto;
	};
	stageFlags = auto;
    };

Leading to:

    pushConstants = {
	vertex   = { Model = mat4; blend = float; };
	fragment = { colors = uint; base_color = vec4; fog = vec4; };
    };

Where the label of the labeled array (which pushConstants is) is
actually an enum flag and the dictionary value is another labeled array.
2023-06-16 18:53:37 +09:00
Bill Currie
bcfb2ad182 [vkgen] Shorten "qfv_*" enum names
The up-coming changes to push constant handling has qfv_float etc type
enum values and using "float" instead of "qfv_float" is highly desirable
as the names match the glsl type names.
2023-06-16 18:49:58 +09:00
Bill Currie
57da924c1b [plist] Put quotes around the unknown field name
I got rather confused by "unknown field type" when "type" was the field
name.
2023-06-16 18:47:24 +09:00
Bill Currie
387051fedf [vulkan] Split up render job loading and running
The creation of the render jobs doesn't really belong with the running
of those jobs. This makes the code a little easier to navigate as it was
too easy to lost between load-time and run-time code.
2023-06-15 17:29:41 +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
9d1c07d2ac Fix a few strict aliasing warnings
gcc 13 got a little stricter on those (at least with gnu2x/c2x).
2023-06-13 18:13:54 +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
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
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
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
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
a8efde1dd3 Fix some mxe build issues 2023-03-25 21:36:45 +09:00
Bill Currie
86f2df4939 [vulkan] Respect the VULKAN_SDK environment variable
Thanks to Peter for the report and help in getting it working (I hope I
got all the changes right).
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
2fbc27f6a0 [vkgen] Fix ignored field init and dealloc
I had somehow missed vkfieldignore in a consistency pass, or just messed
up its initialization (and thus deallocation) resulting in a double-free
of the strings.
2023-03-21 17:53:55 +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
68b5cd89d2 [vkgen] Plug a pile of ruamoko memory leaks
While the previous cleanup took care of the C side, it turns out vkgen
was leaking property list items all over the place, but they were
cleaned up by the shutdown code.
2023-03-13 11:26:13 +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
45bcb31684 [vulkan] Use bare dictionaries for spec files
Every time I created a new file from scratch, I always forgot the
enclosing {}. Now I will probably include them by accident :P
2023-03-12 14:48:14 +09:00
Bill Currie
3cdcc2c62c [vkgen] Switch to bare dictionary for parse spec
This served as a nice test for the bare dictionary parsing (though
quakefs.c did, too), and even found a bug in vkgen's error handling.
2023-03-12 14:36:47 +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
374ca602a7 [vkgen] Use designated init for fixed array data
It seems I hadn't used fixed arrays for a while as the size field (which
really should be count) had moved and its spot taken by a data pointer.
2023-03-09 15:32:52 +09:00
Bill Currie
faef61aab6 [vulkan] Ensure host-visible buffers are big enough to flush
Flushing memory requires nonCoherentAtomSize alignment, but this can
cause the flush range to go out of bounds of an improperly sized buffer.
However, only host-visible (and probably really only cached, but all
three covered) needs flushing, so no rounding up is done for
device-local memory.
2023-03-09 10:19:24 +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