Commit Graph
154 Commits
Author SHA1 Message Date
baldurk d6e88ae4fa Remove redundant callstack member in APIEvent
* We already link to the chunk index and the chunk metadata contains the
  callstack, there's no need for a duplicate copy when there may be many
  APIEvents in a capture
2021-02-24 13:52:07 +00:00
baldurk 30dd13feb8 Pull index byte width and topology out of drawcall state
* These are treated as state on most APIs, only GL treats it as a drawcall
  parameter.
2021-02-24 13:52:07 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 659fdaa235 Check that all complex struct members that have :type: in docstrings
* Ideally we'd document every member unconditionally for best autocompletion,
  but that's a lot of modification so for now we stick to just making sure that
  any members that are struct types (or lists/tuples) have the :type:
  declaration so that we can autocomplete inside them.
2020-12-09 15:18:27 +00:00
baldurk 41c57c0b68 Tidy up logging of unknown interface queries 2020-10-30 16:49:57 +00:00
baldurk 8548892939 Add support for new D3D interfaces
* Nothing interesting/useful is supported here, we just add new interfaces that
  we recognise even though the user can't use them since we don't report support
  for the new features.
* This also makes it easier to track future changes when we're not behind.
2020-10-30 16:49:57 +00:00
baldurk 584746e406 Support capturing & replaying shader extensions with nvapi in DX11&12 2020-10-29 10:16:14 +00:00
baldurk 88748858c4 Don't add graphics binding usage for dispatches or vice-versa in D3D11 2020-10-21 10:06:43 +01:00
baldurk 213e19be01 Fix double-delete of immediate context on D3D11 2020-09-14 12:33:28 +01:00
baldurk d671c66bea Remove reliance on wrapped pool IsAlloc
* In most cases we either know the type, or we can use the generic parent
  WrappedDeviceChild11 to get what we want.
2020-09-10 14:45:46 +01:00
baldurk fdeea5204d Refactor and optimise D3D11 refcounting implementation
* In heavy D3D11 workloads the refcounting overhead especially during fast
  binding changes was significant. Refactoring the refcounting to work on a
  different model and deferring destruction of objects removes most of the
  overhead.
2020-09-10 13:35:32 +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 1b844d1498 Add resettable chunk allocator for recording command buffers 2020-08-26 19:27:41 +01:00
baldurk d922db6dff Fix broken re-use of resource shadow deferred ctx pointers. Closes #2023 2020-08-26 19:14:42 +01:00
baldurk e472536c5a Don't read off end of capture if CaptureEnd chunk is missing 2020-05-29 17:49:57 +01:00
baldurk 671ceacb59 Fix structured export crash on D3D11 2020-05-28 15:54:35 +01:00
baldurk 141609e7de Cache D3D11 context type to avoid needing to fetch from real object 2020-05-26 15:44:56 +01:00
baldurk 7ff8a95205 Don't end stream-out queries twice 2020-03-20 16:16:52 +00:00
baldurk 8293a86530 Don't record rasterization event usage for dispatch calls 2020-03-02 17:37:23 +00:00
baldurk bf92f9adf0 Fix a crash loading a completely empty capture on D3D11 2020-02-05 14:39:37 +00:00
baldurk baac06ca93 Remove redundant/dead code identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk 11f1f30b46 Fix crash when mapping textures on deferred contexts 2020-01-20 12:23:47 +00:00
baldurk cec30d499a Use ToStr() instead of %llu to format Resource IDs 2020-01-17 19:53:38 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk e38c000da9 Fix D3D11 replay wrongly complaining about processed chunks 2019-12-18 21:26:13 +00:00
baldurk 6f58c680c7 Ensure chunks are explicitly handled so we get a warning if we miss one 2019-12-17 18:02:10 +00:00
baldurk b850abdfa0 Remove std::vector/std::string use from D3D11 driver 2019-12-16 18:10:32 +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 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 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 b8c2058e3b Refactor FreeCaptureData() on D3D11 to not rely on buffer list 2019-07-22 14:52:42 +01:00
baldurk 8aa515a47a Make drivers m_Events a direct lookup
* Rather than doing an expensive iteration for looking up m_Events, just index
  by eventId which will be very dense.
2019-05-20 12:24:41 +01:00
baldurk 7206a0cd25 Removing 'use std::vector' 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 95e63cb965 Remove pending-dirty operations, mark resources dirty immediately
* Now that the dirty list is only read once at the start of the frame we can
  mark resources dirty mid-frame freely and don't have to defer that. The
  internal resource manager locking prevents us from adding to the list while it
  is being modified.
2019-05-15 14:12:17 +01:00
baldurk 0ae245c4a8 Refactor initial state callbacks to always allow deleted resources
* Instead of passing the resource handle itself to GetSize_InitialState or
  Serialise_InitialState, we pass the Id, ResourceRecord, and prepared initial
  contents. All of these can survive past the destruction of the resource.
* Removes the need for AllowDeletedResource_InitialState() - it's always allowed
  now.
* Need_InitialStateChunk is also refactored but it's only used on D3D11
  currently and potentially will be removed in future.
2019-05-14 17:13:22 +01:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 86dd6c370f Add pass-through unwrapping hooks of D3D11 Video interfaces. Closes #922 2018-12-12 23:53:35 +00:00
baldurk 92f48ea54b Implement ID3D11Multithread support for automatic locking
* Unfortunately ID3D11Multithread::SetMultithreadProtected adds an auto-locking
  thread safe mode for all D3D functions, so we have to add a check for it and a
  lock to every context function. This will add a small amount of overhead even
  when the mode isn't enabled, but it shouldn't be significant.
2018-12-12 23:53:15 +00:00
baldurk e1d0275b70 Fix D3D11.5 fence creation
* Casting directly to void * from the wrong type will cause vtable mismatches
2018-11-13 18:30:43 +00:00
baldurk 8879d9a9bf Don't add API Calls dummy draws inside regions for only marker API calls
* On Vulkan/D3D12 we only do this for actual regions, for command buffer
  boundaries we always insert the dummy draw.
2018-10-04 16:07:36 +01:00
baldurk 5287a44e80 Handle 0 byte resource updates (possible with empty UpdateSubResource) 2018-08-27 17:09:16 +01:00
baldurk 8e2a2b13c1 Clean up handling of internal resources
* This reduces code complexity and divergence between the backends, as well as
  prevents internal resources in captures from being included when 'Ref All
  Resources' is enabled.
2018-08-06 16:48:04 +01:00
baldurk 45c3c27923 Rename DrawFlags::UseIBuffer to DrawFlags::Indexed 2018-06-15 19:40:54 +01:00
baldurk 246e379c52 Update to D3D11.4 interfaces. Refs #864
* This is just a pass-through implementation as fences do not have to be
  serialised.
2018-05-24 21:42:30 +01:00
baldurk 2402ac7fa0 Add version checking to serialiser 2018-05-04 12:51:51 +01:00
baldurk a57cc118af Add events for markers in GL/D3D11 so they don't mess up replay
* If a marker was the very first event, we want to be able to fetch it
  so the replay isn't off-by-one after that.
2018-02-21 18:29:51 +00:00
baldurk 919c0f11dd Override type for structured data when directly serialising a ResourceId 2018-02-15 10:57:31 +00:00
baldurk ad841a0341 Add a limit for warning on unknown GUID QueryInterface calls 2018-01-25 10:36:16 +00:00