Commit Graph

47 Commits

Author SHA1 Message Date
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
baldurk c854294dc8 Add calls to XInitThreads() to allow driver multithreading optimisations 2017-05-05 16:45:29 +01:00
baldurk 0ecc6ca877 Enable QT_NO_CAST_FROM_ASCII & QT_NO_CAST_TO_ASCII
* Added a couple of utility macros to help with the conversion. lit() is
  paired with tr() for untranslated text.
* QFormatStr is more explicitly for non-textual formatting strings.
* Both are just #define'd to QStringLiteral()
2017-05-02 22:58:12 +01:00
baldurk 6f4784d638 Add a command line parameter (--py / --python / --script) to run scripts 2017-04-19 18:03:20 +01:00
baldurk ab41f1ec6a Change python global init/shutdown order to be safe vs running contexts
* If a window (like the PythonShell) owned a context and only stopped it
  on destruction, it would be destructed after the global shutdown
  destroyed the interpreter.
2017-04-18 14:57:49 +01:00
baldurk 094c4164dc Refactor qrenderdoc to provide stable, clean and deliberate API
* Note, this API is still in-flux and beta, so there may still be some
  more changes before it's 'stable', and even then it will still be
  subject to some amount of change.
* This API is then exposed to python via SWIG bindings and hides
  internals that don't need to be visible, and means the actual API is
  easier to work with.
* We also use this API to reduce inter-dependencies between different
  windows that need to interact with each other at a high level.
* The naming is python/standard RenderDoc TitleCase method names, not
  Qt style camelCase methods.

# Conflicts:
#	qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
#	qrenderdoc/Windows/TextureViewer.cpp
2017-04-18 14:57:43 +01:00
baldurk cb510298d8 Add wrapper around tracking a python context and executing scripts 2017-04-18 14:57:41 +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
Peter Gal 588eb083db Remove obsolete workarounds to force shared library linking
As the --no-as-needed linker option was added there is now
no need to force link to GL/EGL shared libraries via
extern methods.
2017-04-17 02:39:29 -07:00
baldurk 8ff3ee93b5 Copy libGL force-inclusion hack from renderdoccmd to qrenderdoc
* Normally Qt uses libGL dynamically so this isn't an issue, but if Qt
  is statically linked then we need this.
2017-02-22 17:17:15 +00:00
baldurk f416f4770e Implement UI side of detecting vulkan layer problems and fixing as admin
* Stub functions for the actual detection/fixing part.
2017-02-14 19:14:53 +00:00
baldurk f8ed197318 Add static resources collection with pre-constructed QPixmaps & QIcons
* Apart from making the code cleaner when accessing them, creating these
  from strings can be slow if you do it often enough (e.g. once per
  resources for action/action_hover in pipeline state view).
2017-02-13 19:20:22 +00:00
baldurk 7c422e3651 Add Load/Save functions around Deserialize/Serialise in config
* This lets us do some processing before saving and after loading
  regardless of the path the load/save takes.
2017-02-09 19:28:21 +00:00
baldurk cf1ef45a5e Add settings dialog for Qt 2017-02-03 20:11:06 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 614c15d669 Create config path if it doesn't already exist 2016-11-11 20:35:59 +01:00
baldurk cff5da63eb Cache method index for GUIInvoke invokes to avoid string compares 2016-11-09 19:13:22 +01:00
baldurk 27f1aa71a6 Use absoluteFilePath() when the filename is needed in the path 2016-11-09 18:34:08 +01:00
baldurk bb2f3a205c Move common Qt utility functions & JSON I/O together in a single place 2016-11-09 13:23:53 +01:00
baldurk 2d4c79b244 Rename main.cpp to qrenderdoc.cpp to be more clear 2016-10-07 19:51:06 +02:00