Notes
======
- With no clean way to do string comparisons in the C preprocessor, have a define per-platform. This avoids the clever string concatenation for determining the OS-specic bits, and allows SN-DBS to distribute builds without custom rewrite rules.
- Fix up instances of WIN32, etc., in non-3rdparty sources to refer to this.
- Move the per-platform specific bits into their own subdirs.
Notes
======
- Create a (hopefully) cross-backend performance statistics abstraction as part of FetchFrameInfo. This currently collects statistics about constant buffer binds, sampler binds, resource binds, client and server style resource updates (e.g. Map and UpdateSubresource), index & vertex buffer binds, and draws and dispatches. In my captures this covers approximately half of all API traffic. The rest is often shader sets, and then usual RS, OM, etc., that aren't currently tracked. During READING state parsing on the wrapped device context, record statistics about the calls and store them into the current frame info. We inspect objects occasionally to get things like their type for recording. It may be useful to expand this in the future to check bind types, etc. On the GL/Vulkan backends the stats data is never initialized and we display the same statistics data as before.
- Add a new statistics pane in the UI. A variety of shim arbitration/marshalling is provided to get the statistics data across the managed/native boundary. Removed the old statistics menu item. Currently the statistics pane is just a text log of various gathered data, with ASCII art (woo!) histograms. However in the future we would like to have image based historgrams as well as support for gathering statistics on a mask of stages, etc.
- Remove 'diagnostic' events (e.g. push/pop/marker) from the API call count as it distorts the API:draw call ratio.
- Add _First and _Count to ShaderResourceType and ShaderStageType for weak enumeration (weak due to int cast requirement).
- Provide utility functions Log2Floor for 32 and 64 bit types. These require OS specific clz, which are provided for Windows/VS and Linux/gcc/clang.
TODO
======
- UI toolkit based historgram, ability to set stages enabled for statistics, etc.
- Revisit necessity of gathering statistics across frames--apparently there is no multi-frame capture in a single log anymore?
- Revisit min/max/etc. gathering on the data--is there some way to improve this to not be so mechanical? Perhaps with field enumeration? However if moving to C++/Qt in future, possibly not a good time investment.
* Unused formal parameter remains disabled, but we also disable a
warning about being unable to generate an operator=.
* glslang remains compiled on level 3, since most of the new warnings
aren't easily fixable so would be muted anyway.
* The main motivation for this is because it's convenient to be able
to just assert a simple expression rather than print a proper error
message, but then after the fact you want to know what the value was
(e.g. a return code, or similar).
* On balance I think this does more harm than good. The idea was to make
sure errors don't get ignored when running in profile, but really all
it did was mean people trying to debug renderdoc without much
familiarity got confused as to why things crashed suddenly.
* It's possible to replay with descriptor set slots (and updates)
referring to resources that don't exist at replay time, if those sets
are never actually used in a queue that's submitted and the resource
isn't referenced otherwise. For this reason we need to be able to
skip initial contents or descriptor updates that refer to these
unused resources.
* The main improvement is that instead of just callstack resolving DB
and frame capture data, some arbtirary number of sections can be
included, for e.g. adding notes or saving the bookmarks or whatever
use the user wants.
* Sections (namely the frame capture data) can now be (de)compressed on
I/O, which leads to much smaller file sizes.
* Also the default internal alignment has changed from 16 to 64 to be
more future proof (I decided not to go with completely arbitrary
alignment).
* A path for loading previous version logs remains and will be removed
at some point in the future, maybe a version or two down the line.
* 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!
* The real implementation can do more if it wants, and align to a larger
alignment, but we just return 64 to the program and align to that, which
satisfies the extension minimum requirements (and chances are no program
takes advantage of wider alignment anyway).
* This means that all APIs pass byte string types. ALL strings everywhere
in the entire codebase must be assumed to be and treated as UTF-8 content
not ASCII.
* Gets rid of all the horrible %hs specifiers that caused warnings on
linux! Hooray.
* We convert to wide strings, or use wide characters, only when necessary
to use the Win32 API. Some windows specific code will stay in wide chars
just for convenience.
* Files are already serialised as UTF-8 strings for linux/windows binary
compatibility, so this change doesn't break backwards compatibility.
* It's a little messier as it's easier for the os-specific header to not
define it and get confusing errors, but that's a one-time problem and
having an extra function in a callstack and not showing source at the
point of the RDCBREAK is annoying every time.
This commit changes WrappingPool::IsAlloc to take a const pointer as argument
as pointer isnt modified. ItemPool::IsAlloc is changed to a const function
taking a const poiner as argument.