Commit Graph

4441 Commits

Author SHA1 Message Date
baldurk b36b120638 Don't store bound descriptors in a set, just a vector with duplicates 2016-10-27 19:35:46 +02:00
baldurk 37e56e91b0 Only emit debug text in non-RELEASE 2016-10-27 19:35:45 +02:00
baldurk f7c155acd3 Unwrap presentation queues passed to ResizeBuffers1 2016-10-27 19:35:44 +02:00
baldurk 3c222af4e2 Make sure to frame-reference the contents of descriptor copy sources 2016-10-27 19:35:43 +02:00
baldurk b796669909 Print size of each individual command list, not total size 2016-10-27 19:35:42 +02:00
baldurk 58ecabc7c4 Make sure persistent map check includes resources in bound descriptors 2016-10-27 16:23:09 +02:00
baldurk 95f955a5bb Put whole of ExecuteCommandLists processing in cap transition lock
* This is needed because processing of flushing persistent maps and
  using shadow memory needs to happen before it's deallocated at the end
  of the frame.
2016-10-27 15:43:39 +02:00
baldurk ff547fa24f Only allocate DSVs for output windows with depth. 2016-10-27 15:42:37 +02:00
baldurk 3357898855 Unwrap resource to discard on replay 2016-10-27 14:01:16 +02:00
baldurk 07c9b3697b Check for truncated reads when decompressing 2016-10-27 12:40:19 +02:00
baldurk edcce279d2 Don't write debug text string all in one fwrite call 2016-10-27 12:39:47 +02:00
baldurk c49496bc16 Don't overwrite sampler types during writing 2016-10-27 12:39:17 +02:00
baldurk 88939d1f21 Only add wrapped resources to list on replay (which is single threaded) 2016-10-27 11:35:03 +02:00
baldurk 0832bff675 Use command queue that created a swapchain for writing to backbuffers 2016-10-27 11:34:17 +02:00
baldurk 909d82cc1e Disable barrier logging/assertions by default 2016-10-26 23:14:17 +02:00
baldurk f26876adf3 Only ask for virtual address of buffers 2016-10-26 23:14:17 +02:00
baldurk e1c0400e40 Lock around access to GPUAddressRange vector 2016-10-26 23:14:16 +02:00
baldurk a396713f3c Increase size of initial pipeline state pool 2016-10-26 23:14:16 +02:00
baldurk 51ba0000ed Increase MAX_NUM_BACKBUFFERS 2016-10-26 23:14:15 +02:00
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