Commit Graph

131 Commits

Author SHA1 Message Date
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
baldurk 7c1164e060 Tidy up and implement support for self capture on linux 2023-07-31 15:45:32 +01:00
baldurk 0f851df6c2 Batch prepare and allow limited buffering for vulkan initial states
* We add a capture option that defines a soft limit we aim to keep under for
  memory overhead during capture, excess initial states after that will be
  stored temporarily on disk.
2023-06-02 18:53:45 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk 3f9bf1ab27 Fix crash handler not launching as expected in official builds 2022-11-01 16:33:37 +00:00
Jake Turner 8c37978212 Fix "-Wshorten-64-to-32" error with ftell() use
ftell() returns a long not an int
2022-07-21 11:49:49 +01:00
baldurk 8aa0390948 Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a
  way of specifying a message to return with it. This message can be displayed
  to the user to give more information or context about an error.
2022-04-26 16:21:54 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk 99adcc614f Allow multiple remote servers on one hostname, on different ports
* When a port is specified (with the usual :12345 suffix on the hostname) we use
  that for remote replay connections. We disable target control enumeration
  since that requires a port _range_ and captured applications self-assign those
  ports. Those can still be accessed via a normal unsuffixed remote specifier -
  even if there is no remote server running on the default port.
2022-02-15 17:15:48 +00:00
baldurk 7149302680 Rename 'draw' or 'drawcall' to action
* There's not a good accepted terminology for this kind of event, and for
  historical reasons 'drawcall' has been the accepted term, even though
  that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
  $draw() includes draws and dispatches, but $dispatch() only includes
  dispatches, it's hard to intuitively understand why $draw() matches all
  of these calls.
* As a result we've defined the term 'action' to cover these types of
  events in the same way that we defined 'event' in the first place to
  mean a single atomic API call.
2021-07-01 15:15:05 +01:00
sebastianpick 329b092cfb Fixed user level registration of vulkan layers.
Corrected a conditional that incorrectly checked for the inverse of the expected condition.
2021-02-18 15:41:31 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk e5f4ca7bb8 Remove use of const char * in public API and OS specific where possible
* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
2020-12-07 17:44:50 +00:00
Alberto Fernández d5c83c76a0 Fix incomplete command help text 2020-05-28 15:54:14 +01:00
baldurk a8071679bd Fix renderdoccmd commands 2020-01-30 14:21:32 +00:00
baldurk b38cbc1b0c Add explicit functions to initialise and shutdown replay. Closes #1685
* It's required for replay applications to call InitialiseReplay() before doing
  any work, and to call ShutdownReplay() once they're finished.
* This lets us do more heavyweight shutdown work before global destructors are
  being invoked and the RenderDoc instance is being destroyed.
* Anything that needs to be shut down during capture still has to happen in
  RenderDoc::~RenderDoc since we obviously can't get the application to call a
  shutdown function in that situation.
2020-01-30 13:39:15 +00:00
baldurk baac06ca93 Remove redundant/dead code identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk 42841e23be Expose vulkan layer registration in renderdoccmd on win32. Closes #1690
* This is needed so that the functional tests can elevate and run renderdoccmd
  to register the vulkan layer, if needed.
* At the same time remove the old spammy message and ignore flag - this dates
  back to before the UI existed, and that should be the way users run RenderDoc
  generally and it has a good UI for walking through layer registration if
  needed.
* The command is always available, but will only show up in help if attention is
  needed.
* Also fix registering installs on shared drives.
2020-01-20 11:46:48 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 14d01ff995 Remove support for serialising STL types, remove STL interop 2019-12-16 18:10:32 +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 397ea679f5 Handle the present call being within markers 2019-12-02 13:13:59 +00:00
baldurk 6e6c7bac62 Fix old terminology in renderdoccmd documentation 2019-12-02 13:08:19 +00:00
baldurk 8db0811678 Don't include ostream in rdcstr.h
* It's only needed for renderdoccmd and catch tests, so define it locally where
  needed.
2019-12-02 11:15:07 +00:00
baldurk db563bb0bf Refactor public interface around handling of textures
* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
2019-11-26 17:38:25 +00:00
baldurk 01344c7e83 Rename typeHint to typeCast 2019-11-26 17:38:25 +00:00
baldurk e6627542cf Don't enumerate available GPUs when running in renderdoccmd 2019-11-26 17:38:25 +00:00
baldurk 7e08bf6573 Filter the list of formats listed in 'convert' help. Closes #1590
* Only formats that support opening should be listed under the help for --input-
  format.
2019-11-12 20:44:34 +00:00
baldurk 20be9f3d52 Add ReplayOptions struct to contain replay-time configuration
* Not currently exposed to the UI or used by the drivers, we just pass the
  default object through
2019-08-27 18:51:56 +01:00
baldurk e2704fa2eb Add an abstracted interface around android-specific handling
* This makes it easier to use the same kind of interface to manage other kinds
  of devices.
2019-07-31 17:51:13 +01:00
baldurk 38f0d27901 Use configure_file in CMake to force rebuild if git commit changes
* We also only use GIT_COMMIT_HASH where necessary to avoid rebuilding many
  files for no reason, including splitting version.cpp out into a separate
  project as we do with VS since otherwise changing its preprocessor defines
  rebuilds the whole renderdoc project.
* At the same time, move the git hash to be internal only so we don't have to
  try to link version.cpp into other projects like renderdoccmd or qrenderdoc.
2019-06-20 19:14:14 +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 1713dcad1b Fix typo in python version macro use in renderdoccmd 2019-02-15 18:17:34 +00:00
baldurk 34a97482dd Add helper shortcut to 'renderdoccmd test' to run functional tests
* This invokes run_tests.py with any arguments but specifies the renderdoc
  module and python module paths automatically. Only works if built within the
  project repo itself as otherwise it won't locate the test script
2019-02-14 15:45:22 +00:00
baldurk 0753793f24 Allow passing --help or -t to test commands in renderdoccmd
* Previously it would be swallowed and processed as the argument to the test
  command itself. We need to do a little manual parsing and stop cmdline from
  doing too much work.
2019-02-14 13:17:19 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk f75b5e235e Change verify map writes capture option to verify buffer access.
* This option will now toggle on the behaviour to fill undefined buffer contents
  with a marker value, both if they're created without data (it will be zero
  filled instead) or mapped with discard (it will keep the old contents
  instead).
* There were too many hard to find problems or misconceptions about the buffer
  filling for it to be useful. Now it will be opt-in instead.
2018-11-23 11:25:39 +00:00
baldurk 1c05c5e5d1 Add option to renderdoccmd replay to specify a loop count 2018-10-02 16:23:40 +01:00
baldurk 6ec402e370 rename logfile -> capturefile parameter on execute, document for python 2018-09-18 18:05:39 +01:00
baldurk 851a88133a Remove the 'save all initials' option. Behave as if it's always enabled
* This option has always been a mixed bag - when originally written captures
  weren't compressed at all so saving the cost of a initial contents on a
  gbuffer would have a significant savings.
* Now with compression the savings are lesser, and it's a source of
  bugs/confusion for the case where either a bug is caused by leaking data from
  the previous frame or worse still the contents are discarded incorrectly.
* D3D11 will now behave as the other APIs will - saving initial contents
  whenever needed even if they seem like they might not be used.
2018-05-23 16:08:44 +01:00
baldurk d8a64c4172 Fix compilation on GCC 8. Closes #984 2018-05-15 19:44:17 +01:00
baldurk b4878bf4e9 Fix auto-detection and manual specification of conversion formats on CLI 2018-04-05 17:51:40 +01:00
baldurk 0e31ab4b07 Be explicit about the identifier that needs to be passed to 'convert' 2018-03-03 16:43:15 +00:00
baldurk 13c1cf6ad4 Return ReplayStatus when launching/injecting, use to indicate JDWP error
* If android studio or other android tools are open when a package is
  launched for debugging, they greedily jump on it and connect which
  prevents us from connecting.
2018-02-20 11:54:57 +00:00
baldurk 934800793a Improve workflow for capture import/export
* If the export doesn't need buffers, we export directly from the loaded
  capture file instead of re-loading it.
* Add progress bars for the load step so it shows what's happening
  instead of looking stalled.
* Reduce compression rate on XML+ZIP buffers as it took too long trying
  to compress when exporting large captures.
2018-02-19 00:52:13 +00:00
baldurk 468c6c1e80 Wrap up CaptureOptions encoding via string into member util functions 2018-02-14 19:21:55 +00:00
baldurk dea21b20a0 Remove global GIT_COMMIT_HASH define, use GitVersionHash global var
* On windows, the change in a global GIT_COMMIT_HASH define in each
  project needing it meant a full rebuild every time the commit changed.
* Ideally we'd set the define only on one file in each project, but
  MSBuild doesn't seem to support that. Instead we make a new tiny
  project that compiles a single cpp exporting a global var, and
  reference that global var in each other project.
2018-01-16 20:17:53 +00:00