Commit Graph

4696 Commits

Author SHA1 Message Date
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 beaa642f73 Remove bool parameter to InitResolver to cancel resolving 2018-01-01 17:31:20 +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 027a7e951b Fix copy-paste error with vkCmdDrawIndirect & vkCmdDrawIndexedIndirect 2017-12-29 18:30:46 +00:00
baldurk 31b4064702 Use ItemHelper more in rdcarray to avoid slowdown on basic types 2017-12-29 18:30:45 +00:00
baldurk a0a41024b5 We're not done capturing a frame until EndFrameCapture returns 2017-12-29 18:30:45 +00:00
baldurk 559656e0f6 Send capture progress over an active target control connection 2017-12-29 18:30:43 +00:00
baldurk ed98925eef Generalise progress tracking to allow multiple progress updates
* We track the progress through making a capture as well as the progress
  we already tracked loading a capture.
* Also incidentally fix a copy-paste bug that was calculating the wrong
  progress for loading captures by applying FileInitialRead instead of
  FrameEventsRead for the frame replay.
2017-12-29 18:30:40 +00:00
baldurk 332e9b70a3 Add versioning to the target control protocol 2017-12-29 18:30:38 +00:00
baldurk d14c7f3894 Track a set of active APIs instead of a single current API.
* We also let an API be active without presenting, and then note when it
  starts presenting. This lets us detect the case where an API has been
  started up and used, but isn't presenting so we're not able to capture
  it. Less confusing than telling the user no API is detected, and lets
  us direct them to the relevant documentation.
* There's also a flag indicating if the API can be captured even if it
  does present.
2017-12-29 18:30:38 +00:00
baldurk 87280c549d Don't use current driver for creating RDC, pass in driver explicitly 2017-12-29 18:30:36 +00:00
baldurk 184e5c7f8d Change RDCDriver to enum class, don't manually stringify anywhere 2017-12-29 18:30:35 +00:00
baldurk a84fb34dd6 Create GL overlay texture as GL_RGBA16F instead of GL_RGBA16
* GLES doesn't support the UNORM variant.
2017-12-28 17:55:43 +00:00
baldurk 04da4403d0 Add wireframe overlay fallback, if non-solid fill mode isn't supported
* Vulkan only for now - GLES is a complete mess.
2017-12-28 17:54:58 +00:00
baldurk 80ebac90b4 32-bit compile fix 2017-12-27 18:04:40 +00:00
michaelrgb cab3abde20 Fix typo on eglSwapInterval passthru. 2017-12-27 17:07:29 +01:00
baldurk e2d4078cfd Remove bool applyInitialState from D3D Serialise_BeginCaptureFrame
* Instead we just skip the chunk wholesale when we're doing a partial
  replay and don't want to apply it.
2017-12-27 16:05:16 +00:00
baldurk 9ca9e086b1 Add fake chunks for multi-indirect commands' data
* Currently we only have structured data for the CPU-side calls, but we
  want to display the information for the individual selectable GPU-side
  commands.
* So we add a new fake virtual chunk and insert it with data pulled from
  the GPU information, and any meta-data like the offset of that
  command.
2017-12-27 16:05:15 +00:00
baldurk db07f05f77 Add events for push/pop markers, and queue submits & cmd buf begin/end
* This means the command buffer begin/end won't just be a fake chunk
  with the queue submission API details, it will point to the actual
  begin or end chunk.
2017-12-27 16:05:15 +00:00
baldurk 21d5943d82 Remove dependency on Qt in qrenderdoc python module
* The main addition here apart from some extra stubs is a new rdc type
  for date time objects.
* Although the module doesn't do anything and is only used for docs
  reflection it is desirable to not have to link against Qt as this
  can cause problems when linking the module without unresolved symbols.
2017-12-27 16:05:15 +00:00
David McFarland 00823dac59 gl: initialise namespace of images
Images[i].res.namespace was left set to eResUnknown, causing the image
not to be found in GLResourceManager::GetID when populating the
renderstate view. This would result in images being incorrectly shown as
unbound.
2017-12-27 17:05:01 +01:00
David McFarland 90f9d02ddc gl: fix corruption related to ranged buffer flushes
The offset argument to FlushMapped[Named]BufferRange was being treated
as relative to the start of the buffer, rather than
relative to the mapped range.

During a capture, if a buffer was mapped for write with a non-zero
offset using Map[Named]BufferRange, the offset wouldn't be taken into
account when using the shadow buffer.
2017-12-27 17:05:01 +01:00
baldurk 4da2545407 Add -lrt to librenderdoc.so, for clock_gettime 2017-12-23 08:28:47 +00:00
baldurk 433c19fa1b Always compile AMD project even if drivers are disabled 2017-12-22 22:19:27 +00:00
baldurk cdd731d00c Add -Wl,--no-undefined to ensure all symbols are resolved
* This prevents issues where perhaps some file that is compiled in
  references a symbol in another file which is not compiled or isn't
  enabled, leaving an undefined symbol in librenderdoc.so. This can
  lead to some seriously hard to track bugs.
2017-12-22 22:17:07 +00:00
baldurk 99c2194348 Don't re-type textures if they are bound to the wrong target in GL 2017-12-22 17:03:08 +00:00
baldurk 978521b81b Add just-in-case handling for texture without a format on GL 2017-12-22 17:03:07 +00:00
baldurk fe4fa7138d Move the GCN disassembly to the replay controller
* This way it's uniformly supported, so e.g. we can still get it when
  the replay itself is running on android.
* To do this we just pass the 'raw' bytes, which contains the whole blob
  needed for disassembly. This means a little extra work to disassemble
  D3D blobs by doing a tiny parse of the DXBC.
2017-12-22 17:03:06 +00:00
baldurk 184c7be0b8 Add an enum listing how a shader's bytes are encoded. 2017-12-22 16:52:42 +00:00
baldurk 98c267cee6 Delete old sync objects before re-syncing in glFenceSync 2017-12-22 16:00:34 +00:00
baldurk f224375790 Set message source for API-captured debug messages on GL. 2017-12-22 16:00:21 +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 24fce05773 [Coverity] Initialise some uninitialised values 2017-12-21 12:18:36 +00:00
baldurk d902981f72 [Coverity] Fix comparison operators with copy-paste errors 2017-12-21 12:15:32 +00:00
baldurk fe0f4ec879 [Coverity] Fix leak when converting thumbnail for fetch 2017-12-21 12:09:02 +00:00
baldurk c454bf21fb [Coverity] Fix leaking stream reader in error case 2017-12-21 12:07:36 +00:00
baldurk 4a45b9880c [Coverity] Fix memory leak in StartGlobalHook 2017-12-21 12:02:20 +00:00
baldurk 3d76448899 [Coverity] Remove redundant check as we handle NULL elsewhere 2017-12-21 11:58:14 +00:00
baldurk 5b19eab93d Don't call GetLiveID() on an already live ID 2017-12-21 11:52:39 +00:00
baldurk 51ebb61bf0 Add a marker region for PickPixel 2017-12-21 10:51:06 +00:00
baldurk b877f022fe RGBA8 UNORM images in the viewer should be treated as sRGB
* This makes the pixel pick values come back sRGB decoded.
2017-12-21 10:50:48 +00:00
baldurk b070a371e2 Improve D3D11 predication handling, and track other asyncs independently
* Instead of replaying predication, we now always skip it during replay,
  so all objects will render. This is much more consistent and
  understandable behaviour instead of things mysteriously disappearing
  with no obvious reason why.
* We track the predication that would have happened and replay Begin/End
  pairs so that we can know if the predication *would* have failed.
* This is displayed in the UI (currently in the raster state, for lack
  of a better location) with the pass/fail that would have happened.
* This information can feed into other places for analysis like the
  pixel history.
2017-12-20 23:41:08 +00:00
baldurk 669fa9dc40 Expose the total number of sections via ICaptureAccess
* This lets external code iterate over all sections.
2017-12-20 18:01:20 +00:00
baldurk cb4fb770e9 Finish section writer before deleting it, needed for compressed sections 2017-12-20 18:01:20 +00:00
baldurk 6f0756c6dd When trying to find a section by name, try known sections names
* In theory all sections of a known type should be written with their
  proper normalised name, but just in case a capture is a bit misformed
  let's try to look it up by type.
2017-12-20 18:01:20 +00:00
baldurk 0c1d602c37 Use ToStr not an internal array for fixed section names 2017-12-20 18:01:20 +00:00
Janos Pantos 78cce78cb1 Remap BGRA textures during remote replay if necessary
With GL driver or if the required GLES extension is missing, than we
display BGRA textures as RGBA.
2017-12-20 19:01:05 +01:00
Janos Pantos 3a0c55d0f7 Don't swizzle R/B channels for BGRA proxy textures 2017-12-20 19:01:05 +01:00