Commit Graph

4422 Commits

Author SHA1 Message Date
baldurk ab9ada685a Add basic serialisation of bundle execution, without stepping-in support 2016-10-26 23:14:14 +02:00
baldurk dd0a68c9c9 Sync on all queue fences to ensure work is done before shutdown 2016-10-26 23:14:14 +02:00
baldurk a69012e50d Signal dummy fences on all queues to keep debug layers happy 2016-10-26 23:14:13 +02:00
baldurk 2f2da067b0 Account for range start when reading from map ptr to serialise map data 2016-10-26 23:14:12 +02:00
baldurk 939f1102e3 Add SINGLE_FLUSH_VALIDATE single execution of lists and syncing 2016-10-26 23:14:12 +02:00
baldurk 95c2863ab2 When GPU syncing, check that it's successful & wait long enough for TDR
* This means if we're trying to track a TDR by SINGLE_FLUSH_VALIDATE we
  will definitely catch it failing here.
2016-10-26 23:14:11 +02:00
baldurk 451203187d Handle nested Map/Unmap calls by refcounting 2016-10-26 23:14:10 +02:00
baldurk e8e7ad711a Don't set stale table root signature entries for non-current heaps
* The problem is we need to keep current state for both graphics and
  compute because while setting a root signature invalidates bindings,
  setting compute doesn't invalidate graphics and vice-versa.
* However it can be invalid to try and re-apply in one go if we're only
  drawing and not dispatching and some of the compute elements are
  invalid.
* Rather than try to figure out which one *should* be valid, instead we
  just skip invalid binds that don't have matching heaps.
2016-10-26 23:14:10 +02:00
baldurk 447b64fd14 Wrap DXGI 1.5 passthrough, to ensure the wrapping ecosystem isn't broken 2016-10-26 17:10:05 +02:00
baldurk 2c7791c7bd Don't wrap each DXGI interface individually, wrap most derived
* This lets naughty applications downcast e.g. from an IDXGIAdapter to a
  IDXGIAdapter1 without QueryInterfacing (I'm looking at you, ROTTR).
2016-10-26 13:20:07 +02:00
baldurk 0178ea6bb9 Handle setting empty RTs list even if RTsSingleHandle.. is set 2016-10-26 13:17:49 +02:00
baldurk 8acd5ab27d Capture and replay commands executed on multiple queues 2016-10-26 10:48:03 +02:00
baldurk 135ec6858d D3D12 guarantees that queues are thread-safe 2016-10-26 09:29:43 +02:00
baldurk 8fbf7ede1b Make a cracked allocator per real allocator, for threaded recording
* Threaded recording means the recording chunks are all interleaved in
  the log so we may be cracking multiple command lists at the same time
  and so need multiple allocators. Since the original capture obeyed the
  rule of only recording to one list from an allocator at once, making a
  cracked allocator for each also obeys that rule.
2016-10-26 08:56:41 +02:00
Baldur Karlsson 7e2296911c Minor typo fix in README 2016-10-25 21:41:02 +02:00
baldurk d7aa40b3b1 Copy in 64-bit and 32-bit android files into distribution 2016-10-25 19:50:09 +02:00
baldurk f368a65843 Add easy support for self-hosted captures on windows only
* By renaming the renderdoc and renderdoccmd projects to something else
  (say 'selfhost' and 'selfhostcmd') then they can be used to capture
  renderdocui and the replaying that's happening.
* Only supported on development builds and might break down, but it's
  handy to have as an easy to enable option.
* There's also a couple of handy python functions exposed -
  renderdoc.StaticExports.StartSelfHostCapture(string dllname)
  renderdoc.StaticExports.EndSelfHostCapture(string dllname)
  which can be used to start and stop the capture around e.g. a shader
  debug operation or a pixel history operation or something similar.
2016-10-25 19:50:04 +02:00
baldurk aa5c55e4e4 Handle querying D3D device for multiple interfaces, from DXGI. Refs #402 2016-10-25 13:45:54 +02:00
baldurk cde22aace7 Hook WSAStartup/WSACleanup to workaround app bugs. Refs #362, #403
* If the application incorrectly calls WSACleanup() before WSAStartup()
  then instead of just an error for invalid use, it will instead kill
  all of the sockets we created from our early WSAStartup().
* To fix this, we hook those functions and track the process wide ref-
  count, to prevent it from every going to 0 until we shut down our own.
* This was found on GTA 5 in particular but possibly some other
  application will do this too.
2016-10-25 12:03:28 +02:00
baldurk ea657cd408 Clear the fake backbuffer at creation time 2016-10-24 20:45:59 +02:00
baldurk cde196999c Generate and allow stubs for GL 1.0-1.2 deprecated functions
* Still no plans to support these, but at least this will allow them to
  be queried for. This might happen if e.g. an extension loader or old
  bit of code just loads all functions unconditionally and might error
  if one of these functions isn't found, even if it has no intention of
  actually calling it.
2016-10-24 20:10:04 +02:00
baldurk f92bf05571 Handle compressed block depth being 0 if only 2D blocks are unpacked
* If we're only compressing 2D blocks the compressed block depth can be
  0 and that's totally valid. We can't unconditionally divide through,
  so sanitise inputs to make sure calculations are sensible.
2016-10-24 19:56:55 +02:00
baldurk dab9d9d9f8 Correct copySource/copyDestination on framebuffer blits
* We choose the first color attachment if the blit includes color, or
  the depth/stencil attachment otherwise.
2016-10-24 19:55:29 +02:00
baldurk 5cca910a85 Handle render buffers properly in GetTextureData
* We blit to and read from a texture since render buffers can't be read
  from directly.
2016-10-24 19:54:50 +02:00
baldurk aab34d8fd0 On replay when no unpack buffer is bound, ensure unpack state is reset
* During capture if there was no unpack buffer we made sure that any
  unpack state was applied during serialisation (as this makes sure that
  we have a small set of data to serialise and don't have to serialise
  loads of padding because of SKIP_ROWS or a large ROW_LENGTH)
* The flipside though is that it means on replay the pixel unpack state
  might be set still with some configuration that we've already applied.
  So instead we reset it back to identity before replaying any SubImage
  call.
2016-10-24 18:42:49 +02:00
baldurk a6d5a7c35e Compile fixes for shadowed variables 2016-10-21 22:27:19 +02:00
baldurk a293c5fad8 Unwrap objects before forwaring vkDebugMarkerSetObject* 2016-10-21 09:07:00 +01:00
baldurk 6655f9d789 Instead of overwriting each constant set, accumulate constant values 2016-10-21 21:44:24 +02:00
baldurk 989a86028d Fix case where byte count was mixed with uint32 count (clarify code) 2016-10-21 21:44:24 +02:00
baldurk d7fe790f72 Add a UAV barrier at the end of ReplayLog() to ensure UAV work is done 2016-10-21 21:44:24 +02:00
baldurk 119ff00440 Don't get cbuffer in constructor, do that in OnLogFileLoaded when shown 2016-10-21 21:44:24 +02:00
baldurk c80cafe85c Fetch value of counter resource (if present) 2016-10-21 21:44:24 +02:00
baldurk 7aec327133 Implement shader edit & replace for D3D12 2016-10-21 21:44:24 +02:00
baldurk 4545761f42 Unregister logviewer callback when constant buffer previewer is closed 2016-10-21 21:44:24 +02:00
baldurk 3e94689089 Add UAVs into UAV list 2016-10-21 21:44:24 +02:00
baldurk b14d7c2c0b return NULL for heaps that aren't in the capture 2016-10-21 21:44:24 +02:00
baldurk 11e6c1f478 Add dynamic sampler writes into frame capture record 2016-10-21 21:44:24 +02:00
baldurk 6060bb9fcb Fix indirect enum order 2016-10-21 21:44:24 +02:00
baldurk c23633b85d Handle ExecuteIndirect by cracking lists apart and patching during read 2016-10-21 21:44:24 +02:00
baldurk df903cd191 Allocate indirect buffers for storing immutable patched copies of args 2016-10-21 21:44:24 +02:00
baldurk 5978305794 Optionally skip adding event usage (if it will be done post-patching) 2016-10-21 21:44:24 +02:00
baldurk 9f319e035e Store list ID and relative EID for each drawcall use, for lookup later 2016-10-21 21:44:24 +02:00
baldurk 9a6a05bf6d Sure type and nodemask when resetting a list to allow cracking 2016-10-21 21:44:24 +02:00
baldurk 5921a50bc4 Close readback list after creation, so we can just always reset it 2016-10-21 21:44:24 +02:00
baldurk 12d9bd511a Remove unused chunk type parameter from AddEvent() calls 2016-10-21 21:44:24 +02:00
baldurk bd73731ba8 Execute command lists one-by-one during reading 2016-10-21 21:44:24 +02:00
baldurk 8dffc24383 Record command lists twice, so they can be cracked apart around executes 2016-10-21 21:44:24 +02:00
baldurk aeb5eb76f8 Track complete state vector during reading pass
* This will be needed for cracking apart command lists with indirect
  executes.
2016-10-21 21:44:24 +02:00
baldurk 19685c80a4 Handle replaying of ExecuteIndirect non-indirectly and add fake events 2016-10-21 21:44:24 +02:00
baldurk 52232ad5b8 For now, skip replaying query functions 2016-10-21 21:44:24 +02:00