* An array of resources like SamplerState foo[8]; or Texture2D blah[8];
show up as one entry in the reflection data, so need to be expanded
out to several entries.
* Normally it's OK to overlap two resources in the same bind, as long
as only one gets used - this doesn't matter to us since only the used
one will show up in the reflection data. Unless there's an array e.g:
SamplerState foo[8] : register(s0); // [0] and [5] used;
SamplerState bar : register(s3);
in which case foo[] appears in the reflection data for the sake of [0]
and [5], and bar will appear too (causing an overlap between foo[3]
and bar. Since we know the reflection data is unambiguous, we
prioritise individual entries over array entries by listing them
first and using the first match for any bindpoint.
* Still leaving some upper limit so that typos don't result in a zoom
level of something crazy.
* This also allows 'fit to texture' to zoom in more, but I'm OK with
that.
* 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.
* This should in theory be impossible as you can't create a view that
points to after the number of slices, and we always make a list of all
slices, but there was a crash report here so for now we'll just clamp
so that it doesn't crash completely.
* Previously if a temporary log was saved once, it would be moved there,
so the user could in theory delete it and lose the only copy of the
log.
* Now the temporary log is held until it's closed in the UI, to be able
to be saved again. If the user saves the log though, this will stop
any "unsaved log" prompts in the main UI window, so there is nothing
stopping the user from saving the log, deleting that copy, then
closing and they'll lose the log without prompt.
* 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.
* The trace count could be less than the number of instructions if flow
control causes some instructions to be skipped (and higher if some
were repeated!). There's no need to validate this value anyway, RunTo
will bail when it hits the end of the trace if the number is too high.
* Errors like syntax and runtime errors in python are thrown as
exceptions. So for when we invoke onto the renderer thread to do some
work, we need to be able to catch those exceptions otherwise the whole
program dies. So over the execute, temporarily switch the thread into
a catching-exception mode, which then gets rethrown on the invoker's
thread.
* Note that BeginInvoke shouldn't be used by python since the callback
might happen after the execution has finished (there's no way to wait
at the moment).
* Previously we'd expect to run through the same algorithm to generate
the drawcall nodes, but fill in the existing nodes. However this
completely broke down when some nodes weren't created because they
were empty. Now instead we just iterate the nodes that are there and
look up any values in the timing results.
* 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.
* You can't set SplitterDistance unless both MinSize values will be
respected, which needs a big enough window. Smaller than that, we just
have to skip setting the size.
* Note at the time of committing there are still some warnings in MS
headers that you might need to suppress in a couple of files.
* 3rd party code just has the warnings suppressed for ease of merging.
* The majority of warning fixes were for local variables shadowing
other locals, function parameters, or members. In most cases they
weren't a problem, but in some cases it was potentially dangerous!
* 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).
* Since RenderDoc is heavily mixed .NET/C++ code, regardless of any
disadvantages this option is practically required (e.g. if building in
profile, the first error message or assert will take the program down
as the breakpoint won't get caught).
* In the UI, enabling this option will always go into csproj.user, but
in fact the option works fine if you manually put it into the csproj,
which means this will be the default for all new clones. Yay!
* 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.
* When we figure out which event a marker region should jump to if you
select the parent, we want to pick the last valid event ID that isn't
just a label. However previously this was being done by iterating over
the children and picking the last one and assuming there would be a
node of that index - which isn't true in the case where some drawcalls
were entirely omitted. It would either index out of bounds, or index
incorrectly.
* The UAV array is provided as we expect it - with UAVs from 0 onwards
even if their 'slots' are 4, 5, 6 etc or whatever. UAVStartSlot is
the slot of the 0th UAV.