Commit Graph
210 Commits
Author SHA1 Message Date
baldurk ec6627af03 Use our own isinf/isnan over compiler provided ones that are unreliable
* Due to standards nonsense the availability of isinf/isnan in C++ is quite
  complex and varies a lot between compilers. Trying to access them reliably is
  quite brittle and they're easy to implement with bit-inspection of float
  patterns, so we do that instead.
2020-07-14 13:24:36 +01:00
baldurk 05c48b44a1 Handle unknown pNext structs more gracefully in serialisation
* It's illegal for an application to pass an unknown pNext struct since they
  must correspond to enabled extensions and we disallow all unsupported
  extensions.
* Rather than crashing or corrupting the serialisation though we strip and don't
  serialise the extension struct. This may or may not succeed but the
  application is already in undefined territory.
* When we encounter an unsupported extension on replay this cannot be handled
  since we don't know how to skip its serialisation. This becomes a fatal error.
2020-07-01 18:09:24 +01:00
baldurk e2757ac7f4 Fix old reference to m_InternalElement as bool 2020-06-03 18:41:11 +01:00
baldurk 4f227e25b8 Add config setting to hide descriptor initial contents
* The structured data for these can get unreasonably large when there are a lot
  of descriptors.
2020-05-22 15:06:14 +01:00
Arvastra 482114f6f4 Display Thumbnails for dds files. 2020-03-19 17:16:01 +00:00
baldurk d408f77241 Add configuration system for core renderdoc module
* This allows persistent config storage and registering tweak variables that
  works independent of the UI's configuration.
* Config vars can be debug only, which means they will be compiled out in stable
  version releases. This allows for debug-logging tweaks that are available in
  all builds (including nightly builds) for diagnostic purposes, but have zero
  overhead in stable releases.
* Variables have a loose hierarchy defined with _ or . to separate nodes.
2020-03-18 17:34:59 +00:00
baldurk fb3563fb52 32-bit compile fix 2020-03-17 10:15:01 +00:00
baldurk 6e106d4c6c Stream large buffers directly when reading
* This prevents us resizing our read-window to a large size only to read then
  memcpy into place.
2020-03-16 20:01:47 +00:00
baldurk 4dde584415 Make compression tests a bit more lenient for reduced efficiency 2020-03-13 19:16:28 +00:00
baldurk 2375754a8a Increase LZ4 compression acceleration value to 20
* This has minimal effect on compression ratio for a sample workload and a good
  improvement in compression speed.
2020-03-13 13:07:26 +00:00
baldurk 3174ab0db8 Update LZ4 to v1.9.2 2020-03-13 13:06:51 +00:00
baldurk 9f309be350 Print compression percentage when writing RDC files 2020-03-13 12:46:24 +00:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk d3cbc6aadb Handle invalid filenames passed to CopyCaptureToRemote 2020-02-05 14:15:10 +00:00
baldurk 68b9d223b0 Add explicit comparisons where we were implicitly checking for non-zero
* This fixes some warnings from PVS Studio, though none of these checks were
  actually wrong it's better to be explicit.
2020-01-21 18:28:56 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 05a70164f6 Remove use of legacy StringFormat::snprintf variants 2019-12-16 18:10:32 +00:00
baldurk 14d01ff995 Remove support for serialising STL types, remove STL interop 2019-12-16 18:10:32 +00:00
baldurk bd9f4fc389 Remove use of vector/string from core project
* This also affects the drivers via interfaces e.g. IReplayDriver and some
  utility functions.
2019-12-16 18:10:31 +00:00
baldurk c4ca8cb1d1 Reduce reliance on big public headers where possible
* Mostly moving includes from common headers to cpp where possible, and removing
  includes of the whole thing where only enums or rdcstr etc are needed.
2019-12-16 17:06:16 +00:00
baldurk f68645bddc Reduce dependencies pulled in by common.h 2019-12-16 17:06:16 +00:00
baldurk 5f72b9d53c Remove std::string/std::vector use from os-specific layer 2019-12-16 17:06:15 +00:00
baldurk 2bce39a279 Fix memory leak importing zip.xml files 2019-12-16 17:04:54 +00:00
baldurk 6d1d302491 Fix a number of warnings identified by higher clang warning levels
* We enable a couple of high signal-to-noise warnings in all clang builds
2019-12-02 20:41:28 +00:00
baldurk ff08748238 Ensure all files have trailing new-lines and enforce with clang warning 2019-12-02 20:28:05 +00:00
baldurk 18a85eed3d Don't allocate memory for arrays when structured serialising 2019-11-29 13:53:45 +00:00
baldurk 14bc99947c Add a debug-only mode to log everything going through a serialiser
* We also allow structured export on write, again in debug builds only
2019-10-29 18:08:33 +00:00
baldurk 2f82e3a23a Tweak SERIALISE_ELEMENT_ARRAY to allow chained properties
* E.g. SERIALISE_ELEMENT_ARRAY(foo, bar).Named("foo_real");
2019-10-11 13:07:36 +01:00
baldurk ae0c745656 Don't clear important data when using StructuredSerialiser 2019-10-10 16:48:42 +01:00
baldurk 0e1c20342e Try to handle invalid callstack sizes in serialisation without crashing 2019-09-19 11:47:11 +01:00
baldurk e48065c96b Replace use of std::pair with rdcpair wherever possible
* Only remaining uses in our code is when we're interacting with std::map where
  it uses std::pair internally
2019-05-17 16:32:56 +01:00
baldurk a965a3a703 Remove 'using std::string'
* This will make it easier to replace std::string with rdcstr in future
2019-05-17 16:32:56 +01:00
baldurk 699f8753af Convert ToStr, Serialise, and TypeName to use literal strings 2019-05-15 14:12:17 +01:00
baldurk 8e2b608975 Snapshot descriptor set Resource IDs when preparing initial states
* If we only copy the slot contents without converting Vk* handles to IDs then
  we run the risk that the resource will be deleted and re-allocated mid frame
  before we do that at serialise time.
* Instead we fetch IDs immediately and serialise as IDs, then look up the
  handles on replay
2019-05-14 17:13:22 +01:00
Alex Vakulenko ca2307e34c Make it possible to write chunks larger than 4 GB
Added a special chunk flag indicating that chunk size is a 64 bit value.
This allows to handle larger chunks (which heppens quite rarely) while
still maintaining backward compatibility with the majority of traces.

Bumped RDC file version of 0x101 (1.1) to make sure older version cannot
read the new file format.
2019-05-10 10:25:26 -07:00
baldurk ac7801b738 extended_thumbnail section in xml format can be in between sections 2019-05-02 10:27:41 +01:00
baldurk 636b27549d Enable support for EXT_descriptor_indexing. Closes #1111 2019-04-05 09:19:22 +01:00
baldurk 9134ccdebd Include git commit hash in capture version header 2019-03-13 11:48:56 +00:00
baldurk 4327f32667 Deserialise arrays of complex structures 2019-03-01 15:46:49 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 5854810fd4 Make timeouts in tests more forgiving for CI that occasionally fails 2019-02-01 18:32:11 +00:00
baldurk d64ad19f16 Add an optional timeout to Socket::AcceptClient
* This is needed since sometimes on tests a localhost socket won't immediately
  be available to accept()
2019-01-17 17:51:07 +00:00
baldurk b1f3515090 Differentiate chunks with empty callstacks from those without callstacks
* This is a minor distinction but helps ensure that conversions to/from other
  formats are binary identical.
2019-01-10 13:54:04 +00:00
baldurk 2e9635ff63 Add tests of stringification 2019-01-10 11:51:16 +00:00
akharlamov 04ca50ba63 Adding utility code for VK code generator.
ExtObject extends the SDObject structure with helper
methods.
Intervals are used for memory region tracking.

Change-Id: I38198c0a096ed838d527b6526216fb28326ebc89
2019-01-10 09:48:33 +00:00
baldurk 22f8b2ac79 Specify original Vk*Flags in structured data instead of coerced FlagBits
* We coerce the type to the FlagBits enum for serialisation so the
  stringification picks up the bits properly. However the variable is properly
  typed as just 'Flags' which is a uint32_t typedef, so manually specify its
  typename afterwards.
2019-01-09 16:27:14 +00:00
baldurk 1aa1abdf45 Don't lose base thumbnail when converting from zip.xml 2019-01-03 12:22:29 +00:00
baldurk 09207c5de0 Set structured serialisers as streaming mode
* This means that checks for array sizes won't check against an empty input
  buffer and fail.
2019-01-03 12:22:28 +00:00
baldurk d1f25eea0f Add extended thumbnail handling into XML codec 2018-12-17 17:10:35 +00:00
baldurk bba5e6ee5e Handle PNG thumbnails in XML codec (and Raw, just in case) 2018-12-07 18:19:58 +00:00