Commit Graph
31 Commits
Author SHA1 Message Date
baldurk 4619a54771 Properly set optional/newer D3D12 state when applying 2021-02-10 14:20:46 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk baac06ca93 Remove redundant/dead code identified by PVS Studio 2020-01-21 18:28:56 +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 37a255c8a4 Remove std::vector/std::string use from D3D12 driver 2019-12-16 18:10:32 +00:00
Steve Karolewics a88deaeba0 Implement D3D12Replay::DebugPixel
This enables the core loop of capturing PS inputs, building shader
debug state, and walking through a shader's instructions.
2019-12-12 17:58:25 +00:00
baldurk 0bcf9a4e2d Update DX headers to 10.0.18362.0, add new interfaces
* ID3D12GraphicsCommandList5 and ID3D12Device6
2019-09-19 20:09:38 +01:00
baldurk 7206a0cd25 Removing 'use std::vector' 2019-05-17 16:32:56 +01:00
baldurk e01bc4c734 Implement untested support for D3D12.3/D3D12.4 interfaces. Closes #1268
* Most of the interfaces are not supported - protected sessions, raytracing,
  etc.
* We also split apart the 1/2/3/4 wrapped implementations to avoid uber files.
2019-02-19 17:54:53 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk b90efe114a Check for D3D12 hardware feature support even if interface is available 2018-08-14 19:42:37 +01:00
baldurk 8024c8c342 Store and serialise resources in D3D12 descriptors by id directly
* The problem with storing resource pointers in descriptors is that it can be
  invalidated without detection - a kind of A-B-A problem - if the resource is
  deleted and then another resource is allocated with the same pointer.
* Descriptor creation in D3D12 is extremely complex and there are many ways a
  resource could become incompatible with the descriptor metadata struct.
  Detecting all possible ways a new resource could be incompatible is not
  feasible.
* As a solution, we store the ResourceId which we know is immutable, serialise
  via the pointer, and keep the live ResourceId on replay. If the resource was
  deleted, the serialisation will fail because we look up the pointer at the
  point of serialise, and a deleted resource will end up being NULL.
* To try and abstract this away and avoid potential confusion with the
  ResourceIds, we make the descriptor contents private and provide accessors.
2018-06-18 15:20:08 +01:00
baldurk 72b40769b5 Add support for D3D12 up to D3D12.3. Closes #966 2018-06-07 14:49:07 +01:00
baldurk a77e6a0acd Read & Serialise D3D12 CPU descriptor contents immediately
* For Clear*View and OMSetRenderTargetViews, the CPU descriptor handles
  used are read immediately, the heap can be modified or even deleted
  after the call.
* So we save the contents of the descriptor, ignore the heap, and then
  fill a temporary heap with the descriptor whenever it's needed.
2018-05-10 15:17:54 +01:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 3aa8398ec2 Update D3D12 command list wrapping code to new serialisation 2017-11-08 18:24:47 +00:00
baldurk c2a8e19d07 Split D3D12 struct serialisers separately&serialise interfaces directly
* Interface objects are serialised by type as their ResourceId - see the
  D3D11 code that does the same thing for more explanation.
2017-11-08 18:24:42 +00:00
baldurk 7e3e86f56f Don't apply graphics state to compute or copy command lists 2017-06-21 11:06:58 +01:00
baldurk 70b2976b9a Protect against crashing if VB is not bound 2017-01-18 13:05:37 +01:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 11a3e65654 Make sure we don't index into empty RTs array with rtSingle. Refs #482 2017-01-05 18:54:18 +01:00
baldurk 8fe6a51dbc Add utility for setting only root elements, instead of the whole state 2016-11-18 16:31:26 +01:00
baldurk 12dbff9adf Fix check for skipping invalid root signature elements 2016-11-18 16:31:09 +01:00
baldurk 1ceb9ee6e7 Don't crash if no RTVs are set with SingleHandleRT true 2016-10-28 17:42:11 +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 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 89e8743e08 Handle stencil ref and blend factor commands for D3D12 2016-09-19 18:31:25 +02:00
baldurk 0bb42a0629 Set compute root signature elements to compute, not graphics 2016-09-19 18:31:21 +02:00
baldurk 699dde6563 Serialise SetDescriptorHeaps and SetGraphicsRootDescriptorTable 2016-08-06 18:31:43 +02:00
baldurk 407bca01e8 Track renderstate as we go, and allow replaying single draws with it 2016-08-06 18:31:22 +02:00