Commit Graph

229 Commits

Author SHA1 Message Date
baldurk 1c05c5e5d1 Add option to renderdoccmd replay to specify a loop count 2018-10-02 16:23:40 +01:00
baldurk fb23f6ad1d Add check for ANDROID_NDK, and error if not set when building android 2018-09-25 15:50:11 +01: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 0092e5ced2 Append link flags in cmake on android instead of replacing
* Thanks to @Themaister for this fix
2018-09-25 15:09:54 +01:00
baldurk 390096e796 Add missing includes on android
* Thanks to @Themaister for this fix
2018-09-25 15:09:54 +01:00
baldurk 6ec402e370 rename logfile -> capturefile parameter on execute, document for python 2018-09-18 18:05:39 +01:00
baldurk 4040429fba Remove unnecessary link against libGL/libEGL in renderdoccmd
* This means it's easier to build with GLES support by default
2018-07-06 22:44:26 +01:00
baldurk 569f11b757 Make sure to get eglTerminate function pointer
* Fixes 100% crash on startup introduce by #993
2018-05-26 14:41:39 +01:00
tabi.katalin d2cdca45a5 Fix bad alloc error when creating window surface
The screen doesn't refresh when changing between captures during replay on remote Android device because it fails to display the splash screen and the new preview window.
2018-05-24 10:45:46 +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 627a965d69 Specify GLES2 renderable type when fetching egl config
* Fixes preview display on PowerVR
2018-05-11 20:39:43 +01:00
baldurk b4878bf4e9 Fix auto-detection and manual specification of conversion formats on CLI 2018-04-05 17:51:40 +01:00
baldurk 35865efef2 Always use git commit hash to identify android build
* This prevents reinstall issues if the UI is looking for a plain major/
  minor versionName and the apk was built with a commit hash.
2018-04-04 16:52:44 +01:00
baldurk 14d9ec461b Ensure there's a trailing path separator on upgrade command path 2018-03-06 11:06:46 +00: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 13dd17d6f2 Always 'release' the preview window even if it wasn't created.
* This helps on android where we might fail to create the preview window
  if our app isn't in the front, but we still want to let the base loop
  know that we're done previewing and let it go back to the generic
  splash screen.
2018-02-02 18:40:28 +00:00
baldurk 2147cb0b9f Create and destroy PThreadLocks globally
* If we destroy them at the end of android_main we might destroy them
  while the thread is running and cause incorrect code flows where we
  try to join and restart the thread while it's blocking.
* Don't get me started on why android_main exits when you get alt-tabbed
  away from...
2018-01-31 18:24:15 +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 6fe179bea3 Only join a previous command thread and restart if it has exited
* APP_CMD_INIT_WINDOW can be called when the application hasn't fully
  shutdown, and the thread is still running. Hold a lock while we're
  inside renderdoccmd() so that we know if the thread has exited or not.
* This would be easier if android had pthread_tryjoin_np()...
2018-01-22 20:04:17 +00:00
baldurk 56c6fa2d04 Use QCommandLineParser to parse arguments more intelligently. Refs #843 2018-01-17 21:07:03 +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
baldurk 0991642393 Add error message in case reading from file fails while embedding 2018-01-04 21:46:41 +00:00
baldurk dec06a19fb Don't pass NULL f to fclose, passing --no-clobber if file doesn't exist 2018-01-04 21:46:41 +00:00
michaelrgb 89eb933be5 If user resumes APK after server shutdown, restart cmdthread.
Also make sure ANativeActivity_finish/DetachCurrentThread are called.
2018-01-03 11:11:25 +01:00
baldurk 0ea854a9da Don't return android windowing data if we have no window 2018-01-02 14:34:34 +00:00
baldurk 7347e19d8c Add check & print of shader compile and program link status 2018-01-02 12:34:46 +00:00
baldurk 7abc319a2c Add default precision for logo fragment shader 2018-01-02 12:34:26 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 96e39cb781 Add a preview window ability to remote servers. Always on for android
* On android in particular this shows some sense of what's happening on
  the device and gives user feedback that it's not completely dead.
2018-01-01 17:31:23 +00:00
baldurk 7a2305ae31 Change by-ref passed float or bool parameters to callbacks in public API
* Mostly used for passing a progress float back during a long blocking
  call like opening a capture or doing a copy.
* This is much more feasible for python to bind to.
* In several cases we just use a tiny lambda that updates a float anyway
  since we can't push the progress directly into a progress dialog, but
  need to let it query from a temporary in-between float.
2018-01-01 17:31:23 +00:00
baldurk 6572cd97f5 Tidy up handling of windowing data, make it a bit more type safe 2018-01-01 17:31:19 +00:00
baldurk b8bd99a24a Add a simple preview placeholder for android
* This means that at least when nothing else is happening the remote
  server isn't completely blank and unresponsive.
2018-01-01 12:41:12 +00:00
baldurk ebaefc82a9 Normalise and make python/public interface more consistent
* We enforce a naming scheme more strongly - types, member functions,
  and enum values must be UpperCaseCamel, and member variables must be
  lowerCaseCamel. No underscores allowed.
* eventId not eventID or EID, and Id preferred to ID in general. Also
  for resourceId.
* Removed some lingering hungarian m_Foo naming.
* Some pipeline state structs that are almost identical between the
  different APIs are pulled out into common structs. Where something
  doesn't make sense (e.g. viewport enable for vulkan) it will just be
  set to a sensible default (in that case always true).
* Changed scissors to be x/y & width/height instead of sometimes
  left/top/right/bottom
* Abbreviations are discouraged, e.g. operation not op, function not
  func.
2017-12-22 13:02:36 +00:00
baldurk 649e82b8ed Add two commands to renderdoccmd for embedding and extracting sections 2017-12-20 18:01:20 +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 fd09c323b3 Add helper functions in win32 renderdoccmd for wchar <-> UTF8 conversion 2017-12-19 12:26:34 +00:00
baldurk 8c5f14436f Add cmake option to strip the output of android builds 2017-12-15 17:33:56 +00:00
baldurk 8d29758851 Remove members of public structs called 'bytes'
* It is at best confusing, and at worst could cause errors by aliasing
  with the python type.
2017-12-15 17:33:53 +00:00
baldurk 584b3c041c Add functionality to return raw thumbnail bytes, not encoded
* This is useful if you want to retrieve the thumbnail for in-memory
  processing instead of writing it to disk immediately.
2017-12-12 14:30:09 +00:00
baldurk b492840349 Fetch git commit using LibGit2Sharp that ships with VS2015 when possible
* Thanks to https://stackoverflow.com/a/43815817/4070143
2017-11-24 18:14:24 +00:00
baldurk 4ff439ed79 A couple of improvements to convert cmd, fail if format isn't explicit 2017-11-24 18:14:23 +00:00
baldurk 016bc29609 Add a tool menu item that will recompress a capture file 2017-11-17 16:33:05 +00:00
Peter Gal 9603e86215 Fix renderdoccmd help screen
The help information for the 'convert' command in the
renderdoccmd was incorrect.
2017-11-09 19:09:40 +01:00
baldurk 7ca6c80414 Add ability to convert a capture to structured data without replaying 2017-11-08 18:24:22 +00:00
baldurk 9388d2b71b Change core capture code to be more centred around container handle
* When opening a capture file, a format is now available to allow
  easy import from another format without a completely different
  interface. Only rdc files can be replayed, but any other file can
  load and access structured data through the same interface.
* The replay initialisation and capture writing interfaces also use the
  RDCFile instead of passing filenames or Serialisers around directly.
  Driver initialisation parameters are now entirely private, and don't
  need to be exposed - any agnostic metadata like thumbnail, driver, etc
  are all accessed via the RDCFile container itself.
* Callstack resolution is now part of the container file, not the
  back-end via way of its Serialiser.
* Importers/Exporters to other non-RDC formats are registered in a
  similar way to replay/remote drivers.
* It is also then possible to construct an RDC file from thin air, by
  creating an empty RDCFile container and filling it with data, then
  requesting it to be written to disk.
2017-11-07 19:30:35 +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