Commit Graph

61 Commits

Author SHA1 Message Date
baldurk eb15c43b41 Add Catch.hpp for unit testing, with appveyor hooks 2017-08-29 13:19:44 +01:00
baldurk 00e06d8ff1 Make display rendering colours theme-aware.
* In particular this removes hard-coded checkerboard colours that don't
  look right on dark themes.
2017-08-28 18:50:17 +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 3ab7510c7f Avoid calling XOpenDisplay multiple times, fixes crashes on Intel Mesa
* See https://bugs.freedesktop.org/show_bug.cgi?id=99831
  https://bugs.freedesktop.org/show_bug.cgi?id=54971
* It's not clear if it's invalid to call XOpenDisplay more than once but
  at the very least it's only really used as convenience to avoid
  plumbing the display handle through.
2017-05-30 12:02:00 +01:00
baldurk ae50fa99ee Revamp version tagging, remove ugly suffix on git hash. Refs #571
* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
2017-04-27 19:47:50 +01:00
baldurk 6930841705 Rename ReplayRenderer to ReplayController
* It's not a renderer, it's an interface to controlling the replay and
  any 'renderer' type work actually happens in ReplayOutput.
2017-04-18 14:57:47 +01:00
baldurk a7ab0d9300 Move capture-file handling functions into a single interface
* This allows us to return complex types like byte arrays or pairs of
  status & render handle.
* Also in future more introspection of the capture file will be possible
  and this provides an easy extension to that without adding new entry
  points.
2017-04-18 14:57:47 +01:00
baldurk bc79e2296f Make EnvironmentModification struct and pass around array directly
* The old 'store in opaque void*' is kept as entry point wrappers only
  for the C# UI.
2017-04-18 14:57:47 +01:00
baldurk f6c045f473 Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
2017-04-18 14:57:46 +01:00
baldurk 637d4089e2 Rename colour to color in public API code
* Following the principle of least surprise, color tends to be more
  commonly used in APIs and graphics code even outside the USA.
2017-04-18 14:57:37 +01:00
baldurk 0ad5709df3 Remove poorly chosen 'Fetch' prefix from a few data structures.
* This goes all the way back to the first iterations where these were
  the only structures and 'Fetch' referred to them returning data from
  the core code to the UI.
2017-04-18 14:57:36 +01:00
baldurk bd199ca8e6 Remove declarations for C interface from renderdoc_replay.h header
* The functions are still exported and that's all renderdocui cares for.
* The interface is no longer to be used so gets in the way of the
  generated SWIG bindings.
2017-04-18 14:57:36 +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 747d0550f9 Compile fix - missing rename was mixed in with other changes 2017-03-13 19:06:22 +00:00
baldurk 487a1b7903 Start moving towards C++ only UI code. Assume C++ for the replay API
* The C# P/Invoke stuff doesn't directly use the header, and we are soon
  going to deprecate the C interface entirely.
2017-03-13 17:56:00 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 2a4d2451ff Allow 'promoting' back to capture 64-bit from 32-bit, in 64-bit install
* A 64-bit install has an x86 subfolder to capture 32-bit programs. If
  a 32-bit program then launches a 64-bit program we need to 'promote'
  back to run the original bitness to capture it.
* It's still not supported to capture 64-bit in general from just a
  32-bit install as the support files aren't included.
2016-12-08 19:04:59 +00:00
baldurk c810a96300 Keep debug log the same even when going via cap32for64 2016-12-08 19:04:57 +00:00
baldurk 5286f950ff Add processing to different formats and max size while fetching thumb 2016-11-02 23:39:35 +01:00
baldurk 9f4a60028e Handle injecting environment variable params
* This also fixes the problem of capturing 32-bit programs with 64-bit
  RenderDoc failing to properly insert environment variables and
  error'ing when it tries to do it directly.
2016-09-28 17:55:45 +02:00
baldurk 3693a17c73 Tiny tweak to renderdoccmd usage output 2016-08-25 21:07:40 +02:00
baldurk 90604c6d9c Print custom lines of API support on the version string of renderdoccmd
* An easy way to check what support is compiled into this binary.
2016-08-25 21:07:40 +02:00
baldurk 6819f22181 Tweak aliases for help/version to cover a couple of more cases 2016-08-25 21:07:40 +02:00
baldurk 5393d939fd Fix crash if replay renderer doesn't create 2016-08-25 21:07:40 +02:00
baldurk b5e6f8bef2 Allow specifying environment variable modifications
* This works for local and remote invocations of programs, but is mostly
  useful on unix systems (Windows programs use env vars less often)
2016-08-19 17:26:33 +02:00
baldurk d63e3b89ad Add support for copying files back from remote server 2016-08-19 17:26:24 +02:00
baldurk f8b3fd3e1e Update renderdoccmd for new remote server code, add daemonise for server 2016-08-19 17:26:08 +02:00
baldurk 481a28dc29 Rename RemoteAccess to TargetControl to better disambiguate RemoteServer 2016-08-19 12:23:19 +02:00
baldurk 39f453b166 Rename replay host to remote server, consistently. 2016-08-01 19:38:21 +02:00
baldurk 240bdc3156 [Coverity] Catch any C++ exceptions from cmdline and just bail instantly 2016-07-20 16:15:40 +02:00
baldurk 95e00d58bf Add SIGINT signal handler on linux to cleanly shutdown replay host 2016-07-13 17:55:47 +02:00
baldurk 90f6a9da20 Remove old code 2016-07-12 17:39:24 +02:00
baldurk e66794018c Implement cap32for64 internal command 2016-07-12 17:39:24 +02:00
baldurk ced8a62af6 Add replay command (with optional remote replay) 2016-07-12 17:39:23 +02:00
baldurk 884c201aff Add replay host command 2016-07-12 17:39:23 +02:00
baldurk aaa2bd1d7d Check for help in one place rather than every command 2016-07-12 17:39:22 +02:00
baldurk 67337b390d Implement capture and inject commands 2016-07-12 17:39:22 +02:00
baldurk 2970f49754 Process capture options common to all capturing commands 2016-07-12 17:10:43 +02:00
baldurk 1cb11daf85 Switch base renderdoccmd to dispatch to commands, doing arg parsing 2016-07-12 17:10:43 +02:00
baldurk b74b833121 Switch renderdoccmd to use vector<string> for passing args 2016-07-12 11:22:51 +02:00
baldurk 758933bb73 Set most texture display properties before searching texture list 2016-07-10 18:09:58 +02:00
baldurk 5f28b745a2 Format code according to newly added clang-format
_  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |repository history||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
baldurk d98c29b1d5 [Coverity] Fix some duplicate defects that I didn't notice 2016-05-01 15:24:39 +02:00
baldurk faa385647d [Coverity] Fix some possible NULL-pointer dereferences 2016-05-01 14:40:02 +02:00
Michael Vance 8b1794456d Switch RENDERDOC_PLATFORM to RENDERDOC_PLATFORM_<PLAT>.
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.
2016-04-15 13:59:59 -04:00
baldurk 70b99a4412 Remove antiquated 'multiple frames in one capture' support.
* Cleans up the code a bunch, this support is unlikely to ever return
  and if it does it will need a rethink anyway.
2016-04-13 00:28:09 +02:00
baldurk 2e0ffa7813 Batch update copyright years everywhere 2016-02-07 18:50:45 +01:00
baldurk 290b695a6b Linux compile fixes 2016-02-07 18:49:33 +01:00
baldurk c1be165f49 Fix not calling c_str() in varargs parameter 2016-02-07 18:46:44 +01:00
baldurk fb5f74ec74 Add function to dump thumbnail from a capture 2016-02-07 18:45:36 +01:00