Commit Graph

4799 Commits

Author SHA1 Message Date
Bill Currie d70d72e6e4 [particles] Create a psystem object
This takes care of the global variables to a point (there is still the
global struct shared between the non-vulkan renderers), but it also
takes care of glsl's points-only rendering.
2021-12-24 06:45:13 +09:00
Bill Currie 372c89b479 [particles] Merge physics code
The particle physics is called by the renderer.
2021-12-24 06:45:13 +09:00
Bill Currie 8d2791752e [particles] Merge particle spawning into client
After yesterday's crazy marathon editing all the particles files, and
starting to do another big change to them today, I realized that I
really do need to merge them down. All the actual spawning is now in the
client library (though particle insertion will need to be moved). GLSL
particle rendering is semi-broken in that it now does only points (until
I come up with a way to select between points and quads (probably a
context object, which I need anyway for Vulkan)).
2021-12-24 06:45:13 +09:00
Bill Currie 81a5e076ac [vulkan] Move render pass array init
Having it in Vulkan_Init_Common means the array can be used in more
places than just Vulkan_CreateRenderPass (which probably needs a
rename).
2021-12-24 06:45:13 +09:00
Bill Currie 2be19046b6 [vulkan] Allow render passes to not have a render pass
This may seem a little contradictory, but it's due to the difference
between a high level (engine) render pass and a Vulkan render pass
object (and quite likely a poor choice in names for the high level
object). This is necessary for supporting compute shader dispatches as
they cannot be submitted inside a Vulkan render pass.
2021-12-24 06:45:13 +09:00
Bill Currie 43cdca330b [client] Add bindings for load and quickload in demos 2021-12-24 06:45:13 +09:00
Bill Currie aacd2575d2 [sw,sw32] Ensure the particle system is initialized
This fixes the missing particles (because mtwist_rand was returning 0).
2021-12-24 06:45:13 +09:00
Bill Currie ce4bb1d56c [renderer] Move particles over to simd
This has the advantage of getting entity_t out of the particle system,
and much easier to read math. Also, it served as a nice test for my
particle physics shaders (implemented the ideas in C). There's a lot of
code that needs merging down: all but the actual drawing can be merged.

There's some weirdness with color ramps, but I'll look into that later.
2021-12-24 06:45:13 +09:00
Bill Currie 4d1e8b2375 [vulkan] Update the number of drawn quads correctly
They should increment by one for each pic, not 4 (I think some fluff
remaining from copying glsl's draw code).

I noticed the problem when I saw large gaps of 0s in the vertex data in
renderdoc.
2021-12-24 06:45:13 +09:00
Bill Currie be7216e660 [vulkan] Implement crosshair rendering
That makes quite the difference to playability.
2021-12-24 06:45:13 +09:00
Bill Currie 6b84ae5554 [renderer] Update crosshair color on palette changes
This gets the crosshair working in Vulkan (next commit) and fixes issues
with changing the palette (though I've never seen a different palette
for quate, there's still the change from "all black" to an actual
palette).
2021-12-24 06:45:13 +09:00
Bill Currie 83ec2be2a6 [vid] Add a listener set for palette changes
This was needed to get crosshaircolor working correctly, but is likely
another step towards resizable windows (the listener set types are
generic for any viddef event, not just palette changes).
2021-12-24 06:45:13 +09:00
Bill Currie cd641e2b1c [vulkan] Clean up alias push-constants 2021-12-24 06:45:13 +09:00
Bill Currie 8b1eec08cf [scene] Provide direct access to the world matrix
Holding onto the pointer is not a good idea, and it is read-only as
direct manipulation of the world matrix is not supported. However, this
is useful for passing the matrix to the GPU.
2021-12-24 06:45:13 +09:00
Bill Currie 869cc4050c [vulkan] Flush bsp vertex indices after all drawing 2021-12-24 06:45:13 +09:00
Bill Currie 36e98f013e [vulkan] Clean up bsp push-constants. 2021-12-24 06:45:13 +09:00
Bill Currie 081c46da7a Clean up some white space 2021-12-24 06:45:13 +09:00
Bill Currie b9bc3fa132 [vulkan] Split out the push constants helper
It proved to work well in the sprite pipeline, and should be useful for
cleaning up the magic numbers in bsp and alias.
2021-12-24 06:45:13 +09:00
Bill Currie 0b99ff104d [vulkan] Clear the color attachments
This means color, emission, and translucent. Fixes the HOM issues on my
VersaPro (but halves the frame-rate... definitely need to bring back the
forward renderer as an option).
2021-12-24 06:45:13 +09:00
Bill Currie db6c76d583 [vulkan] Abandon bindless rendering
At least for now, it is more trouble than it is worth as it (or my
implementation of it) breaks lavapipe and renderdoc.
2021-12-24 06:45:13 +09:00
Bill Currie 8228146ac0 [vulkan] Use the particle system buffer for indirect draws
I realized I'd need to get the particle counts out to the draw commands
somehow, and this seemed to be the most natural way.
2021-12-24 06:45:13 +09:00
Bill Currie 6aaf5c3722 [vulkan] Start work on particles for Vulkan
This gets the pipelines loaded (and unloaded on shutdown). Probably the
easy part :P. Still need to sort out the command buffers,
synchronization, and particle generation (and probably a bunch else
that's not coming to mind).
2021-12-24 06:45:13 +09:00
Bill Currie 9dcaa98205 [vulkan] Clean up a pile of C&P fluff 2021-12-24 06:45:13 +09:00
Bill Currie e0af6541e6 [vulkan] And a bunch of buffer barrier transitions
These seem to be the most likely ones for compute shaders (some based on
my ideas for particles).
2021-12-24 06:45:13 +09:00
Bill Currie 7901f87960 [vulkan] Add support for compute shaders
This needed changing Vulkan_CreatePipeline to
Vulkan_CreateGraphicsPipeline for consistency (and parsing the
difference from a plist seemed... not worth thinking about).
2021-12-24 06:45:13 +09:00
Bill Currie 0d4ece875d [vulkan] Use indexed initializers for barriers
This will make maintaining the arrays much easier: no worries about
getting things out of sync.
2021-12-24 06:45:13 +09:00
Bill Currie 6a7f78485a [zone] Use memccpy instead of strncpy
Probably the best way to tell gcc I know what I'm doing.
2021-12-24 06:45:13 +09:00
Bill Currie f7c14a9b39 [sw32] Use the shared R_GetSpriteFrame
One less copy of near-identical code.
2021-12-24 06:45:13 +09:00
Bill Currie 5223752f9e [vulkan] Fix lighting size calculation
It turns out the required memory size is not guaranteed to be aligned.
2021-12-24 06:45:13 +09:00
Bill Currie c366b1b7bb [vulkan] Implement the sprite render passes
It turned out the bindless approach wouldn't work too well for my design
of the sprite objects, but I don't think that's a big issue at this
stage (and it seems bindless is causing problems for brush/alias
rendering via renderdoc and on my versa pro). However, I have figured
out how to make effective use of descriptor sets (finally :P).

The actual normal still needs checking, but the sprites are currently
unlit so not an issue at this stage.
2021-12-24 06:45:13 +09:00
Bill Currie dafe591446 [renderer] Start merging sprite frame calculation
This covers gl and sw. sw32 should be trivial (just haven't done it),
but glsl will take a little. Vulkan will use it.
2021-12-24 06:45:13 +09:00
Bill Currie 743a732bd7 [vulkan] Correct the semantics of QFV_NextOffset
I'm not at all sure what I was thinking when I designed it, but I
certainly designed it wrong (to the point of being fairly useless). It
turns out memory requirements are already aligned in size (so just
multiplying is fine), and what I really wanted was to get the next
offset aligned to the given requirements.
2021-12-24 06:45:13 +09:00
Bill Currie 36e0d857a2 [vulkan] Create the non-C side of the sprite pipeline
This adds the shaders and the pipeline specs. I'm not sure that the
deferred rendering side of the render pass is appropriate, but I thought
I'd give it a go, since quake sprites are really cutoff rather than
translucent.
2021-12-24 06:45:13 +09:00
Bill Currie 2db8d11dd0 [vulkan] Clean up some excessive descriptor sets
With the switch to multi-layer textures for brush models, the bsp and
alias texture descriptor sets became identical and thus the definitions
shareable. However, due to complications I don't want to address yet,
they're still separately identified, but I should be able to use the
texture set for most, if not all, pipelines.
2021-12-24 06:45:13 +09:00
Bill Currie 0eb556b8f9 [vulkan] Load sprite model data
The vertices and frame images are loaded into the one memory object,
with the vertices first followed by the images.

The vertices are 2D xy+uv sets meant to be applied to the model
transform frame, and are pre-computed for the sprite size (this part
does support sprites with varying frame image sizes).

The frame images are loaded into one image with each frame on its own
layer. This will cause some problems if any sprites with varying frame
image sizes are found, but the three sprites in quake are all uniform
size.
2021-12-24 06:45:13 +09:00
Bill Currie c5cfcc7bfd [sprite] Separate model and texture loading
As much as it can be since the texture data is interleaved with the
model data in the files (I guess not that bad a design for 25 years ago
with the tight memory constraints), but this paves the way for
supporting sprites in Vulkan.
2021-12-24 06:45:13 +09:00
Bill Currie e7e6dd87e8 [glsl] Fix some const-correct issues for textures 2021-12-24 06:45:13 +09:00
Bill Currie 2b332cfe4a [zone] Clean up some magic numbers 2021-12-24 06:45:13 +09:00
Bill Currie 854c92d10e [simd] Indicate when the circumsphere is degenerate
CircumSphere_vf sets the sphere radius to -1 when the points are
degenerate (co-linear for three points, co-planar for four points).
2021-12-24 06:45:13 +09:00
Bill Currie eee25d21ba [zone] Clean out unnecessary memsets
As the cache blocks are always filled in with a memcpy, there's no need
to zero out the whole allocation, and the header is initialized anyway.
2021-12-24 06:45:13 +09:00
Bill Currie ff40563fc0 [zone] Squeeze cache_system_t to fit into 64 bytes
The cache system pointers are now indices into an array of
cache_system_t blocks, allowing them to be 32 bits instead of 64, thus
allowing cache_system_t to fit into a single CPU cache line. This still
gives and effective 38 bits (256GB) of addressing for cache/hunk. This
does mean that the cache functions cannot work with more than 256GB, but
should that become a problem, cache and working hunking hunk can be
separate, and it should be possible to have multiple cache systems.
2021-12-24 06:45:13 +09:00
Bill Currie d857bdea77 [vulkan] Fix a typo and gcc purity warning 2021-12-24 06:45:13 +09:00
Bill Currie fde47d6983 [quakefs] Clean out some excess memsets
There's no point in zeroing out memory that is only going to be
overwritten by the loaded file (excess bytes beyond the end of a
massaged text file shouldn't be accessed anyway, and the terminating
null is still written).
2021-12-24 06:45:13 +09:00
Bill Currie 2086125e0b [quakefs] Take in the pointer to the global hunk
This is needed for cleaning up excess memsets when loading files because
Hunk_RawAllocName has nonnull on its hunk pointer (as the rest of the
hunk functions really should, but not just yet).
2021-12-24 06:45:13 +09:00
Bill Currie 39c020908c [zone] Return the pointer to the global hunk
In trying to reduce unnecessary memsets when loading files, I found that
Hunk_RawAllocName already had nonnull on it, so quakefs needed to know
the hunk it was to use. It seemed much better to to go this way (first
step in what is likely to be a lengthy process) than backtracking a
little and removing the nonnull attribute.
2021-12-24 06:45:13 +09:00
Bill Currie 0a5981878b [sprite] Clean up field names and casting
No wonder I hated the sprite code: I couldn't see the code for all the
casts (and hungarian warts).
2021-12-24 06:45:13 +09:00
Bill Currie 1df3c2eea0 [renderer] Make R_BillboarFrame's comments true
While they weren't entirely false, they were overly verbose and thus
clouded the point.
2021-12-24 06:45:13 +09:00
Bill Currie 3a17e062da [renderer] Merge sprite billboarding code
As the sw renderer's implementation was the closest to id's, it was used
as the model (thus a fair bit of cleanup is still needed). This fixes
some incorrect implementations in glsl and gl.
2021-12-24 06:45:13 +09:00
Bill Currie 8c5c39cbe4 [vulkan] Mix turb full-brights into main color
I'd forgotten (when doing the original brush texture loader) that
turbulent surfaces were unlit and thus always full-bright, then never
wrote the turb shader to take care of it. The best solution seems to be
to just mix the two colors in the shader as it will allow turb surfaces
to be lit in the future (probably with severely limited light counts due
to being a forward renderer).
2021-12-24 06:45:13 +09:00
Bill Currie d5b824a47c [vulkan] Switch alias pipeline to multi-texture
This gets the alias pipeline in line with the bsp pipeline, and thus
everything is about as functional as it was before the rework (minus
dealing with large texture sets).
2021-12-24 06:45:13 +09:00
Bill Currie 11492d77ce [vulkan] Switch bsp renderer to multi-texture
I guess it's not quite bindless as the texture index is a push constant,
but it seems to work well (and I may have fixed some full-bright issues
by accident, though I suspect that's just my imagination, but they do
look good).
2021-12-24 06:45:13 +09:00
Bill Currie 6fbce335bb [vulkan] Add an array view for default_magenta
The validation layers get very picky about image view types (rightfully
so, I imagine).
2021-12-24 06:45:13 +09:00
Bill Currie 2740f6093b [vulkan] Update shaders and layouts for new scheme
Still need to work on the code, though.
2021-12-24 06:45:13 +09:00
Bill Currie 8422732505 [vulkan] Move matrices into per-frame buffers
This should fix the horrid frame rate dependent behavior of the view
model.

They are also in their own descriptor set so they can be easily shared
between pipelines. This has been verified to work for Draw.
2021-12-24 06:45:13 +09:00
Bill Currie e8961342d5 [vulkan] Fix some mostly harmless typos 2021-12-24 06:45:13 +09:00
Bill Currie d7f588ecfe [vulkan] Rework bsp texture loader
BSP textures are now two-layered with the albedo and emission in the two
layers rather than two separate images. While this does increase memory
usage for the textures themselves (most do not have fullbright pixels),
it cuts down on image and image view handles (and shader resources).
2021-12-24 06:45:13 +09:00
Bill Currie ea4ac894d8 [model] Swap fullbright/top/bottom color func params
This makes them semantically compatible with memcpy.
2021-12-24 06:45:13 +09:00
Bill Currie ff6d6f6dd6 [vulkan] Rework shaders and pipelines for bindless textures
Smashing everything in the process :P (need to work on the C side).
However, while bindless is supposedly good for performance, the biggest
gain this will bring is portability: the texture counts are
automatically limited to what the hardware can handle, and the reliance
on push descriptors is removed (though they were nice and did help get
things up and running).
2021-12-24 06:45:13 +09:00
Bill Currie 3a742f59f7 [vulkan] Copy array() parameters correctly
I had forgotten that the parameters are in reverse order, and even if I
had remembered, I forgot to reset offset before the second loop.
Pre-decrementing offset takes care of both issues at once.
2021-12-24 06:45:13 +09:00
Bill Currie a0c935e8bc [vulkan] Make lighting samplers configurable
My VersaPro doesn't support more than 32 per-stage samplers (lavapipe).
This is a small part of getting Vulkan to run on lavapipe and even in
itself is rather incomplete.
2021-12-24 06:45:13 +09:00
Bill Currie 062f616548 [cexpr] Add support for casting plitems
This allows using references in expressions, eg:

    $frames.size * size_t($properties.limits.maxSamplers)

As references remain property list items until actually evaluated.
2021-12-24 06:45:13 +09:00
Bill Currie e7b067d6a9 [cexpr] Add some functions for size_t and uint
Casting for size_t and uint, and min/max/bound for size_t.
2021-12-24 06:45:13 +09:00
Bill Currie ee1c3e7db5 [cexpr] Clean up the macros a little 2021-12-24 06:45:13 +09:00
Bill Currie f6cc138f48 [vulkan] Provide access to VkPhysicalDeviceLimits
Fixes the warning about parse_fixed_array not being used (oops, the
problem with partial commits), but more importantly, gives access to
things like maxDescriptorSetSamplers.
2021-12-24 06:45:13 +09:00
Bill Currie cff23ac93c [vulkan] Connect up the cexpr library
This will make property list expressions easier to work with. The
library is rather limited right now (trig, dot, min/max/bound) but even
just min adds a lot of functionality.
2021-12-24 06:45:12 +09:00
Bill Currie d2eb928210 [cexpr] Add a small library with some useful functions
For now, just dot product, trig, and min/max/bound, but it works well as
a proof of concept. The main goal was actually min. Only the list of
symbols is provided, it is the user's responsibility to set up the
symbol table and context.
2021-12-24 06:45:12 +09:00
Bill Currie 44102f2639 [cexpr] Support chained contexts for scoping
cexpr's symbol tables currently aren't readily extended, and dynamic
scoping is usually a good thing anyway. The chain of contexts is walked
when a symbol is not found in the current context's symtab, but minor
efforts are made to avoid checking the same symtab twice (usually cased
by cloning a context but not updating the symtab).
2021-12-24 06:45:12 +09:00
Bill Currie 049968b38e white space 2021-12-24 06:45:12 +09:00
Bill Currie 4e8718980f [cexpr] Remove some disabled code
It looks like a munged commit, but I think I had decided that it was
best to make cvar access explicit.
2021-12-24 06:45:12 +09:00
Bill Currie 8271860fb3 [vkgen] Add support for fixed arrays
I want to support reading VkPhysicalDeviceLimits but it has some arrays.
While I don't need to parse them (VkPhysicalDeviceLimits should be
treated as read-only), I do need to be able to access them in property
list expressions, and vkgen generates the cexpr type descriptors too.

However, I will probably want to parse arrays some time in the future.
2021-12-24 06:45:12 +09:00
Bill Currie c8846f8007 [cexpr] Support array indexing
The index is currently limited to ints, and is bounds checked (the array
type has a size field indicating the number of elements).
2021-12-24 06:45:12 +09:00
Bill Currie c73e4efcb7 [vkgen] Don't queue types for fields with custom parsers
This ensures that unused parser blocks do not get emitted. In the
testing of the upcoming support for fixed arrays, the blend color
constants were being double emitted (both as custom and normal parser)
due to being an array. gcc did not like that (what with all those
warning flags).
2021-12-24 06:45:12 +09:00
Bill Currie a522464fc1 [vkgen] Clean up an unnecessary function redirect
I think it was mostly a holdover from early development, but it
certainly makes sense to tuck the functionality away in Struct.
2021-12-24 06:45:12 +09:00
Bill Currie c402275112 [vulkan] Add some more debug stack contexts 2021-12-24 06:45:12 +09:00
Bill Currie 75d06c4f98 [vulkan] Clean out some expired FIXME comments 2021-12-24 06:45:12 +09:00
Bill Currie 928408bad9 [vulkan] Support multiple render passes
Multiple render passes are needed for supporting shadow mapping, and
this is a huge step towards breaking the Vulkan render free of Quake,
and hopefully will lead the way for breaking the GL renderers free as
well.
2021-12-24 06:45:12 +09:00
Bill Currie 84a24dbb34 [renderer] Make R_RenderView private
This is actually a better solution to the renderer directly accessing
client code than provided by 7e078c7f9c.

Essentially, V_RenderView should not have been calling R_RenderView, and
CL_UpdateScreen should have been calling V_RenderView directly. The
issue was that the renderers expected the world entity model to be valid
at all times. Now, R_RenderView checks the world entity model's validity
and immediately bails if it is not, and R_ClearState (which is called
whenever the client disconnects and thus no longer has a world to
render) clears the world entity model. Thus R_RenderView can (and is)
now called unconditionally from within the renderer, simplifying
renderer-specific variants.
2021-12-24 06:45:12 +09:00
Bill Currie eb828007e9 [vulkan] Add a comment about next pass timing 2021-12-24 06:45:12 +09:00
Bill Currie b1ba87e5aa [vulkan] Use the short name for the image types
Yay for coming up with a solution for enums short names that start with
a number, makes things more readable.
2021-12-24 06:45:12 +09:00
Bill Currie 614c744693 [cexpr] Use ` to allow identifiers to start with a number
The generated short names for a lot of Vulkan enums start with a number
(eg VK_IMAGE_TYPE_2D -> 2d). Having to prefix the short name with ` is a
tiny cost for the convenience.
2021-12-24 06:45:12 +09:00
Bill Currie a6703c95cf [plist] Allow ` to be used without quotes
It has no special meaning when parsing property lists, so there's no
reason to require quotes around it.
2021-12-24 06:45:12 +09:00
Bill Currie 9e755f270e [vulkan] Set staging fence timeout to 5 seconds
0.5s seemes to be unreliable on my VersaPro, particularly after a large
build.
2021-12-24 06:45:12 +09:00
Bill Currie 02ba3da0ba [vulkan] Ease writing of specialization data
While using binary data objects for specialization data works for bools
(as they can be 0 or -1), they don't work so well for numeric values due
to having to get the byte order correct and thus are not portable, and
difficult to get right.

Binary data is still supported, but the data can be written as a string
with an array(...) "constructor" expression taking any number of
parameters, with each parameter itself being an expression (though
values are limited at this stage).

Due to the plist format, quotes are required around the expression
("array(...)")
2021-12-24 06:45:12 +09:00
Bill Currie bd31f40c9b [cexpr] Support varargs functions
While there may be better solutions, I needed a varargs function for
building Vulkan specialization data. Like progs functions, negative
parameter counts indicate ellipsis with the number of fixed parameters
being equal to -param_count - 1.
2021-12-24 06:45:12 +09:00
Bill Currie 422ad2a6c9 [vulkan] Recreate lighting pvs sets when loading lights
Sets never shrink, so assigning a dynamically created set to a
statically created set after the working size has reduced (going from
demo2 to demo3) causes the set code to attempt to resize the statically
created set, which leads to libc having a bad time.
2021-12-24 06:45:12 +09:00
Bill Currie 0c0fce2f03 [vulkan] Drop lights with size 0
They can't contribute any light, so no point in keeping them. Fixes the
erroneous size-0 shadow maps in the second nq demo.
2021-12-24 06:45:12 +09:00
Bill Currie 08721f7a21 [vulkan] Destroy the right framebuffers
Why nvidia's drivers accepted double-destroyed framebuffers is beyond
me, but this fixes the Intel drivers complaining about such (and the
subsequent segfault).
2021-12-24 06:45:12 +09:00
Bill Currie 5b1052087a [vulkan] Calculate matrix offset correctly
When I changed the matrices from an array of floats to an array of
vec4f_t, I forgot to update the flush offsets. Yay for having a
Vulkan-capable Intel device with its different alignment requirements.
2021-12-24 06:45:12 +09:00
Bill Currie 25559243ae [vulkan] Add function to compute next offset
When allocating memory for multiple objects that have alignment
requirements, it gets tedious keeping track of the offset and the
alignment. This is a simple function for walking the offset respecting
size and alignment requirements, and doubles as a size calculator.
2021-12-24 06:45:12 +09:00
Bill Currie 8d58dee4b1 [input] Ensure button id is never 0
IN_ButtonAction treats id 0 as not pressed in its internal processing,
and the previous input implementation treated 0 as "no key", so this is
both the simplest and most correct fix.

Fixes mouse left button not working every second time the game is run
(due to keyboard and mouse bindings swapping places in the config file
(separate issue, if it really is one)).
2021-12-18 14:17:40 +09:00
Bill Currie 68de8615d6 [input] Set cbuf of correct imt context
This fixes key_demo bindings not working. Quite the face-palm.
2021-12-17 08:33:13 +09:00
Bill Currie cbf84d815f [client] Add default bindings for key_demo
Just F10 (quite) and ` (toggleconsole) so the two can be used during
demos, but just this is a major improvement.
2021-12-17 08:33:02 +09:00
Bill Currie 9d4017885f [cvar] Preserve cvars loaded from config files
This restores the equivalent functionality that seta in config.cfg
provided (no more losing my volume setting after using -nosound).
2021-12-17 08:32:36 +09:00
Bill Currie 032f9971ed [plist] Remove incorrect const from PL_RemoveObjectForKey
I'm not sure what I was thinking when I made PL_RemoveObjectForKey take
a const plitem. One of those times where C could do with being a little
more strict.
2021-12-17 08:30:00 +09:00
Bill Currie d76cf9202d [x11] Create barriers only when grabbing
While using barriers is a zillion times better than actually grabbing
the mouse and keyboard, they're still a pain when debugging as qf is not
able to respond to the barrier-hit events. All the other logic is still
there so even when "grabbing", the mouse will not be blocked if the
window doesn't have focus.
2021-12-06 07:27:08 +09:00
Bill Currie 8b85e422d7 [vulkan] Add a debug stack to the vulkan instance
The stack is arbitrary strings that the validation layer debug callback
prints in reverse order after each message. This makes it easy to work
out what nodes in a pipeline/render pass plist are causing validation
errors. Still have to narrow down the actual line, but the messages seem
to help with that.
Putting qfvPushDebug/qfvPopDebug around other calls to vulkan should
help out a lot, tool.
As a bonus, the stack is printed before debug_breakpoint is called, so
it's immediately visible in gdb.
2021-11-30 18:10:48 +09:00
Bill Currie 2334798432 [vulkan] Make vulkan_use_validation easier more useful
Rather than just 0/1, it now acts as flags to control what messages are
printed. In addition to the Vulkan enum names (long and short), none and
all are supported (as well as raw numbers, but they're not checked for
validity). This makes vulkan_use_validation a bit easier to use and less
verbose by default.

Now, if only it was easier to remember the name :P
2021-11-30 18:10:48 +09:00
Bill Currie 901619235b [vulkan] Split out cvar enum parsing code
Need to reuse it :)
2021-11-30 18:10:48 +09:00
Bill Currie 52f86adb84 [vulkan] Fail gracefully if vulkan driver init fails
Well, a little more gracefully than a segfault, at least.
2021-11-30 18:10:48 +09:00
Bill Currie c9508f7261 [vkgen] Name-shorten extension enum flag bits
The prefix was being stripped, but not the _BIT_EXT suffix. This makes
extension flags a little easier to use.
2021-11-30 18:10:48 +09:00