* This will handle the new vulkan binding model with multiple descriptor
sets and arrays of objects in each binding. It also makes a few tidy
ups and improvements to other APIs in presentation - will e.g. now
show thumbnails for vertex and other stages.
* E.g. if a huge buffer is displayed as just floats, there could be
100s of millions of rows. Instead, we clip to 200,000 (anecdotally
where things start getting a bit laggy on the control), and allow
advancing through sections of the buffer at a time.
* If no position element is selected at all that's really confusing, so
worst case we just pick the first attribute.
* Making it intuitive/obvious that you can change which attribute is
displayed as mesh - that's a different problem.
* Tweaked flycam a bit too, but not much.
* Refactored the API/C# side camera classes to avoid exposing a ton of
stuff just to do relative rotations in the arcball via quaternions.
* The arcball lookat position can also be dragged with alt-click or
middle click.
* Also supports other elements as position not just magically-selected
"POSITION" element.
* Crash upload fix
* If a vertex is the strip restart index (displayed as "-1") or is
reading out of bounds of the index buffer (displayed as "-") then we
should still allow vertex debugging to go ahead, as if the index were
just 0.
* The option will enable monospaced fonts for all data displays, like
the list of events, API calls, etc as well as pipeline displays, entry
of filename/directory in the capture window and many other places.
Pure UI labelling etc mostly still stays as a serif font.
* A few sizes of controls were tweaked (like headers in the pipeline
windows) so that they didn't just barely overflow with the larger
font.
* While looking at this, it became obvious that buffer viewers and
constant bufferviewers should always display in monospaced regardless,
so that has been changed.
* If buffer wasn't a multiple of 4, a Buffer.BlockCopy call could crash
* Unsigned byte indices (for GL) weren't supported
* Post-transform index buffer was assumed to just be uints, but in fact
it is the same size as the drawcall's existing indices.
* Previously for post VS data we could maintain the index buffer by just
doing the stream-out/transform feedback for a point list with each
unique index. To maintain the index buffer we padded out any gaps in
the indices with a single value, so that we could just shift the
indices. This causes severe problems though if the indices start at 0
and contain an invalid value like 0xcccccccc - we'd allocate a huge
array and perform a massively wasteful streamout.
* Instead, we just stream out on the tightly packed list of unique
indices, then remap each 'real' index to where it is in the tightly
packed output buffer.
* We stream-out or transform feedback the whole instanced draw at once,
producing a buffer containing all N instances in one. Then when the
client requests postvs data, an offset into the buffer is calculated
(in 1/N chunks) and carried through everywhere.
* Since we were using the offset to indicate where the system position
output lay for since-last-clear auto drawing of meshes, we rearrange
the output attribute order so system position is always first in the
list.
* Also since-last-clear now doesn't include the current event, but does
include any previous instances before the current instance.
* This fixes the bug that's been around for a while, where if you have
an event selected and then open the buffer viewer, it won't have the
post vs data available until you re-select that event.
* So RenderMesh doesn't pick up anything implicitly from the current
event, log, pipeline state etc - everything it needs is explicitly
provided by the config parameters (note this might include a buffer
generated by postvs data fetching, but the implementation now doesn't
need to care or treat it as a special case.
* This will allow shifting to RenderMesh being run locally just by
the UI specifying the buffer and simple vertex specification, rather
than by relying on any local log properties (or replaying the log).
* The reasoning behind this change is that it becomes much simpler to
implement, rather than having to modify the draw to do what we want,
we just do an entirely custom draw based on a few properties - similar
to the texture rendering. This will help e.g. for writing a GL
implementation.
* The second benefit is that we can just transfer the buffer contents
across the network when replaying remotely, so mesh rendering can be
implemented even for remote replay - the last unimplemented feature.
* It could also be used similar to the image viewer in future, to
display mesh files.