Commit Graph

166 Commits

Author SHA1 Message Date
baldurk c468dafedc Don't stringify ResourceIds in structured data
* Users should stringify the actual value themselves if so desired. This reduces
  the number of string allocations in the structured data since ResourceIds are
  common.
2020-10-27 15:15:19 +00:00
baldurk 117e16041a Add an error message and don't add child process for invalid ident 2020-10-26 10:24:40 +00:00
baldurk 0ed941bec2 Don't display window cycling message on platforms without keyboard input 2020-09-17 17:23:25 +01:00
baldurk d71d275dc4 Don't re-read entire logfile every time, only read from last position 2020-09-03 17:45:41 +01:00
baldurk 684290c475 LZ4 compress embedded diagnostic log 2020-08-27 16:02:18 +01:00
baldurk 680857cb0f Fix structured data conversion to preserve timestamp base
* The timestamp base is queryable from the capture file and settable too, and
  conversions preserve un-rebased timestamps. Only rebasing when loading a
  capture for replay.
2020-08-27 15:54:01 +01:00
baldurk 3f63d1532d Fix extended thumbnail length not being written 2020-08-27 11:24:45 +01:00
baldurk 55c62dd307 Serialise timestamps and durations as tick counts, and convert on replay
* When we're capturing programs with high-frequency enough API calls, the
  overhead of the math & extra function calls over Timing::GetTick() is
  measurable. Removing it and serialising pure tick based durations/timestamps
  and then converting on replay gives us identical results and saves time while
  background capturing.
2020-08-26 19:27:42 +01:00
baldurk 9fd7f447d2 Switch thumbnail to bytebuf instead of byte pointer and length 2020-08-26 19:27:42 +01:00
baldurk 31b7c35bae Fix logfiles not being deleted if captured application is the last user
* Previously only the UI itself would delete the log if it was the last thing to
  close.
2020-08-04 14:48:51 +01:00
baldurk 83478602a8 Don't register/unregister frame capturers when swapchains resize 2020-07-29 14:23:34 +01:00
baldurk 5af3a4e23b Add a debug option to embed the log file in captures 2020-07-29 10:59:18 +01:00
baldurk d7ed861f9b Register child processes on linux by intercepting fork. Closes #1883 2020-05-22 22:33:18 +01:00
baldurk 2f86d3dd84 Add message to inactive window overlay showing cycling 2020-05-19 11:43:11 +01:00
baldurk f622ac36d6 Standardise layout of packed texture formats on disk/network
* We preserve each API's interpretation of bit order for packed formats like
  RGBA4 or R5G6B5 when displaying the raw data in the UI, but when we need to
  proxy it or save to disk, we always transform to D3D's order as standard.
* This allows us to proxy them reliably because we always have a standard bit
  order and APIs that need a different order transform when fetching data to the
  standard format, or setting proxy data from the standard format.
2020-05-18 13:21:55 +01:00
baldurk d408f77241 Add configuration system for core renderdoc module
* This allows persistent config storage and registering tweak variables that
  works independent of the UI's configuration.
* Config vars can be debug only, which means they will be compiled out in stable
  version releases. This allows for debug-logging tweaks that are available in
  all builds (including nightly builds) for diagnostic purposes, but have zero
  overhead in stable releases.
* Variables have a loose hierarchy defined with _ or . to separate nodes.
2020-03-18 17:34:59 +00:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk b38cbc1b0c Add explicit functions to initialise and shutdown replay. Closes #1685
* It's required for replay applications to call InitialiseReplay() before doing
  any work, and to call ShutdownReplay() once they're finished.
* This lets us do more heavyweight shutdown work before global destructors are
  being invoked and the RenderDoc instance is being destroyed.
* Anything that needs to be shut down during capture still has to happen in
  RenderDoc::~RenderDoc since we obviously can't get the application to call a
  shutdown function in that situation.
2020-01-30 13:39:15 +00:00
baldurk e1fe211f3c Rename Shutdown to RemoveHooks in in-application API. Version is 1.4.1
* This is a binary and source backwards compatible change.
2020-01-30 13:02:23 +00:00
baldurk 1a2876af62 Disable crash handler on opera as well 2020-01-15 10:02:20 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk bd9f4fc389 Remove use of vector/string from core project
* This also affects the drivers via interfaces e.g. IReplayDriver and some
  utility functions.
2019-12-16 18:10:31 +00:00
baldurk c4ca8cb1d1 Reduce reliance on big public headers where possible
* Mostly moving includes from common headers to cpp where possible, and removing
  includes of the whole thing where only enums or rdcstr etc are needed.
2019-12-16 17:06:16 +00:00
baldurk 5f72b9d53c Remove std::string/std::vector use from os-specific layer 2019-12-16 17:06:15 +00:00
baldurk fde74d4710 Handle thumbnails of 0 width or height without crashing 2019-12-02 14:08:46 +00:00
baldurk 90c4c9855c Remove unnecessary STL includes from header files
* Some of these were leftover and no longer needed, some only needed in a subset
  of cpp files.
2019-12-02 11:59:55 +00:00
baldurk f42d718ffa Explicitly mark system chunks as internal in their names 2019-12-02 10:59:29 +00:00
baldurk e205054317 Add UI support for GPU typed pointers in buffers 2019-11-29 13:53:44 +00:00
baldurk e6627542cf Don't enumerate available GPUs when running in renderdoccmd 2019-11-26 17:38:25 +00:00
baldurk 99e13a72f2 Improve logging around frame capturers
* This can be useful for users of the in-application API to identify what frame
  capturers are available (in case they're passing the wrong handles)
2019-11-21 21:25:40 +00:00
baldurk 4458ab3205 Remove assumptions that captures are always frames
* Previously we had "Frame X" and "Start of Frame" hardcoded in the event
  browser, and the end of frame was in many cases assumed to be a present call.
  However with the in-application API this is not necessarily true.
* Presents are now serialised separately in all APIs and displayed wherever they
  happen in the frame, and if there is no present at the end of the frame an
  "End of Capture" marker is inserted. Similarly API-defined captures are not
  given a potentially misleading frame number.
2019-11-21 17:09:01 +00:00
baldurk 2f6dc63458 Disable crash handler when chrome or chrome derivative is detected
* The volume of invalid crash reports from people injecting into these programs
  is massive, and some filtering has to happen.
2019-11-12 20:44:35 +00:00
baldurk 52e0ecf543 Add dlsym hooking for extreme cases on linux. Closes #1551 2019-10-16 13:02:59 +01:00
baldurk 2828f194e1 Soften errors if D3D12 fails to load 2019-09-20 11:04:10 +01:00
baldurk 422cd728ad Move available GPU check onto thread at startup
* This hides a stall when first opening a window that needs the list of GPUs.
2019-08-28 15:34:28 +01:00
baldurk 20be9f3d52 Add ReplayOptions struct to contain replay-time configuration
* Not currently exposed to the UI or used by the drivers, we just pass the
  default object through
2019-08-27 18:51:56 +01:00
baldurk 878acd4ad9 Add a function to enumerate which GPUs are available at replay time 2019-08-27 18:51:56 +01:00
baldurk e2704fa2eb Add an abstracted interface around android-specific handling
* This makes it easier to use the same kind of interface to manage other kinds
  of devices.
2019-07-31 17:51:13 +01:00
Benson Joeris 54c5a9c303 Vulkan: Fix EndFrameCapture with null wnd
This ensures that a thumbnail is created using the image from last
presented swapchain.

This swapchain, and the thumbnail still could be null. `CreateRDC` was
incorrectly asserting that the thumbnail contained non-null data. In
fact, `CreateRDC` already behaves correctly in the case of null
thumbnail data, so this assertion is removed.

Change-Id: I5b35463898029b0130fe9d8f39dda30e192deef6
2019-06-18 11:18:05 +01:00
baldurk 7206a0cd25 Removing 'use std::vector' 2019-05-17 16:32:56 +01:00
baldurk 462772af91 Remove 'using std::set' 2019-05-17 16:32:56 +01:00
baldurk a965a3a703 Remove 'using std::string'
* This will make it easier to replace std::string with rdcstr in future
2019-05-17 16:32:56 +01:00
baldurk 699f8753af Convert ToStr, Serialise, and TypeName to use literal strings 2019-05-15 14:12:17 +01:00
baldurk fb333ebc9b Remove 'using std::map'
* This will make it easier to replace std::map in future
2019-05-15 14:12:17 +01:00
baldurk a44b85bd76 Don't use StringFormat::Fmt for ResourceId stringise
* This is high-frequency enough that it's worth doing an in-place int-to-string
  conversion.
2019-03-29 17:48:15 +00:00
Aliya Pazylbekova 7c0365679f Add GGP build support
- Disable GL and GLES drivers on GGP
- Add flags to keep symbols in release builds. Adds
minimal debug info that preserves backtraces.
- Disable python modules and qrenderdoc for GGP
2019-03-14 01:23:11 +00:00
baldurk f1bfed1c1e Include the platform in the diagnostic log header 2019-03-13 11:48:56 +00:00
baldurk fe0be58908 Implement CGLPlatform using CGL and NSOpenGLContext
* On replay on macOS we use NSOpenGLContext so we can render to windows.
* We have two windowing systems on mac - one for Metal compatible outputs and
  one for OpenGL compatible outputs.
2019-02-13 18:50:54 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk ab8d07f29c Add DiscardFrameCapture to in-application API, bumped to version 1.4.0 2019-01-08 11:35:48 +00:00