Commit Graph
67 Commits
Author SHA1 Message Date
baldurk 726425ee88 Keep chunk count valid with duplicated chunks 2016-09-08 15:50:36 +02:00
baldurk 78ef96b2e7 Set up capturing to flatten/deinterleave deferred context recording 2016-09-05 20:12:40 +02:00
Michael Rennie 0ab8627353 Fix deserialising uint64_t on 32bit ARM device. 2016-08-31 18:06:04 +01:00
baldurk d2faf76356 Save machine ident in captures and compare to machine ident on open
* If the machine idents differ in significant ways that we'd consider
  it to be a different platform (currently just OS), and if so mark it
  as supported but suggested to be replayed remotely.
2016-08-19 17:26:36 +02:00
baldurk a3c616bdff Expand ~ in application name and working directory 2016-08-02 14:41:29 +02:00
baldurk a3f61d0680 [Coverity] Add paranoia protection around left-shift in double printing 2016-07-20 16:58:52 +02:00
baldurk 6545625874 [Coverity] Fix a bunch of partially-initialised structure warnings 2016-07-20 16:45:06 +02:00
baldurk 80bdfe6058 Fix errors and leaks found by valgrind on linux replay host
* These are some leaks, some mismatched new/deletes and some uninit'd
  values. Mostly the leaks are what we care about so that the replay
  host can be kept alive for a long time rather than needing to be
  constantly restarted.
* Also added a valgrind suppression file to suppress some of the false
  positives I ran into while testing.
2016-07-14 20:37:32 +02:00
baldurk 9a3c3961dd Remove unused debug lock 2016-07-09 20:39:00 +02:00
baldurk 6c5573ec3b Coverity: Delete allocated section in error case 2016-06-09 13:56:54 -07:00
baldurk c1f66de413 Add early OS X compiling support from @Zorro666 - still non-functional!
* Build with cmake -DENABLE_VULKAN=OFF -DENABLE_QRENDERDOC=OFF
2016-05-31 12:05:45 +02:00
baldurk 8128dc3102 Fix other type-punning strict aliasing violations. Refs #274 2016-05-29 21:01:57 +02:00
baldurk 5f28b745a2 Format code according to newly added clang-format
_  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |repository history||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
Michael Vance 973ee146a8 Support for a new 'Statistics' pane.
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.
2016-04-11 21:23:05 -04:00
baldurk 7b20c110ac Enable warning level4 with a couple of disabled warnings on all projects
* 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.
2016-04-09 12:43:00 +02:00
baldurk 6550b5eefc Enable warning C4127 - conditional expression is constant 2016-04-09 12:42:59 +02:00
baldurk cda0b4cb5a Enable warning C4189: local variable is initialized but not referenced 2016-04-09 11:24:45 +02:00
Chia-I Wu 69c33da1e7 Include errno.h for errno 2016-03-12 06:29:19 +08:00
baldurk d987423fb9 Linux compile fix - only specialise ToStr on long for windows 2016-03-01 19:32:10 +01:00
baldurk a347b54be4 Add some needed ToStr implementations 2016-02-27 17:51:19 +01:00
baldurk 19a0fc5094 Remove some deprecated code 2016-02-07 18:51:50 +01:00
baldurk 0bdd186550 VS2015 warning fix (shadowed variable) 2016-02-07 18:50:51 +01:00
baldurk 2e0ffa7813 Batch update copyright years everywhere 2016-02-07 18:50:45 +01:00
baldurk 49f81a6499 Move strhash to string_utils.h 2016-02-07 18:48:56 +01:00
baldurk 6bdf285166 Use consistent serialiser pointer 2016-02-07 18:44:58 +01:00
baldurk 24aa8b3daf Remove singleton from VulkanResourceManager, pass it where needed 2016-02-07 18:44:30 +01:00
GregF 38ebce536e Finish move to Deserialise function; remove Deserialise class 2016-02-07 18:43:24 +01:00
GregF c3553d26a9 Create Deserialize function to eventually replace Deserialise class 2016-02-07 18:43:23 +01:00
GregF 33ca020012 Add Deserialise class to deallocate nested Vulkan structs
Currently deallocating VkDeviceCreateInfo and VkPipelineLayoutCreateInfo.
Still more to be done.
2016-02-07 18:43:17 +01:00
baldurk 78fc832722 Don't copy debug string if there's nothing there 2016-02-07 18:42:22 +01:00
baldurk 8b595f5f43 Move serialiser to locally cached variable per-function invocation 2016-02-07 18:42:18 +01:00
baldurk b1cf7d98db Change serialisation to use GetSerialiser() instead of m_pSerialiser 2016-02-07 18:42:17 +01:00
baldurk 65011ebcfa Pass scoped context name/type directly, don't combine into temp string 2016-02-07 18:42:16 +01:00
baldurk 607b8d48c9 Remove 'debug' serialiser that synchronously flushes out debug text 2016-02-07 18:42:15 +01:00
baldurk 7436e83f43 Add custom printf formatter flag to always print at least .0 on floats 2016-02-07 18:42:02 +01:00
baldurk fe414dfc9c Only reset debug text on indent level 0 2016-02-07 18:41:03 +01:00
baldurk 9b0b6ef3b6 Get compiling on win32 (hacks, not final code). 2016-02-07 18:39:30 +01:00
baldurk 1b8d291874 Avoid pointless multiple file passes, now that seeking isn't cheap 2015-09-18 22:37:44 +02:00
baldurk 822a235349 Make sure not to try and use compressed reader for non-compressed logs 2015-09-15 18:52:43 +02:00
baldurk 219bd2d434 Refactor serialisation format with new version
* 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.
2015-09-14 09:25:46 +02:00
baldurk e6621c8956 Don't recreate callstacks, instead re-set stack in consistent instance 2015-09-13 21:20:29 +02:00
baldurk a63c0217dc Tweak empty array debug prints and add newline 2015-09-02 11:38:08 +02:00
baldurk 65dbac28f0 Change array serialisation functions to explicitly be uint32/uint64. 2015-09-02 09:00:00 +02:00
baldurk d2fc251b58 Add a serialise function that calls Serialise on each array element
* Basically for the case where an array element isn't POD and needs
  special handling for serialisation
2015-08-31 17:53:48 +02:00
baldurk b9ba4099ba Rename Serialise() overload that does array to SerialisePODArray()
* To emphasise that it's serialised as a blob of memory, and that
  Serialise isn't called on each member.
* Restore the ToStr()
2015-08-31 17:39:49 +02:00
baldurk 32b028e5a6 If elems count is 0 when reading array, set resulting pointer to NULL 2015-08-31 17:11:16 +02:00
baldurk d643c4bc50 Disable array serialisation since it requires ToStr for elements 2015-08-23 21:44:45 +02:00
baldurk dfd800c0f8 Add serialiser utility functions checking read/write mode externally 2015-08-23 21:44:45 +02:00
baldurk c9877b6d0b Re-jig loading progress bar calculation to be smoother/more informative 2015-07-19 10:57:37 +02:00
baldurk 3dac5fe624 Fix calculation for aligning next serialised buffer. Refs #133 2015-04-28 12:21:36 +02:00