* 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).
* SetDst called into a scalar destination operand expect the source to
be in .x of the parameter, regardless of mask. So in a couple of cases
where we're assigning from a vector we need to do the mask apply
by hand. Bit messy, but there are only a couple of exceptions
* ld_structured was just looking for UAVs before, but this opcode is
also used for SRVs and we need to find the right declaration to get
the stride correctly (otherwise we'll either get 0 if there are no
UAVs, or pick a UAV incorrectly!)
* 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.
* This prevents arrays or cubemaps from having the slice or face index
be incorrectly modified by the mip being displayed. Thanks Xavyiy on
twitter for the report.
https://twitter.com/Xavyiy/status/574352181190594560
* 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.
* This shader is necessary for the MSAA-to-array copying functionality
used, and without it we bind a NULL vertex shader and can end up with
driver crashes.
* 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.
* Also in many places OpenGL is now advertised as full support, since it
is pretty close by now and needs people to jump on it full-time and
use it in anger.
* I doubt anyone will notice the file->open filter unless they look for
it so it's no good for 'discovering' the image viewing capability, but
it might be convenient for people who know about it.
* This means the redeclarations are a bit more flexible if a shader
(like a geometry shader) redeclares one already, but not the other,
we'll only substitute in the missing one.
* Note this code is still a bit flakey e.g. in edge cases like if
someone puts "in gl_PerVertex" in a comment, then it will fail.
I want to avoid putting a full parser in, but perhaps stripping the
source of any comments is a reasonable future step.