Commit Graph
79 Commits
Author SHA1 Message Date
baldurk 28dcc80892 Implement D3D12's CreateSampler2 and new sampler parameters 2023-05-19 14:54:39 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk 8245b99b56 Avoid some redundant checks in GetLiveResource
* Historically we always expected a live resource, but with descriptors that can
  be stale we can have a lot of queries where it's fine to just get NULL back if
  the resource doesn't exist.
2021-10-19 18:12:19 +01:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk cc36581592 Restore initial state for resources created mid-frame on D3D12 2021-01-06 16:58:43 +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
Steve Karolewics 8e988f9045 Eliminate removeIf from barriers that slowed down opening captures 2020-04-28 18:15:20 +01: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
baldurk 6d1d302491 Fix a number of warnings identified by higher clang warning levels
* We enable a couple of high signal-to-noise warnings in all clang builds
2019-12-02 20:41:28 +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 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 fb333ebc9b Remove 'using std::map'
* This will make it easier to replace std::map in future
2019-05-15 14:12:17 +01:00
baldurk 2dc37ac232 Handle creating backbuffer views with non-NULL non-typed descriptor
* We already handle the case where e.g. D3D12_RENDER_TARGET_VIEW_DESC is NULL
  and we need to substitute in a typed descriptor for backbuffers. We didn't
  handle the case where
2019-02-25 15:31:43 +00: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
Benson Joeris da2375586c Rename FrameRefType values to clarify meanings 2019-02-12 10:09:55 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 159a67b853 Implement MSAA to Array colour copies. Closes #1023 2018-10-05 18:16:59 +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 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 919c0f11dd Override type for structured data when directly serialising a ResourceId 2018-02-15 10:57:31 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 203f6b5255 Silence some warnings about casting from one enum type to another
* Reported by Coverity Scan - I don't think any of these were actually
  a problem since the enum definitions all matched.
2017-11-22 19:11:19 +00:00
baldurk 6fcfdf3a1b Update D3D12 device non-wrapping code to new serialisation scheme 2017-11-08 18:24:43 +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 37213598bf Extract out D3D12 initial state code (unchanged) to separate file 2017-11-03 17:39:10 +00:00
baldurk 9ef0c5282c Make aligned buffer allocation a common function, out of serialiser 2017-11-03 16:15:19 +00:00
baldurk e1c55b7096 Check for non-NULL resource desc when creating descriptor 2017-11-03 15:53:27 +00:00
baldurk a379b9283e Ensure descriptors for multi-plane images are valid on replay 2017-10-25 00:22:40 +01:00
baldurk 1d90358872 If a resource is NULL, make sure we don't use an invalid descriptor
* This can happen if the resource was not included in the capture, but
  there was a descriptor passed (i.e. not NULL desc which is handled
  separately) which specifies some parameters, but leaves the format
  as UNKNOWN.
2017-10-25 00:12:09 +01:00
baldurk 8994bc0fb8 Store resource type with initial contents data 2017-08-31 10:48:16 +01:00
baldurk 29726388f6 Fix implementation of D3D12ResourceManager::SerialisableResource
* When referencing all resources we use this function to determine what
  should be excluded, and in this case we want to make sure that e.g.
  the device record and any swapchain records are included, but the
  queue/list records or frame capture record should be omitted as they
  will be included specially.
2017-06-28 10:50:01 +01:00
baldurk e3f09210b3 Fixes for 32-bit on D3D12 2017-03-07 12:46:53 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 0981a1e099 Fix single flush validate with combined initial state list use 2017-01-05 18:54:32 +01:00
baldurk 78706d3d01 Init copyheap after checking for errors
* This doesn't actually fix any problems, but a couple of crash reports
  exposed the fact that we try to use the result of CreateDescriptorHeap
  before checking for errors - this leads to a crash and hides the real
  problem.
2017-01-04 16:56:12 +00:00
baldurk 968805b39a Handle multiple swapchain buffers being present in a D3D12 capture 2016-11-24 19:47:05 +01:00
baldurk 46e4ccb5ee Batch up command lists used for preparing and applying initial state 2016-11-18 21:19:18 +01:00
baldurk 8d0915401f Unify feature macro handling 2016-11-07 18:14:49 +01:00
baldurk 090e4e5e9a Handle stale descriptors hanging around referencing re-used resources 2016-10-31 01:01:53 +01:00
baldurk 3c222af4e2 Make sure to frame-reference the contents of descriptor copy sources 2016-10-27 19:35:43 +02:00
baldurk 909d82cc1e Disable barrier logging/assertions by default 2016-10-26 23:14:17 +02:00
baldurk b14d7c2c0b return NULL for heaps that aren't in the capture 2016-10-21 21:44:24 +02:00
baldurk febe2b1ad9 Patch ExecuteIndirect call data to point to replayed GPU addresses 2016-10-21 21:44:24 +02:00
baldurk 812e4affd3 Tidy up remaining functions marking not-implemented stuff 2016-10-18 15:54:23 +02:00
baldurk 4253094557 Track resource event usage 2016-10-18 15:31:41 +02:00
baldurk 99b45aefb5 Minimal possible residency handling code
* We unwrap objects and track residency state, and when preparing init
  states if necessary then we make those resources resident and sync the
  list execute so we can evict them again immediately afterwards.
* On replay, all resources are created and left as resident, which could
  go over the budget available. If a frame uses close to or more than
  its total budget over the course of a frame this could fail. One fix
  to that would be to track referenced resources in command lists at
  replay time, and only make resident what we need for each list and
  execute them in isolation, then evict right after (so all frame
  resources are 'default evicted').
2016-10-18 12:12:54 +02:00
baldurk f436c4a6bf Handle descriptors as if they are volatile and track mid-capture updates 2016-10-14 11:56:33 +02:00