Commit Graph

13525 Commits

Author SHA1 Message Date
baldurk a1240f5f04 Fix mac compilation 2022-11-13 14:20:35 +00:00
baldurk bbdf7ffbca Make sure to upload mapped memory via cpu copy during loading on D3D12 2022-11-12 21:50:25 +00:00
baldurk 7291567fff Implement GPU-pushed readback for memory when optimal on D3D12 2022-11-11 15:25:51 +00:00
baldurk 7b96647dac When only returning used entries, skip entirely unused descriptor arrays 2022-11-09 18:02:46 +00:00
baldurk 61fc2f82f2 Improve iteration for large unused descriptor arrays in D3D12 pipeline 2022-11-09 17:51:33 +00:00
baldurk 6343a52c2f Conservatively reserve space for return arrays 2022-11-09 16:45:44 +00:00
baldurk ef2bdc995d Fix mutable bitmask being set when cache is populated 2022-11-09 16:36:49 +00:00
baldurk f0644a2257 Fix issue where multiple thumbnails would be added for overlapping binds
* Previously we iterated over each bind, and found the matching resources. Now
  we iterate over resources and find the matching bind. This matters when there
  are multiple overlapping binds so they are only found once (we don't
  disambguate which bind was used, as we don't elsewhere currently)
2022-11-09 14:15:15 +00:00
baldurk d11da2f3a1 Refactor texture viewer thumbnails to not use swapchains
* There seems to be a significant slowdown when using real swapchains, both for
  creation and display. Since thumbnails don't update often (only on event
  change, or if the panel is resized which is not a regular occurence)
  counterintuitively it's better to render and readback the image offscreen and
  re-upload it on the CPU.
2022-11-09 14:14:24 +00:00
baldurk 2e276a7f84 Remove rdcarray sized constructor 2022-11-09 13:22:53 +00:00
baldurk 2cf7b911c7 Fix refcounting issue with python frame objects 2022-11-09 12:20:48 +00:00
baldurk 742e3de252 Cache expanded views from large immutable D3D12 descriptor heaps
* The principle here is that on D3D12 it's common to have huge descriptor heaps
  in which only a handful of descriptors are changed. By caching the expanded
  D3D12Pipe::View results from these unchanging descriptors we don't have to do
  that over and over. Any descriptors written in the captured frame may have
  different contents depending on where we've replayed up to, so we don't cache
  them to keep things simple rather than invalidating the cache.
2022-11-08 17:42:18 +00:00
baldurk ffe09f1cb0 Do a better job of reserving memory for D3D12 pipeline state arrays 2022-11-08 16:26:09 +00:00
baldurk a21b78f55a Treat custom heaps on D3D12 with appropriate properties as CPU-copied 2022-11-08 16:16:31 +00:00
baldurk aacbaa77fb Refactor D3D12 map to do CPU uploads directly into mapped memory 2022-11-08 15:46:04 +00:00
baldurk 909b400683 Increase the data upload list array to 64 to reduce mid-frame syncs 2022-11-08 15:40:29 +00:00
baldurk 94c6b36e44 Don't mark draws as having valid empty feedback results 2022-11-08 15:40:16 +00:00
baldurk c4088be170 In-line buffer -> MSAA copies into command buffer rather than splitting
* We defer destruction of the view objects created until the next flush. In
  future this could be smarter about associating resource destructions with a
  submitted batch and deferring further until a fence is signalled to avoid
  synchronisation.
2022-11-08 13:12:35 +00:00
baldurk e400e9c4f6 Use initial state command buffer for memory 2022-11-08 13:12:35 +00:00
baldurk 4a6c34ac11 Account for D3D12 applications that call CheckFeatureSupport often
* The log is spammy if they check once per frame for example.
2022-11-08 13:12:35 +00:00
Sebastien Alaiwan 3bfea49a2d Fix uninitialized variable 2022-11-07 13:31:27 +01:00
Oliver Enseling 5451acedc1 source home directory from ${HOME} 2022-11-04 20:34:48 +01:00
baldurk 672557f8fa Add some internal logging for D3D12 CheckFeatureSupport calls 2022-11-04 17:42:23 +00:00
baldurk 8e4ae67929 Only apply D3D12Core.dll signature check to untrusted files
* UE5 at least currently (as of this commit) re-signs D3D12Core.dll by Epic.
  Rather than failing to load all such captures, only fail if the capture is
  marked as downloaded since local captures should be implicitly trusted.
2022-11-04 17:42:23 +00:00
Brian Osman 7a3ea53b3d vkEnumeratePhysicalDevices: Handle count being too small
Per the Vulkan Spec: "If pPhysicalDeviceCount is less than the number of physical devices available, at most pPhysicalDeviceCount structures will be written, and VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available physical devices were returned."
2022-11-03 16:48:55 +01:00
baldurk 95ade35dab Implement vkSetDeviceMemoryPriorityEXT and allow extensions 2022-11-03 12:47:13 +00:00
baldurk 86807180d1 Implement memory oversubscription vulkan extensions 2022-11-02 16:49:48 +00:00
baldurk 30453eb8ce Treat it as valid if no shaders that use dynamic resources are invoked
* E.g. if a draw is off-screen, the PS might not be invoked. If that's the only
  place we expect to see dynamic resources accessed we won't get our valid
  marker but the results should still be considered correct.
2022-11-02 15:29:16 +00:00
baldurk 9df7d40241 Fix compilation on python version update on mac CI 2022-11-02 12:22:33 +00:00
baldurk 32dbbaa707 Correctly handle D3D12 resources with no sparse subresources at all 2022-11-01 16:33:37 +00:00
baldurk 52b5a8954e Update superluminal API header to most recent version 2022-11-01 16:33:37 +00:00
baldurk 3f9bf1ab27 Fix crash handler not launching as expected in official builds 2022-11-01 16:33:37 +00:00
baldurk 2c220e7af0 Fix calculation of offsets on root descriptor buffers
* The stride these buffers are accessed with in the shader is not guaranteed to
  be 4 bytes when used untyped (e.g. structured buffers) so we can't assume it
  and bake the offset into element count. Instead fetch data starting at that
  offset and list a first element of 0.
2022-11-01 16:33:37 +00:00
baldurk 72d4d2702d Remove references to Stadia 2022-10-28 15:36:26 +01:00
baldurk 7393c6db5a Don't refer specifically to windows 10, include all versions
* Windows versions numbers no longer make sense since 11 is just 10 with a worse
  UI refresh, but since it works the same it will be supported as well.
2022-10-28 15:36:15 +01:00
baldurk 1303a50cf5 Sampler tables should not be marked as data volatile (the default) 2022-10-28 14:13:06 +01:00
baldurk 91a77c1698 Re-order builtin inputs to try and avoid suspected AMD driver bug
* In principle the fake SV_ inputs should be able to come in any order, but it
  seems if SV_IsFrontFace is last it can get undefined/wrong results (e.g.
  returning 1 when front-face culling is enabled or vice-versa). Moving it to
  the first seems to fix the issue, and at least shouldn't make anything any
  worse.
2022-10-28 14:12:51 +01:00
baldurk 28b63fe56c Protect against invalid values in view desc for number of mips
* This is mostly relevant for D3D12, where the desc comes from the user and so
  may not be normalised and contain values like 0xffffffff to indicate 'all
  mips' or 'all slices' in the view.
2022-10-28 11:41:43 +01:00
baldurk 6f29b8b939 Work around fxc warnings when building with optimisation disabled 2022-10-27 16:22:54 +01:00
baldurk 3f31671cc3 Use existing depth value to better select candidates for debug on D3D12 2022-10-27 16:05:07 +01:00
baldurk 9e9a333b56 Fix D3D shader debug ddx/ddy being the wrong way around 2022-10-27 16:04:35 +01:00
baldurk d9d06c8390 Fix handling of RANGE_OFFSET_APPEND in multi-type tables in D3D12
* Previously we would only process ranges we were interested in when looking for
  a descriptor, but we need to process all ranges in a table to properly track
  the offset for APPEND.
2022-10-27 11:00:23 +01:00
baldurk 85118ed46c Remove unused variable 2022-10-26 17:47:16 +01:00
baldurk e36c247c6e Upgrade some non-spammy useful log messages from debug logs 2022-10-26 17:09:23 +01:00
baldurk 10d4c69433 Skip unmapped subresources when serialising sparse init states on D3D12 2022-10-26 17:09:05 +01:00
baldurk 4612d71df5 Switch some maps to unordered in resource manager 2022-10-26 13:08:17 +01:00
baldurk 972f56d45a Display type-incompatible bindings overlapping in GL in pipeline view
* This is possible if two sampler uniforms point to the same slot but they are
  not compatible sampler types.
2022-10-21 16:21:34 +01:00
baldurk bdff6cd855 Delete orphaned file 2022-10-20 16:12:34 +01:00
baldurk ea4aa16455 Force custom display shaders VS explicit output location. Closes #2757
* This works around an obtuse GL requirement that explicit locations on one side
  will cause a break in compatibility with the other side, even if dropping the
  location would work otherwise.
2022-10-20 12:50:00 +01:00
baldurk 71684f1003 In VK pipeline view, look up FB from RP attachments. Closes #2756
* Doing this lets us more consistently reference the color attachments in the
  correct indices and makes it easier to match for blends. It also allows the
  user to show unused/empty attachments
2022-10-20 12:36:49 +01:00