Commit Graph
98 Commits
Author SHA1 Message Date
baldurk 2237c241ff Fix incorrectly named methods in ResourceFormat
* We try to maintain at least an internally consistent naming scheme for the
  python/public interface, even if it doesn't match python naming schemes.
2019-01-03 12:22:29 +00:00
baldurk 92f48ea54b Implement ID3D11Multithread support for automatic locking
* Unfortunately ID3D11Multithread::SetMultithreadProtected adds an auto-locking
  thread safe mode for all D3D functions, so we have to add a check for it and a
  lock to every context function. This will add a small amount of overhead even
  when the mode isn't enabled, but it shouldn't be significant.
2018-12-12 23:53:15 +00:00
baldurk 68b23c5f62 Add support for YUV resource formats
* We handle 4:4:4, 4:2:2, and 4:2:0, with packed, 2-plane and 3-plane formats,
  for 8, 10, 12, and 16 bit depths.
* This covers most common formats but still leaves a few out - NV11, palettised
  formats, V208/V408 JPG formats.
2018-12-11 19:57:20 +00:00
baldurk 2411ce70ea Add flags to ResourceFormat to replace bgraOrder/srgbCorrected
* Allows for future expansion as well
2018-12-11 19:57:20 +00:00
baldurk 5b07a48479 Switch android build to use NDK-provided cmake file
* The existing android cmake file doesn't work with newer NDK releases, so we
  have to use the provided cmake file. It should work in NDKs as far back as
  version 14.
2018-09-25 15:09:54 +01:00
baldurk d8294d8a88 Use linked-list & spinlock to avoid non-safe functions. Closes #1102
* Most functions - including pthreads, malloc, free, etc are not safe to use in
  signal handlers. So we use a simple spin-lock and manual linked-list to manage
  our list of PIDs to wait on.
2018-09-17 15:58:10 +01:00
Oliver Fallows 13375dc722 Use free stack for wrapped pools 2018-08-01 18:58:16 +01:00
baldurk 34e174179a Fix FindDiffRange() check of final non-vector-sized bytes 2018-06-25 18:14:05 +01:00
baldurk de969105d4 Add R/W lock to OS-specific wrapper 2018-06-13 09:17:03 +01:00
baldurk 112cebb2ec Fail if we don't support any extensions required by a vulkan capture 2018-03-05 10:09:58 +00:00
baldurk ec7b2807d0 Build each architecture into its own APK
* This means we can have all the architectures we care about installed,
  and load the right library regardless of what the app does.
2018-01-26 21:19:16 +00:00
baldurk a019797f88 Move vulkan layer name and android library filename to global defines 2018-01-26 21:19:13 +00:00
baldurk 67835c4d54 Split shader caching and text rendering out of debug manager classes 2018-01-16 16:29:36 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 43d561a4c0 Fix NULL checking and NULL dereferencing issues
* Reported by Coverity Scan - most of these are not an issue and a
  couple of them are coverity getting really confused (like seeing a
  pointer being assigned to NULL and a count to 0, then a few lines
  later declaring that a loop 0..count will dereference the pointer).
* However it's harmless in all cases to add a bit of robustness to keep
  the analysis happy.
2017-11-22 19:11:21 +00:00
baldurk 9e5cfa8b96 Add safety to satisfy Coverity on some errors that are likely impossible
* Reported by Coverity Scan
2017-11-22 19:11:14 +00:00
baldurk 327fda94a0 Add refactored serialisation system
* The new system contains the ability to export serialised data to a
  structured form in memory - and conversion back to serialised bytes.
* This will allow offline transformations/visualisation of capture files
  as well as more rich representations of API calls in the UI.
* Likewise it enables a number of optimisations such as the ability to
  write straight from mapped API memory to disk via a compressor,
  without any intermediate copies.
2017-11-07 19:30:32 +00:00
baldurk 3aa3262089 Expose ToStr interface publicly, split out into separate files
* Note that while this is public and uses std::string, because it's a
  template with specialisations in a .inl the string never crosses a
  module boundary - each including module has its own implementation.
* This will be used as part of the upcoming serialisation refactor.
* Some POD structs are still given ToStr implementations as we haven't
  yet switched over the serialisation system to expect all structs to
  have serialise functions.
2017-11-03 16:23:02 +00:00
baldurk 834edf0dc2 Add a microsecond timer from the start of the process 2017-11-03 16:22:59 +00:00
baldurk 9ef0c5282c Make aligned buffer allocation a common function, out of serialiser 2017-11-03 16:15:19 +00:00
baldurk 276783b948 Move custom printf & string_utils out of serialise/ folder 2017-11-03 16:07:46 +00:00
baldurk 5e59616a8c Update rdctype::array to have a more stl-like mutable interface
* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
2017-11-03 16:01:58 +00:00
baldurk 05c87778ea Fix native-newline printing to print atomically
* With the log append setup, printing lines and newlines separately can
  lead to them being interleaved between multiple processes writing to
  the same log.
* This way the lines in a print could still be scattered, but without
  over-allocating to modify newlines in place (which would be more
  expensive too) this can't be fixed, and both multi-line prints and
  multiple processes writing a lot of log prints are rare.
2017-09-26 12:15:51 +01:00
baldurk 6ec2aa55a0 Change logging to use native line-endings - i.e. CRLF on windows
* This means even if notepad is associated with .log files, it will look
  correct, since notepad can't hand LF line-endings :(.
2017-09-19 17:28:11 +01:00
baldurk eb15c43b41 Add Catch.hpp for unit testing, with appveyor hooks 2017-08-29 13:19:44 +01:00
baldurk 40a0272a3e Remove use of bool32 replay API type&optimise mem layout in some structs 2017-08-24 10:44:45 +01:00
baldurk e85c8d19bf Combine 'special' with 'specialFormat' as single resource format type
* There was no good reason to have a flag indicating if the special
  format was valid or not. Now it's a single enum, with a value
  'Regular' indicating that the compCount/compWidth/compType fully
  describe the format itself.
* This makes code patterns easier as you no longer need to check for
  special then check for specialFormat, you can just test the type
  directly.
2017-08-24 10:37:16 +01:00
baldurk fdf04cae39 Print better error messages for failures to save textures to disk 2017-06-02 17:59:57 +01:00
baldurk b94d13b838 Make sure linux log files don't get deleted while still logging to them
* We need to use file locks to ensure the last process knows it can
  delete the log, as well as delete any inherited file descriptors when
  forking to launch a new executable.
* To accomplish this, tracking the single logfile handle is now part of
  the OS-specific code instead of common logging code. It makes little
  difference either way as we don't support multiple log files.
2017-05-17 19:41:39 +01:00
baldurk 142d3d11ad Compile fix for OS X - add overload for size_t 2017-04-19 19:48:22 +01:00
baldurk 83f769a2cd Document the enums in replay_enums.h 2017-04-18 14:57:44 +01:00
baldurk bfa1153a40 Handle prints of lines over 4k characters 2017-04-18 14:57:41 +01:00
baldurk d94f387399 Refactor bucketing code a little to use a record type enum 2017-04-18 14:57:37 +01:00
baldurk d40fc8471d Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also
  reflects better for SWIG bindings. Overall it's a minor change but
  better.
* We don't update the C# UI at all, since it's soon to be removed and
  not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
  that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
  python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
baldurk eb5ae4a1bf Fix macro for pool name in assert 2017-02-24 14:01:29 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 5c280ee2ed Print the name of the type in pool errors 2016-11-18 16:51:28 +01:00
baldurk 8d0915401f Unify feature macro handling 2016-11-07 18:14:49 +01:00
baldurk 8f4a55a3b5 Set all processes under a given UI instance to log to the same file.
* Using OS-specific append writing functions instead of simple fopen/
  fwrite/fclose we can guarantee that multiple processes writing to the
  same log file won't trash or interleave their log output.
* To make the logs readable the PID is now included along with the
  project/timestamp.
* After that, we make sure that when we launch a program we set the
  output log to the same file as the parent UI. This keeps all the logs
  together and removes user confusion over which logfile is needed.
* We also move all of RenderDoc's temporary files under a RenderDoc
  folder in the temp folder, instead of scattering the files in the root
2016-11-02 23:37:38 +01:00
Balazs Torok 12e5a9a316 basic implementation for Direct3D9 and Direct3DDevice9 2016-10-12 18:04:10 +02:00
baldurk bfac4adfb8 Expose full logging to UI layer, pipe Qt messages etc into main logs 2016-10-07 15:58:45 +02:00
James Fulop dd55043527 add lerp macro 2016-09-30 10:51:56 +02:00
baldurk a9e4396655 Fix compile error that somehow doesn't trigger on VS 2016-09-28 13:55:24 +02:00
Michael Rennie ab71450fb0 Add offset to Android network ports, to differentiate from localhost.
This requires adb forward to include the offset, for example:
adb forward tcp:38970 tcp:38920
adb forward tcp:39970 tcp:39920
2016-09-15 13:42:05 +01:00
baldurk ced197abe3 Only enable stdout/stderr log output after main initialisation
* This suppresses lines like "RenderDoc v0.31 x64 (...) loaded in replay
  application" which are only useful for the logfile and not for actual
  user output.
2016-08-25 21:07:40 +02:00
baldurk 8183c0d2ac Better handling of BGRA8 dds saving and loading 2016-08-19 17:36:36 +02:00
baldurk 481a28dc29 Rename RemoteAccess to TargetControl to better disambiguate RemoteServer 2016-08-19 12:23:19 +02:00
baldurk e81895b060 [Coverity] Remove use of rand() now SetFrameEvent takes 'bool force'
* I honestly can't figure out how to tell Coverity that rand() use isn't
  a security flaw, but it's on longer needed so...
2016-07-20 16:01:48 +02:00
baldurk 0c55e9374c For platforms printing to stdout/stderr, skip debug msgs & long prefix 2016-07-13 17:55:21 +02:00
baldurk 504b18ab3f D32S8 type formats are 8 bytes per pixel, not 5. 2016-07-13 15:52:19 +02:00