Commit Graph

18 Commits

Author SHA1 Message Date
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 9134ccdebd Include git commit hash in capture version header 2019-03-13 11:48:56 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk d1f25eea0f Add extended thumbnail handling into XML codec 2018-12-17 17:10:35 +00:00
akharlamov a1a0b1a7ec Add ability to save .rdc file thumbnail in formats other than JPEG
By default RenderDoc saves captured frame thumbnail image as JPEG which
is lossy compression and makes it difficult to use as a reference image
for testing. Added an option to save thumbnails in different formats.

In order not to change the binary serialization format of .rdc files, if
the thumbnail format is not JPEG, a default JPEG thumbnail is still
saved in the file header as before, while the actual thumbnail is saved
as an additional chunk in the binary sections list. Older versions of
RenderDoc will just ignore this section and still use the legacy JPEG
thumbnail.

Change-Id: Icbf4fbd629719b49868fb785a656f6c7c9946ef9
2018-11-14 18:32:07 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 184e5c7f8d Change RDCDriver to enum class, don't manually stringify anywhere 2017-12-29 18:30:35 +00:00
baldurk 6f0756c6dd When trying to find a section by name, try known sections names
* In theory all sections of a known type should be written with their
  proper normalised name, but just in case a capture is a bit misformed
  let's try to look it up by type.
2017-12-20 18:01:20 +00:00
baldurk 0c1d602c37 Use ToStr not an internal array for fixed section names 2017-12-20 18:01:20 +00:00
baldurk 910466ae41 Don't keep RDCFile file handle open in read-write mode when not writing 2017-12-13 22:02:05 +00:00
baldurk b418a5db6a Flush file after writing header length fixups, to ensure it's written 2017-11-27 12:38:44 +00:00
baldurk 01e2e00b5f Add error checking and handling while loading captures
* Previously once we started loading a capture we'd blindly continue
  until we loaded it (and then it's assumed to be successful), or we
  crash.
* Now errors can be reported during serialisation and bubbled up to
  abort the file load process. The next steps are to add error checking
  in each function serialise before doing any replay calls to the API
  with potentially corrupt data, and on top of that catching API-only
  errors when the serialisation is (seemingly) fine, and propagating
  those in a reasonable way.
* We also harden the serialisation a bit so that if it reads an
  obviously invalid byte length for a buffer or array count, it won't
  continue. It's still not perfect as the sizes could still be large and
  invalid but within range, but it should catch the worst cases.
2017-11-24 18:14:21 +00:00
baldurk 016bc29609 Add a tool menu item that will recompress a capture file 2017-11-17 16:33:05 +00:00
baldurk a238d3022a Move section data types into the public replay interface 2017-11-17 16:31:00 +00:00
baldurk 0b899d90b6 Add ability to replace sections in RDCFile 2017-11-17 16:30:59 +00:00
baldurk 13f4ac481e Fix incorrect arguments to error printf 2017-11-09 15:11:20 +00:00
baldurk 8a937a25d3 More errno.h fixes for OS X
* Because apparently the compiler isn't capable of giving more than one
  error at once :(.
2017-11-04 10:04:01 +00:00
baldurk f147ece4c6 Add separate handling for new RDC container format
* The new serialiser system will not handle the container file itself,
  so we've separated it out to deal in sections and stream I/O to read
  from and write to sections.
* We also add the ability to choose the compression scheme for a section
  instead of always using LZ4. LZ4 will still be used on the fly for
  fast write performance, but then RDC files can be re-compressed for
  savings offline.
2017-11-03 16:32:03 +00:00