Commit Graph

69 Commits

Author SHA1 Message Date
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk 966ab0a738 Add command line option to qrenderdoc to run a script with the UI open 2021-11-17 15:52:52 +00:00
baldurk 44db412b8d Speculative workaround for QWidgetPrivate::subtractOpaqueSiblings crash 2021-03-22 18:37:10 +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
baldurk df6fec13f9 Remove use of automodule in docs
* One automodule in a file for our modules is way too much, so we split it into
  files. Unfortunately this means that only one file can have those classes and
  functions be linkable from elsewhere.
* Instead we bite the bullet and manually curate the items into pages, and at
  the same time subdivide the 'enums and data' page more which is a general
  readability and usability win as well.
* We also add some previously not-included functions, and add a doc-build time
  check to ensure that functions and classes aren't omitted from the
  documentation in future
2020-12-07 17:44:50 +00:00
baldurk d55cf930f8 Don't make command line parsing a fatal error 2020-09-04 14:59:17 +01:00
baldurk b5a6796240 Allow qrenderdoc command line python scripts to call sys.exit()
* Previously we'd catch the sys.exit "exception" and print it then show the
  window.
2020-08-31 13:10:38 +01:00
baldurk 3eaaf59319 Prefer floor rounding for Qt 5.14+ fractional DPI handling
* Non-integer DPI handling is fundamentally a broken concept, because UIs are
  essentially pixel art with some vector drawing. Rounding down half fractions
  seems to be a better tradeoff than rounding up or trying to render them as-is.
2020-08-27 13:19:21 +01:00
baldurk 36d74b32b9 Add optional output file for qrenderdoc unit tests 2020-06-11 20:06:43 +01:00
baldurk 8323eb75ee Don't enumerate GPUs while opening crash reporter 2020-03-20 16:16:51 +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 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 9463cdf785 Add better error checks and race condition protection in crash handling 2019-09-16 11:18:30 +01:00
baldurk 6d40bbb783 Add experimental wayland support. Refs #853
* This is only lightly tested and may break heavily. It is disabled by default
 and must be explicitly enabled.
* In particular this is only known to work for Wayland use at capture time.
 Wayland on replay is still unsupported. Known issues include: EGL pbuffer
 surfaces are not implemented on Wayland, Wayland cannot get window dimensions,
 and there are hangs/failures with GL and vulkan presentation with Wayland.
2019-09-02 15:02:27 +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 06f2e61b8f Refactor RemoteHost to be copyable with shared storage
* This allows RemoteHost handles to still be valid and usable (if returning
  empty data) when they are deleted/removed if the device is disconnected, as
  well as providing better multi-thread access (they lock internally)
2019-07-31 17:51:12 +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 ad038ff3e0 Add a log message when running as administrator 2019-05-06 12:25:31 +01:00
Aliya Pazylbekova 14019cf6c7 Modify "qrenderdoc --targetcontrol" command
Modify "qrenderdoc --targetcontrol" to accept hostname or ipv4
address.
2019-03-14 01:23:11 +00:00
Haiyu Zhen ca54a910f5 Add --replayhost command line option for qrenderdoc
This allows users to specify which remote host to connect to on startup.
2019-02-07 23:46:33 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 12e43443ab Shut down adb when closing qrenderdoc if it's our adb
* This has some possible problems - e.g. if one copy of qrenderdoc is closed and
  kills the server used by another copy. However it seems impossible to reliably
  manage adb and we need to ensure we don't leave the process lingering around.
* At the moment 95% of users don't use android, so it's most important that they
  have a smooth experience.
* This was the cause of problems around updating versions because adb.exe would
  hang around and then be 'in use' and not able to be overwritten.
2018-07-26 17:24:27 +01:00
baldurk 94694e0923 Fix processing of --updatedone
* Mark update as not available before starting up and creating main window.
2018-07-24 17:49:32 +01:00
baldurk 70f879ad7a Export AmdPowerXpressRequestHighPerformance to encourage use of dGPU 2018-05-03 15:35:01 +01:00
baldurk 2b64d6dfa7 Add options to change analytics settings after initial prompt
* We are also more explicit in code about disabling the analytics when
  the opt-out is selected.
2018-02-06 00:21:09 +00:00
baldurk 65ef82466c Re-organise Analytics structures a bit to be more processing friendly 2018-01-19 13:57:02 +00:00
baldurk fbb13f0f53 Don't create GUI application to run unit tests 2018-01-17 23:21:03 +00:00
baldurk 56c6fa2d04 Use QCommandLineParser to parse arguments more intelligently. Refs #843 2018-01-17 21:07:03 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 417a811fad Expand docstring checks to also check names of symbols in the interface 2017-12-22 14:41:43 +00:00
David McFarland 7ae6cc3c37 qrenderdoc: fix --targetcontrol 2017-12-20 19:00:29 +01:00
baldurk 0b3d56f9f9 Ensure python global shutdown after context has closed 2017-12-19 17:32:12 +00:00
baldurk 764b39a23c Add update checking system to Qt UI
* This only runs on windows - on other platforms we rely on system
  distribution or user local builds.
2017-12-19 17:31:32 +00:00
baldurk f2e7f8f1a0 Refactor crash/bug reporter system
* The UI dialog is now in Qt. We run qrenderdoc.exe with a very minimal
  startup to display the dialog and send the report.
* The flow has been simplified to have less text and an easier time to
  just click through and send.
* On the first report, the user is gently nudged to enter their email
  address for contact and by default the email is saved for next time.
  They're not nagged more than once about this.
* Optionally the user can select to upload the capture. This is always
  default off, and there is a confirmation dialog making sure the user
  intended to select it.
* After the bug is reported, a unique URL is generated and returned
  which the user can then click back on to see if there's any update. By
  default the UI will also remember the URL and check it every couple
  of days and alert the user in the help menu that there's an update.
2017-12-19 12:26:34 +00:00
baldurk a6ebf09785 Add analytics system - disabled for now
* This is a *very* light-touch analytics system that will track the
  simplest and most anonymous statistics that can be useful in
  determining which features are most used or perhaps underused, and
  where it's best to direct development attention.
* It is entirely implemented in the UI layer, no analytics-gathering
  code exists in the library that's injected into programs, and of
  course no capture data (screenshots, resource contents, shaders, etc
  etc) is transmitted.
* Once it's turned on, it will apply to both development and release
  builds. It tracks stats over a month, and then at the beginning of a
  new month it sends the previous data.
* When the user first starts up a build with analytics if there's no
  previous analytics database then they are informed of the new code and
  asked to approve it. They have the option of selecting to manually
  verify any sent reports, or just opt-ing out entirely.
2017-11-29 19:01:22 +00:00
baldurk e75a468d3c Remove direct include of Code/CaptureContext.h in almost all files
* This is a leftover from before the interface was hoisted out, and most
  windows were still calling directly to CaptureContext instead of via
  the public ICaptureContext interface
2017-11-22 19:11:20 +00:00
baldurk 32a74e20e1 Extract out most code for text-with-ResourceId-links from RDTreeWidget
* The RDTreeWidget items still use this code, but it can now be reused
  on other widgets like RDLabel.
2017-11-21 14:45:22 +00:00
baldurk e6c5c03896 Remove rdctype namespace. Rename rdctype::str -> rdcstr, rdcarray, etc
* Since these types are more prevalent than originally designed, it
  makes more sense to remove the namespace for ease of typing/naming.
* Also add a specialised type 'bytebuf' for an array of bytes.
* This makes mapping easier to SWIG since there's no special casing for
  namespaced arrays. Especially so for nested cases like
  rdctype::array<rdctype::str> -> rdcarray<rdcstr>
2017-11-03 16:04:59 +00:00
baldurk 8c74c92079 Move docstring check from fatal-onstart-hack to unit test run by CI 2017-10-02 15:54:23 +01:00
baldurk 82a0e055ba Change how replay programs are identified, from filename to sym export
* Instead of checking on the filename, we look for a specially named
  exported symbol somewhere in a module that's already loaded.
* This allows us to mark the python module as a replay program, so if
  it's loaded into the python interpreter it will be able to use the
  replay API.
2017-08-31 18:34:19 +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 cfd816d7f3 Enable RDStyle by default, add style selection in the settings dialog 2017-08-16 17:39:37 +01:00
baldurk ee67b85b58 When we hit an exception, pass the line number of the top-of-stack
* This allows us to update the current line highlight before stopping.
2017-08-03 17:57:24 +01:00
baldurk d44528794a Change qrenderdoc icons to Farm-Fresh, to add high-DPI versions. 2017-06-19 16:17:20 +01:00
baldurk 25f18defd4 Use a qt.conf to point plugins at qtplugins/ in the application path.
* We can point the platform plugins path at the application dir for
  qwindows.dll for example, but there's no equivalent for image format
  plugins which we need for qsvg.dll. So instead we shove them all under
  an explicit qtplugins path.
* Also now that we have this, copy qsvg.dll into the distribution.
2017-06-13 14:56:40 +01:00
baldurk 27ae30aaa3 Print messages to Qt logger from command line python scripts 2017-06-09 16:56:47 +01:00
baldurk 0f8e3ce452 Send DeferredDelete events explicitly in our main event loop
* It's not entirely clear if this is the intended fix, but otherwise
  since we're not running QApplication::exec() the main event loop has
  the same 'loop level' of 0 as the event level when it's fired. The
  proper functioning seems to be that the posted deleteLater event
  should have an event level of 1 which then means it will be processed
  when coming back to the exec() loop level of 0, but since we don't get
  that, just run it manually after all other events.
2017-06-01 11:28:36 +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 5b74b66493 Don't construct a QFont globally (as a class static)
* It causes a crash when Qt is statically linked.
2017-05-18 15:05:03 +01:00