Commit Graph

6924 Commits

Author SHA1 Message Date
baldurk cf317fcd24 Fix pyside compilation when present on windows 2018-02-06 00:21:09 +00:00
Cory Bloor 9c7ec619ca Speed up linux process connection
There's no need to wait for exponential backoff to satisfy
waitTime > MAX_WAIT_TIME if we already found the result.
2018-02-06 00:20:57 +00:00
baldurk 768e812e45 Commit binary dependencies necessary for compilation on windows
* On windows it's strongly desired to be able to compile straight out of
  a clean checkout or source download. This means anyone can download
  the source and investigate something quickly, without having to worry
  about the hassle of figuring out how the project downloads 3rd party
  dependencies, fetching them, getting them registered in the right
  place.
* This can't be put in a submodule as git submodules don't get
  downloaded by default so people new to git will get confusing
  compilation messages, and someone downloading the source from github
  directly without cloning via git won't get submodules included.
* It does add some extra size to a fresh download/checkout which is
  unfortunate, but absolutely worth the cost. Shallow checkouts still
  aren't unfeasibly large, and it's only a one-off cost at clone time.
2018-02-02 20:49:35 +00:00
baldurk 469957abf2 On windows expect Qt include path outside of platform subfolder 2018-02-02 20:47:23 +00:00
baldurk c1ceb3b02a Make PySide2 optional on windows
* It's already optional on linux due to distributions not necessarily
  carrying packages for it yet. We also make it optional on windows
  since by the same measure it's not a huge problem if it's missing, and
  official builds will include it. This means we don't have to ship the
  binary dependencies
2018-02-02 20:47:19 +00:00
baldurk bbb4fed8e1 De-prioritise our bundled android tools unless there's no other option
* This prevents our adb from fighting a system adb if it's used outside
  of renderdoc.
2018-02-02 18:40:29 +00:00
baldurk 66198cf200 Fix missing serialise of shader bytecode encoding enum 2018-02-02 18:40:28 +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 3b94095201 Handle differences between EXT_debug_label and KHR_debug
* In particular they have different behaviour for what length value
  indicates that the length should be fetched from the NULL
  terminated string.
2018-02-02 18:39:46 +00:00
baldurk 96c487c8c0 Use absolute dimensions of viewport to calculate aspect ratio. Refs #856
* On vulkan the viewport height could be negative to flip the NDC, but
  we don't care about its sign only its magnitude to calculate the
  aspect ratio.
2018-02-02 17:29:12 +00:00
baldurk 4e830b247c Fix cases on vulkan, assuming PostVS index buffer was already a live ID 2018-02-02 16:09:30 +00:00
baldurk 6c64c2bfae Ignore errors from truncated RDC file as long as we get the thumbnail 2018-02-02 16:09:29 +00:00
baldurk efb0143333 Create public CBuffers during capture, as they're needed for MSAA2Array 2018-02-02 16:09:28 +00:00
baldurk b1dbab6ce1 Add dependency on renderdoc_libentry, needed to link renderdoc 2018-02-02 16:09:27 +00:00
baldurk 7cb221f5e2 Reset resource IDs in views if there is no view bound 2018-02-02 16:09:27 +00:00
baldurk cee7da9dc7 Handle formatting typeless 'special' format names: BCn and Depth-Stencil 2018-02-02 16:09:26 +00:00
baldurk ec68f9ec0e Only print real bools as True/False, not anything that can convert 2018-02-02 16:09:25 +00:00
baldurk d6b6fcf2c1 Only export NULLs if something actually went wrong! 2018-02-02 16:09:24 +00:00
baldurk 0d1d7c482b Manually support fetching thumbnails from old captures
* This is just for the thumbnail preview where we still want to be able
  to display the thumbnail for old captures even if we can't open them
  directly.
2018-02-02 16:09:23 +00:00
baldurk 84ea588036 Move android support files into /plugins/android/ in the build
* We also don't copy out of the android SDK anymore as that has a
  licensing impact. Instead we ship our own builds from a local AOSP
  checkout, the same way as other plugins.
2018-02-01 20:21:50 +00:00
Jasper St. Pierre 2dd9531199 Fix GLSL shader editing
The "files" system expects other files to be #included, which won't make
sense for GLSL sources, which are expected to be concatenated. Use the
concatenated string as a single "main.glsl" file.
2018-02-01 19:55:48 +00:00
baldurk 427a89db0b Create parent directory for file transfers to remote server 2018-02-01 18:25:31 +00:00
baldurk f5aa915f3f Require explicit opt-in for interceptor-lib use, in case of local llvm
* CMake can find the local LLVM even without specifying LLVM_DIR, but
  we don't want to build it for interceptor-lib unless it's exactly the
  one we want, so we ask for explicit opt-in.
2018-02-01 18:25:30 +00:00
baldurk 26c6456c8e Don't query GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS if no subroutines
* Works around some mesa debug message spam if no subroutines exist.
2018-02-01 18:25:30 +00:00
baldurk bf457be9f1 Make sure to check created context during replay on linux/android 2018-02-01 18:25:30 +00:00
baldurk 4733a43d00 Optimise rendering and combining of many pips in timeline bar 2018-02-01 18:25:30 +00:00
michaelrgb 3d2bc2cdc9 Remove VK_IMAGE_USAGE_TRANSIENT to fix preparing initial state.
On some drivers vkCmdCopyImageToBuffer will crash if we sample from
transient images. The spec also forbids using it with USAGE_SAMPLED_BIT.
2018-02-01 14:01:13 +00:00
baldurk 6316a9747d Add missing Qt include 2018-02-01 00:25:05 +00:00
baldurk 7dc1c4f344 Fix clang-format issue that somehow snuck past commit filters 2018-01-31 23:18:50 +00:00
baldurk 5cda6a8d65 Refactor hook populating out to separate from context checking
* On EGL we want to populate our hooks immediately so we have them ready
  before anything is used, and it's valid because eglGetProcAddress is
  spec'd to return function pointers that can be used with any context.
* Then later when we have a context we can check extensions and emulate.
2018-01-31 22:08:16 +00:00
baldurk 29f5d7e53d Update file selection whenever an item is selected, not just clicked.
* This catches when you use typing to find an item, or select with the
  arrow keys.
2018-01-31 21:08:24 +00:00
baldurk edb85d834e Check for errors when invoking AMD DXBC disassembler 2018-01-31 21:03:10 +00:00
baldurk c744638471 Check for LLVM 4.0 specifically - don't compile against 5.0 2018-01-31 19:46:36 +00:00
baldurk 1e52a57a25 Fix library linking on X11 and pthreads 2018-01-31 18:57:02 +00:00
baldurk 77569fa75d Patch checkerboard.frag for GLES compat (input/output precise match) 2018-01-31 18:24:17 +00:00
baldurk 627d23b937 Recreate proxy preview window if it's out of date 2018-01-31 18:24:16 +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 b7e6d33f0f Fix incorrect size check (checking string length instead of line count) 2018-01-31 18:24:14 +00:00
baldurk 4a6462b63b Compile in interceptor-lib if LLVM is found, and use to hook on android
* Note we still have to use PLT hooking for android_dlopen_ext that
  libvulkan uses to load layers, since interceptor-lib can't hook that,
  and otherwise libvulkan will load our library multiple times into the
  process instead of re-using the existing injected library.
2018-01-31 18:24:14 +00:00
baldurk addc95d790 Compile posix_libentry into a static library to ensure it's linked last
* If we want our global constructor to run after even static linked
  libaries (which we will soon for LLVM) then we must make it a static
  library as well. We do some tricks to ensure the symbols are still
  pulled in even though it's otherwise "unused".
2018-01-31 18:24:13 +00:00
baldurk 64c9e93831 Commit interceptor-lib from GAPID @ 9492539f1
* This library will be used to replace the PLT hooking for most core
  functions, and is generally more reliable. It still fails in some
  cases though when the target function is not patchable.
* To build, it requires LLVM. See README.md for instructions on building
  a compatible LLVM for use.
2018-01-31 18:24:12 +00:00
baldurk b7aa522769 Wait for the API to be presenting before android package is "started"
* This closely resembles the behaviour before, when at least for vulkan
  the library wouldn't be loaded and open the connection until the
  instance is created and the layer is loaded.
* When injecting our libraries, the connection is made very early but it
  may be some time before the program initialises vulkan - we can't
  setprop debug.vulkan.layers back to empty until it has, so instead we
  wait for the API to be presenting.
2018-01-31 14:39:06 +00:00
baldurk 1778e4028d Don't do any injection if the library is already present
* We assume that if the user injected libVkLayer_GLES_RenderDoc.so then
  it's either a vulkan app and that's sufficient, or they linked
  against it.
* Injecting our libraries over the top of that could cause problems -
  at worst crashes, or at best we could end up with nested hooking with
  double overhead, or the loaded renderdoc library won't be the one that
  hooks and the workflow will break.
2018-01-31 14:36:56 +00:00
baldurk 969fdaa499 Add the ability to patch android binary XML manifests in-place
* This lets us add the debuggable flag we need, at the cost of needing
  to re-sign the APK. It works in many cases although sometimes it does
  fail - but this is provided just as a 'best effort' and not as a
  recommended workflow.
2018-01-29 22:37:55 +00:00
baldurk 83d921ea84 Install if we don't have all the server ABIs correctly 2018-01-29 22:22:26 +00:00
baldurk b3d5704809 Don't try to make package debuggable if remote server has disconnected 2018-01-29 18:02:23 +00:00
baldurk 06267312a2 Fix android hooks accidentally marking libraries processed too soon 2018-01-29 18:01:28 +00:00
baldurk 280fe9ade2 clang compile fix - add braces around initialisation of union 2018-01-26 22:15:59 +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 077402bf11 Add failsafe so we don't wait the whole timeout if an apk closes/crashes 2018-01-26 21:19:15 +00:00