Commit Graph
147 Commits
Author SHA1 Message Date
akharlamov 04ca50ba63 Adding utility code for VK code generator.
ExtObject extends the SDObject structure with helper
methods.
Intervals are used for memory region tracking.

Change-Id: I38198c0a096ed838d527b6526216fb28326ebc89
2019-01-10 09:48:33 +00:00
baldurk 006bf38e79 Disable BufferSecurityCheck option on renderdoc libraries 2018-12-12 23:53:35 +00:00
baldurk a6dda66c57 Remove compiled-in DevDriverAPI, load dll to access API 2018-10-08 14:07:44 +01:00
Igor Surmin 4a4fdb40e7 Implement Intel performance counters support for D3D11 2018-09-28 16:12:23 +01:00
baldurk d8294d8a88 Use linked-list & spinlock to avoid non-safe functions. Closes #1102
* Most functions - including pthreads, malloc, free, etc are not safe to use in
  signal handlers. So we use a simple spin-lock and manual linked-list to manage
  our list of PIDs to wait on.
2018-09-17 15:58:10 +01:00
baldurk 4cf423bfaa Revert pull request #1087. Closes #1096 2018-08-29 20:53:13 +01:00
isurmin adb7df57d4 fix issues and remarks 2018-08-29 11:58:17 +02:00
isurmin 02b3cdad94 Implement support for Intel performance counters 2018-08-29 11:58:17 +02:00
baldurk 6b6127d965 Update zstd to v1.3.5. Closes #1046 2018-07-25 17:36:30 +01:00
baldurk 296f84fb7e Change GL text rendering to be compatible with a wider set of versions
* In particular this will work with GLES 2.0
2018-07-06 22:44:26 +01:00
baldurk c70c116bd7 Refactor hooks towards more unified/clean approach
* Hooking is now done the same way across platform, with different OS
  implementations.
* Regardless of how exactly hooks are implemented, we register libraries to hook
  and functions to hook within those libraries, and provide a location to store
  the original/onwards function pointer. This allows hooking to work whether
  it's done using import hooking that doesn't modify target libraries (so using
  dlsym or GetProcAddress will return the same value for the onwards function
  pointer) or whether it's implemented with prologue patching and trampolines,
  where we'd create an infinite loop if we did that.
* We also provide stronger guarantees - the original function pointers will
  _always_ be made available as soon as the library is loaded, whether hooked or
  not, no exceptions. This means less uncertainty in hooking code about when or
  how onward functions will be available.
* OS-specific hook functions are changed to just be implementations of
  LibraryHooks functions rather than indirected through macros and pre-processor
  definitions.
* In this commit we provide some temporary functions providing the old interface
  to reduce churn - the library-specific hook code will be updated shortly after
2018-07-06 22:44:20 +01:00
baldurk 14e3a3d360 Move API-agnostic pipeline state wrapper into core interface
* There's no need for this to be in the UI, and moving it allows it to be used
  from script which is very useful.
2018-06-18 18:39:06 +01:00
baldurk 6e57e17f8e Update tinyexr to 9b30f253 - latest as of the time of this commit 2018-05-07 18:42:26 +01:00
baldurk 2f0ff69faa Update Catch to v2.2.2
* This allows us to use ToStr as a stringifier
2018-05-07 18:42:25 +01:00
baldurk b0f4aebaa9 Commit RGP dependencies, building in separate project
* This is:
  - GPUOpen-Tools/DevDriverTools @ 92b3e34
  - GPUOpen-Tools/common-lib-amd-ADL @ 99cb60e
2018-04-25 10:44:53 +01:00
reinsteam 48cb7d6c49 Added a project with NVidia counters and NvPmApi header from NV Perfkit
- nv_counters.h/.cpp load NVidia counters using NvPmApi 4.4.0
2018-03-28 19:27:44 +01: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 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 047bff7261 Add an new android hooking method using JDWP to inject & PLT hooks
* This is based on the GAPID method of injection, using the same steps
  to connect with JDWP and debug the application, breakpointing on key
  init-time steps to patch vulkan layer search paths and load libraries
  from our installed apk.
* We diverge by then using PLT hooks instead of trampolines to hook the
  EGL/GL calls - and so we also hook dlopen.
* This should work on any debuggable application - not currently checked
  but does not replace/break any of the previous injection, which can
  still work.
2018-01-26 21:19:13 +00:00
baldurk ec71b05173 Split out android patching code into separate file 2018-01-26 16:30:47 +00:00
baldurk 5527c57e68 Split out some miscellaneous utility functions
* We also wrap up and cache the fetching of friendly names by serial
  number to avoid some adb traffic.
2018-01-26 16:30:16 +00:00
baldurk 1be3e8bfac Split out handling of android tools: locating&precedence, executing, etc 2018-01-26 16:24:54 +00:00
baldurk ae7300e524 Move android files to separate subfolder 2018-01-26 15:49:09 +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 1fe04d13ec Add new posix network files to VS solution 2018-01-01 18:20:38 +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 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 cba76414e1 Add exporter for Chrome's trace profiler from chunk metadata. 2017-11-24 18:14:23 +00:00
baldurk 6f500afe6d Re-enable D3D12 driver. (See commit msg if bisecting)
* This marks the end of "Temporarily remove driver support" which
  disabled drivers until they could be updated to the new serialisation.
2017-11-08 18:24:47 +00:00
baldurk 66d8aba60f Re-enable GL driver 2017-11-08 18:24:41 +00:00
baldurk 15f78b7ffd Re-enable Vulkan driver 2017-11-08 18:24:22 +00:00
baldurk ae32f791ae Re-enable D3D8 and D3D9 drivers 2017-11-08 18:24:08 +00:00
baldurk dbe29142b0 Re-enable D3D11 and DXBC drivers 2017-11-08 18:24:07 +00:00
baldurk d33b3f5940 Re-enable DXGI driver 2017-11-07 19:30:39 +00:00
baldurk a63e99177d Add serialisation for public interface structs 2017-11-07 19:30:35 +00:00
baldurk dc6f11f07b Remove socket_helpers.h - serialiser can now write directly to socket 2017-11-07 19:30:32 +00:00
baldurk 327fda94a0 Add refactored serialisation system
* The new system contains the ability to export serialised data to a
  structured form in memory - and conversion back to serialised bytes.
* This will allow offline transformations/visualisation of capture files
  as well as more rich representations of API calls in the UI.
* Likewise it enables a number of optimisations such as the ability to
  write straight from mapped API memory to disk via a compressor,
  without any intermediate copies.
2017-11-07 19:30:32 +00:00
baldurk 7562da9a20 Temporarily remove driver support. (See commit msg if bisecting)
* The commits following this add a new refactored serialisation system.
  As a balance between readability of individual commits and ability to
  bisect/compile at interim steps, the individual API back-ends are
  disabled in this commit, so that after the serialisation system is
  committed the project compiles again as soon as possible.
* However this is of course not much use in itself as then the code
  can't function usefully. The drivers are re-enabled as each one is
  updated to the new system, so at least the codebase should stay
  compiling, even if each individual API may not yet be functioning.
2017-11-07 19:30:31 +00:00
baldurk 5bd3493238 Add an XML codec for converting to/from structured data representation 2017-11-03 17:25:11 +00:00
baldurk f147ece4c6 Add separate handling for new RDC container format
* The new serialiser system will not handle the container file itself,
  so we've separated it out to deal in sections and stream I/O to read
  from and write to sections.
* We also add the ability to choose the compression scheme for a section
  instead of always using LZ4. LZ4 will still be used on the fly for
  fast write performance, but then RDC files can be re-compressed for
  savings offline.
2017-11-03 16:32:03 +00:00
baldurk 459c5a856e Add new I/O streaming system, with pluggable compression
* This I/O will form the basis of the new serialiser - it will simply
  read to or write from one of these I/O streams. Then that stream can
  come from a file, go to a memory buffer, or go through a compressor
  or decompressor transparently.
* It also allows a unified way of writing over sockets instead of
  needing special socket helper functions.
* With this commit, the code isn't used aside from in tests.
2017-11-03 16:26:06 +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
baldurk 6937756618 Add new structured data, that will be used to expose serialised values
* We have some special handling to allow SWIG wrapping of these types:
  SDFile owns the chunks and buffers within, and each object owns its
  children. Copying is disallowed except from SWIG where we assume the
  wrapper is handling lifetime management for its objects externally.
2017-11-03 16:19:45 +00:00
baldurk 276783b948 Move custom printf & string_utils out of serialise/ folder 2017-11-03 16:07:46 +00:00
baldurk 5e59616a8c Update rdctype::array to have a more stl-like mutable interface
* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
2017-11-03 16:01:58 +00:00
baldurk e8dc6471a3 Add pugixml 1.8 2017-11-03 15:54:57 +00:00
baldurk 32c8b38568 Add zstd v1.3.1
* The directories are flattened since the #include paths aren't
  relative and instead just #include "file.h". The recommended
  solution is just to flatten the directory structure.
2017-11-03 15:54:57 +00:00
baldurk 377fc33a92 Prefer native tools to compile renderdoc library
* This prevents link.exe from being at risk of running out of memory
  at link time on release builds, since it will use the 64-bit
  toolchain.
2017-11-03 15:53:27 +00:00
baldurk eb15c43b41 Add Catch.hpp for unit testing, with appveyor hooks 2017-08-29 13:19:44 +01:00
baldurk 9cf53473b2 Extract plugin locating logic out of AMD ISA and reuse for counters 2017-08-24 15:00:12 +01:00