* 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.
* Also the PipelineStateViewer will set its current 'sticky' API type
to the common pipeline state, so that when a log isn't loaded we can
still get API-specific properties that match the last API used.
* For now, we just assume that cbuffers are tightly packed according to
D3D11 rules (matrices, structs, float3/4 are all float4 aligned), and
once final SPIR-V is generated everything should have explicit
offsets, strides, and sizes
* Depth is not cleared, only colour buffers.
* This uses the same definition of pass as the quad overdraw overlay,
which isn't quite the same as the auto-grouping passes (which allow
for varying colour binds being grouped together). It only counts up
to the last draw where the outputs were different.
* This API is now intended to be forward and backward compatible as much
as possible. Meaning applications should be able to run without
changing on many RenderDoc versions after the one they are built
against without breaking.
* All function pointers are fetched at once in one versioned GetAPI()
function, to save on constant GetProcAddress/dlsym'ing.
* Otherwise, it's largely similar to the previous API.
* Next step is to display VS and other stage inputs on the input panel.
* Also need to tidy up the fetching of highest mip/array slice etc to
use the same codepath.
* These locks shouldn't cover much work as generally the caches will
quickly fill up and the inside-lock work will be quick.
* Also they shouldn't contend as it's quite rare for anything but the
render thread to go through CustomMarshal.
* Since the exported C functions just take an explicit 'this' parameter
and call the corresponding function, we can just make it contractual
via a virtual interface that the pointer can be dereferenced.
* 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.
* This fixes shader editing when the entry point file wasn't the first
in the list.
* Might need better detection of the main file than just searching for
the entry point substring - could produce false positives in other
files in a comment or #define or something similar?
* This means that the timeline bar will show use as read/write/clear etc
and that right clicking on textures in the texture viewer will show
the events where that texture is used for rendering, for reading, and
so on.
* 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.
* What gets listed as a 'drawcall' is a bit fuzzy - previously it was
drawing calls, dispatches and clears, but you could make a good
argument for these to be included as well. As a semi-experiment, these
calls are now included and will be listed in the event browser.
* Other calls can change resources like direct buffer or texture uploads
and Map() type calls, but these remain as API calls listed between
draw calls. Again this is mostly an arbitrary distinction.
* D3D11 logs are backwards compatible, GL logs are not (although it'd
be relatively simple, GL logs will likely break backwards compat soon
anyway, so not worth supporting it now only to break it soon).
* If hardware support for feature level 11 isn't present, fall back to
the WARP software rasterizer. This will support everything needed, but
it certainly won't run well.
* There are loud warnings - I added a debug message to the debug errors&
warnings window so the status bar will indicate that, and it's in the
title.
* At most once every 3 weeks there will also be a message box pop up
when loading a log, to remind the user so that it isn't forgotten, as
for obvious reasons this is not the intended use-case (hopefully once
per 3 weeks isn't too often to be annoying).
* Client code can enumerate the IDs of counters that are supported -
some of these will be general, some will be IHV specific. It can also
request descriptions of the counters to determine the type of data or
units. This can be used to 'discover' counters that aren't hard
coded into renderdoc. I'll want to at least reserve IHV ranges so that
counter IDs are globally unique, and ideally IHV counters will also be
predeclared where possible.
* Also the refactor removes some ugly rdctype::array use outside of the
replay layer and replaces it just with std::vector, which is a nice
bonus.
* 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.
* 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.