Commit Graph

150 Commits

Author SHA1 Message Date
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 87ec279f1c Update some forgotten Copyright years to 2017 2017-05-19 17:28:41 +01:00
baldurk c854294dc8 Add calls to XInitThreads() to allow driver multithreading optimisations 2017-05-05 16:45:29 +01:00
baldurk ae50fa99ee Revamp version tagging, remove ugly suffix on git hash. Refs #571
* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
2017-04-27 19:47:50 +01:00
baldurk 13f61eaf8e Disable edit and continue debug information, since E&C is disabled 2017-04-27 19:47:49 +01:00
Cody Northrop f60968b103 android: Target android-23 explicitly for APK
Using "1" here was very specific to the build system, as noted by the comment.
When run on systems with older APIs install, it resulted in java compile errors.
2017-04-26 20:47:04 +01:00
baldurk dae3a41db1 Don't try to put android apk in ${CMAKE_SOURCE_DIR}/bin anymore 2017-04-18 14:57:49 +01:00
baldurk 6930841705 Rename ReplayRenderer to ReplayController
* It's not a renderer, it's an interface to controlling the replay and
  any 'renderer' type work actually happens in ReplayOutput.
2017-04-18 14:57:47 +01:00
baldurk a7ab0d9300 Move capture-file handling functions into a single interface
* This allows us to return complex types like byte arrays or pairs of
  status & render handle.
* Also in future more introspection of the capture file will be possible
  and this provides an easy extension to that without adding new entry
  points.
2017-04-18 14:57:47 +01:00
baldurk bc79e2296f Make EnvironmentModification struct and pass around array directly
* The old 'store in opaque void*' is kept as entry point wrappers only
  for the C# UI.
2017-04-18 14:57:47 +01:00
baldurk f6c045f473 Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
2017-04-18 14:57:46 +01:00
baldurk 2e87ca4531 Require qt creator to locate the cmake project to build on non-windows
* Previously the cmake build would put librenderdoc.so in a /bin folder
  in the source folder so the qt creator project could link against a
  fixed path when just opening the project solo.
* This won't scale though for fetching the SWIG outputs from cmake, and
  it's ugly to modify the source folder for out-of-source builds.
* Instead we have cmake generate a qt creator include file with all of
  the settings and paths needed, and pass the CMAKE_BINARY_DIR into
  qmake when building. This does mean that when opening the project in
  qt creator you need to specify CMAKE_DIR=/path/to/build though.
* As a bonus, this means we can let cmake identify where python is and
  have qt creator link against it rather than having to hardcode include
  paths etc.
2017-04-18 14:57:40 +01:00
baldurk 637d4089e2 Rename colour to color in public API code
* Following the principle of least surprise, color tends to be more
  commonly used in APIs and graphics code even outside the USA.
2017-04-18 14:57:37 +01:00
baldurk 0ad5709df3 Remove poorly chosen 'Fetch' prefix from a few data structures.
* This goes all the way back to the first iterations where these were
  the only structures and 'Fetch' referred to them returning data from
  the core code to the UI.
2017-04-18 14:57:36 +01:00
baldurk bd199ca8e6 Remove declarations for C interface from renderdoc_replay.h header
* The functions are still exported and that's all renderdocui cares for.
* The interface is no longer to be used so gets in the way of the
  generated SWIG bindings.
2017-04-18 14:57:36 +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
Peter Gal 081f65dff1 Disallow the linker to ingore shared libraries during linking
In some cases when the renderdoccmd/qrenderdoc is linked the linker
ignores the libEGL.so and only uses the librenderdoc.so.
This is because the renderdoc shared library provides the
same symbols as the libEGL.so. However we need to keep the
libEGL.so as we are using RTLD_NEXT in the renderdoc shared
library.
2017-04-17 02:39:29 -07:00
Peter Gal 489cc76c07 Specify GL ES version for the Android renderdoccmd
For Android the minimum GL ES version must be configured
in the AndroidManifest.xml so we would not end up
with an old ES version.
2017-04-05 12:00:31 -07:00
baldurk 747d0550f9 Compile fix - missing rename was mixed in with other changes 2017-03-13 19:06:22 +00:00
baldurk 487a1b7903 Start moving towards C++ only UI code. Assume C++ for the replay API
* The C# P/Invoke stuff doesn't directly use the header, and we are soon
  going to deprecate the C interface entirely.
2017-03-13 17:56:00 +00:00
baldurk b5f5b8534e Update solution and projects to VS2015, VS2010 is no longer supported
* Truly, this is a sad day. But unfortunately many dependencies are just
  not supported and it's increasingly difficult to stay on VS2010.
* In an ideal world, the IDE and compiler would be decoupled, but that's
  not the case.
2017-03-13 17:23:38 +00:00
Michael Rennie 5a1ded7386 Moved API-specific GLReplay code to GLPlatform.
ENABLE_GL & ENABLE_GLES can now both be ON without build errors on Linux.
2017-02-22 12:46:28 +00:00
baldurk 11a914bd59 Implement win32/linux checking and registering of vulkan layers 2017-02-16 17:10:03 +00:00
baldurk 71c05ed572 Remove some of the redundant places where git commit hash is #define'd 2017-02-16 17:10:02 +00:00
Peter Gal a70bcb8ad3 Add EGL replay implementation 2017-02-15 22:38:26 +00:00
baldurk bc2ef77405 Centralise object file dirs in VS so they're not all over the tree 2017-02-14 19:14:52 +00:00
baldurk 7caf12aea4 Add $ORIGIN/../lib/ to rpath for renderdoccmd and qrenderdoc 2017-02-10 12:09:05 +00:00
baldurk dd957a2ac8 Change std::setlocale to setlocale to fix on some compilers 2017-01-24 22:27:09 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 8c8cf07385 Add helper menu items to tools menu if rdocself.dll is loaded 2017-01-02 20:16:27 +00:00
baldurk 2a4d2451ff Allow 'promoting' back to capture 64-bit from 32-bit, in 64-bit install
* A 64-bit install has an x86 subfolder to capture 32-bit programs. If
  a 32-bit program then launches a 64-bit program we need to 'promote'
  back to run the original bitness to capture it.
* It's still not supported to capture 64-bit in general from just a
  32-bit install as the support files aren't included.
2016-12-08 19:04:59 +00:00
baldurk c810a96300 Keep debug log the same even when going via cap32for64 2016-12-08 19:04:57 +00:00
baldurk 512906c104 Export GLX functions we don't intercept as pass-through functions 2016-11-19 15:13:55 +01:00
baldurk 3290dd1448 Move version information to public API so that all projects can share it 2016-11-11 20:35:59 +01:00
Michael Rennie b225731a2f Popup a dialog if we haven't granted Android storage permissions. 2016-11-11 20:34:04 +01:00
baldurk 5286f950ff Add processing to different formats and max size while fetching thumb 2016-11-02 23:39:35 +01:00
baldurk 8f4a55a3b5 Set all processes under a given UI instance to log to the same file.
* Using OS-specific append writing functions instead of simple fopen/
  fwrite/fclose we can guarantee that multiple processes writing to the
  same log file won't trash or interleave their log output.
* To make the logs readable the PID is now included along with the
  project/timestamp.
* After that, we make sure that when we launch a program we set the
  output log to the same file as the parent UI. This keeps all the logs
  together and removes user confusion over which logfile is needed.
* We also move all of RenderDoc's temporary files under a RenderDoc
  folder in the temp folder, instead of scattering the files in the root
2016-11-02 23:37:38 +01:00
Michael Rennie d38ad5e2c9 Make APK file itself depend on renderdoc & renderdoccmd.
Previously the custom command wasn't running when .so's changed.
2016-10-13 13:39:28 +02:00
baldurk 528ffcf2a7 Avoid symlinking in favour of copying, and copy apk to root /bin folder 2016-10-12 22:08:48 +02:00
Michael Rennie 7a4c2f9546 Android cmake target for RenderDocCmd.apk
cd android-build
cmake -DBUILD_ANDROID=1 ..
make apk
2016-10-12 17:01:28 +02:00
baldurk 9f4a60028e Handle injecting environment variable params
* This also fixes the problem of capturing 32-bit programs with 64-bit
  RenderDoc failing to properly insert environment variables and
  error'ing when it tries to do it directly.
2016-09-28 17:55:45 +02:00
Ian Elliott f9024b2eb3 Add 'android:exported="true""' to "AndroidManifest.xml" file.
This seems needed for non-rooted devices.
2016-09-15 16:10:50 -06:00
Ian Elliott e3a51a239f Change "AndroidManifest.xml" for Android SDK Version 9 -> 23.
Vulkan requires at least API level 23.
2016-09-15 16:10:45 -06:00
baldurk 541c2f2d99 Add copies to ./bin for renderdoccmd & librenderdoc.so
* This allows qrenderdoc to link properly when opened directly in
  qtcreator, as otherwise it doesn't know where to link to the generated
  librenderdoc.so somewhere in CMake's build directory
2016-09-14 17:31:45 +02:00
baldurk 6518d8bdf8 Don't rely on data files being exported from .so, add explicit function 2016-09-12 17:40:28 +02:00
baldurk d3e4790ee8 Add command to renderdoccmd that will handle vulkan layer registration
* This is similar to the button on the capture dialog of the windows UI,
  except on linux the situation is a bit more complex as layers can be
  registered in two different system locations (one for distro packages
  and one for non-distro stuff), as well as in $HOME.
* On linux we make sure the json always contains an absolute path so we
  can tell from any given build whether or not a json is our own or not.
* By default we now install the json to /etc since /usr is reserved for
  proper distro packages, and shouldn't be written to by 'make install'.
  There's a CMake variable for overriding this for anyone who wants to
  make install into a custom folder (maybe for packaging).
2016-08-26 13:35:31 +02:00
baldurk 3693a17c73 Tiny tweak to renderdoccmd usage output 2016-08-25 21:07:40 +02:00
baldurk 90604c6d9c Print custom lines of API support on the version string of renderdoccmd
* An easy way to check what support is compiled into this binary.
2016-08-25 21:07:40 +02:00
baldurk 6819f22181 Tweak aliases for help/version to cover a couple of more cases 2016-08-25 21:07:40 +02:00