* In extreme cases a program can create lots and lots of unique short-
lived state objects, we cache them all and run out of the 4096 state
objects that can be around, then further creates fail out.
* To handle this, if we have 4000 total state objects, we release any
that are purely being held by us (not the program). This isn't an
ideal solution but it's quite simple and non-invasive, and only has
a slight impact on rare Create calls.
* Most programs will either create a few up-front (as intended), or at
worst create a few dozen or even few hundred then re-use them as they
are cached.
* D3D11 you query for interface with UUID of
{A7AA6116-9C8D-4BBA-9083-B4D816B71B78}. It's just IUnknown*
* GL implements GL_EXT_debug_tool with spec here:
https://renderdoc.org/debug_tool.txt
with DEBUG_TOOL_EXT #define'd to 0x6789, DEBUG_TOOL_NAME_EXT to 0x678A
and DEBUG_TOOL_PURPOSE_EXT to 0x678B. For now, reporting this ext is
enough to identify RenderDoc.
* To align a buffer inside a chunk to a wider boundary like 32-bytes in
this case, the chunk needs to be aligned and the buffer within it also
needs to be aligned.
* The utility function accounts for the buffer serialised having a
uint32 length in front of it, so it pads out until that will be at
the desired boundary. This is a bit of a messy solution, but the
easiest way to ensure the padding is there while being easily
backwards compatible with old logs without the padding.
* D3D11 and GL serialise versions are bumped, D3D11 version is backwards
compatible, GL breaks compatibility.
* 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.
* Fixes a reported crash.
* This function was only core in 4.2 so it's perfectly valid for it to
be missing - if so then we just skip using it to determine the size of
a format and default to 8-bit colour or 32-bit depth/stencil formats.
* The core class is now responsible for tracking the active window and
cycling through, so it can cycle through multiple APIs.
* For GL we only set up associations for capturable windows, and only
those that present (since helper windows are often created). Since
GL doesn't really have a 'this window is done rendering' call, we just
decay old windows that haven't presented in >5 seconds.
* Also on GL, legacy/uncapturable windows aren't associated so they will
not cycle to at all.
* The embedding API now expects a device pointer and window handle to
set active window or start/end a capture. You can still pass NULLs if
there is only one API active.
* 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.
* This is a concession towards non-core capturing, as it's fairly easy
to support this fallback case without having a negative effect on the
proper path.
* We serialise out whether an index buffer was bound, and if it wasn't
we serialise the array passed as a parameter, and upload it into a
temporary index buffer we generate (so that the replay is correct at
least).
* I think technically the indirect parameter for glDrawElementsIndirect
can point to client memory, and the elements array-of-arrays in
glMultiDrawElements can definitely point to client memory, but I'm
assuming that no-one would do that. I certainly hope they wouldn't!
* 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 CreateContextAttribs is not used to create the context, the overlay
will run in super-duper old mode using immediate mode calls and fixed
function pipeline. This way it should display on (in theory) any GL
app. Capturing will be prevented.
* Compatibility profile contexts are still allowed, but a warning is
displayed in the overlay.
* If CreateContextAttribs is used to create a < 3.2 version context, we
go down the same path as for legacy contexts, except with an accurate
overlay message (just that the version isn't supported).
* This prevents the app requesting an ID3D11Debug, getting the *real*
one, and then escaping our little jail of QueryInterface interfaces.
In particular, an app is likely to ask for ID3D11Debug then ask for
ID3D11InfoQueue and we want to control use of that ourselves,
particularly when we're tracking debug device messages.
* We handle them mostly as a series of rows, adding only the first row
as a varying name, but incrementing the stride for each to account for
the space taken up by a matrix.
* 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.