Commit Graph

14390 Commits

Author SHA1 Message Date
Dustin Toff 59e6edcfea Fix posix ApplyEnvironmentModifications for repeated modifications
This behavior is correctly applied on Windows but on posix systems would fail to apply duplicate
entries that should be additive, such as multiple prepends. Previously only the last modification
would win.
2024-02-28 07:35:42 +00:00
Cam Mannett fa70f8fa87 Ray Query API interception and serialisation
Ignoring acceleration structure host-build for now, and by extension deferred operation handle functions are pass-though (i.e. ignored on replay).
2024-02-27 11:15:01 +00:00
baldurk e5410ad8fb Allow naming queues and command buffers on D3D12 2024-02-26 14:09:27 +00:00
baldurk 230b63adce Find latest dxc from windows SDK, not from redist folder, in demos
* It seems like the D3D redist folder is not kept up to date so may contain a
  stale/old DLL.
2024-02-26 12:49:02 +00:00
baldurk 58cc331e27 Use a dedicated transfer queue for D3D12 GPU readbacks
* This prevents a potential deadlock/failed readback situation if the queue
  we're submitting on at the time memory needs to be read is currently blocked
  by a pending wait and can't execute more code.
2024-02-23 18:50:31 +00:00
baldurk ec17ee5999 Batch calls to GetPostVSBuffers to work around Android being awful
* On Android the end-to-end latency of a single call is large enough that doing
  a call per-instance in a draw with a high number of instances is a real
  problem
2024-02-23 15:00:28 +00:00
baldurk 36f4432351 Calculate tighter bounds for data copied in D3D11 initial states
* This can be a problem since copying by pitch * count can slightly over-read if
  the pitch is larger than a row or slice, potentially reading into unmapped
  pages.
2024-02-23 14:09:40 +00:00
baldurk ac18f52757 Fix incorrect index being used when rebinding partial state 2024-02-23 13:52:24 +00:00
baldurk a5073a6868 Fix incorrect sizes used for calculating next patch size 2024-02-23 13:23:57 +00:00
baldurk bfebf53be0 Add new image layout to descriptor storage enum 2024-02-19 14:45:46 +00:00
Jovan Ristic 0f6c619e54 D3D12 Pixel History fix format conversion.
* DecodeFormattedComponents converted everything to floats which were
then reinterpreted as int or uint via the unioned fields of PixelValue,
resulting in erroneous value display in PixelHistoryView.
* I've made a pixel history specific version of the format conversion
which treats the values the way the viewer expects.
2024-02-15 07:47:46 +00:00
Jake Turner 932caeb7c8 Enable the D3D12 Pixel History feature
Removed the developer config option D3D12_PixelHistory
2024-02-15 06:01:46 +00:00
Jake Turner 226bf7071b Add ShaderBuiltin::MultiViewIndex
Mapped to:
SPIR-V ViewIndex (which was previously mapped to ShaderBuiltin::ViewportIndex)
GL gl_ViewIndex
2024-02-14 11:10:15 +00:00
Jake Turner 045a71082b D3D12 Pixel History support for direct DispatchMesh draws
D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_MESH is not supported
2024-02-14 07:50:20 +00:00
Jake Turner 893142d7f0 In Pixel History always shaderOut for depth targets
Including when there is no pixel shader bound
2024-02-13 17:27:05 +00:00
Jake Turner e254e66ae4 In Pixel History View do not force shaderOut to show four components
Matches the formatting used for "Tex Before" and "Tex After"
2024-02-13 17:27:05 +00:00
Jake Turner 364f5998c2 In Vulkan Pixel History zero out unwritten shaderOut elements
In Vulkan these are not defined to be zero (behaviour is driver dependent)
2024-02-13 17:27:04 +00:00
Jake Turner 822b770569 Use the loadRP when making the pipeline for Vulkan Pixel Debug
Fixes validation error related to dependencies:

VUID-vkCmdDraw-renderPass-02684] Validation Error: [ VUID-vkCmdDraw-renderPass-02684 ] Object 0: handle = 0x61ee4f000000021b, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0x1c2336000000021a, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x50685725 | vkCmdDraw: RenderPasses incompatible between active render pass w/ VkRenderPass 0x61ee4f000000021b[] with a dependencyCount of 0 and pipeline state object w/ VkRenderPass 0x1c2336000000021a[] with a dependencyCount of 2. The Vulkan spec states: The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS (https://vulkan.lunarg.com/doc/view/1.3.261.1/windows/1.3-extensions/vkspec.html#VUID-vkCmdDraw-renderPass-02684)
2024-02-13 17:27:04 +00:00
Jake Turner a62634717e Vulkan BDA debugging force m_BufferAddresses to be sorted
The implementation usage of m_BufferAddresses assumes the container is sorted and requires the use of lower_bound() API

Added rdcsortedflatmap subclass of rdcflatmap
Only expose upper_bound(), lower_bound() APIs in rdcsortedflatmap
The upper/lower bound APIs require a sorted container
2024-02-13 17:03:42 +00:00
baldurk 52cfb0e083 Update Vulkan headers to latest, support trivially promoted exts
* We handle support for trivially supported exts like KHR_index_type_uint8 and
  KHR_calibrated_timestamps as it would be more churn and work to temporarily
  make them unsupported, given how they are almost entirely just aliased.
2024-02-13 12:37:05 +00:00
baldurk a2abef423f Fix GIPA and GDPA behaviour to return NULL for unknown functions
* This is the spec-compliant way to handle unknown functions.
2024-02-13 12:37:05 +00:00
baldurk 874920bc38 Fix potential crash on capture close accessing bad data
* Also added some conservative error checking on looking up chunk names.
2024-02-13 12:37:05 +00:00
Jovan Ristic 8d8b76ead7 D3D12 pixel history execute indirect.
* Cache indirect parameters pre-callback so they can be used for replay.
* Move ReplayDraw implementation to device so it can be re-used.
* Non-callback support left as a TODO + Assert.
2024-02-13 08:54:18 +00:00
Jovan Ristic 8108516b56 D3D12 Pixel History handle resolve events.
* Add action callbacks for ResolveSubresource so pixel history can
record pre- and post-mods for the events.
2024-02-13 08:47:11 +00:00
Jovan Ristic dbfd1287cf D3D12 Pixel History state tracking.
* For capture resources, use the actual resource state at the time of
the event rather than a hardcoded state.
* When hardcoded RT source state was used, on UAV events attempting to
transition a texture which was not created with the RTV flag from that
state caused a device removal.
* Includes a fix provided by Jake to ApplyBarriers that caused an
incorrect state to be returned in this usage.
2024-02-13 08:31:45 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
Jake Turner a4ff744a0a Fix Linux compile error 2024-02-08 05:15:07 -08:00
Jake Turner 4c8c31919a On Vulkan do not fill discard pattern during loading
The state tracking will not be complete during loading and can cause a crash trying to rebind the current pipeline after filling the image with the discard pattern
2024-02-08 10:48:10 -08:00
Jake Turner b1d78763c7 Fix Vk validation error about scissor exceeding signed int 2024-02-08 10:46:29 -08:00
Jake Turner f938afee2c PipelineStateViewer support right-click copy of stencil values
Having NoSelection caused nothing to be copied to the clipboard

Examples of copied data

D3D12 `Front Greater Keep Keep Replace FF FF 55`
D3D11 `Front Greater Keep Keep Replace`
GL `Front Greater Keep Keep Replace FF FF 55`
Vk `Front Always Keep Keep Replace FF FF 01`

Closes #3240
2024-02-06 05:45:52 -08:00
Jake Turner 03ab274252 Fix off by one error in the slice range tooltip 2024-02-01 15:43:36 +00:00
Jake Turner 0a330ef593 Add slice information to the Pixel History Window Title 2024-02-01 15:43:24 +00:00
Jake Turner a3eecf33eb Vulkan Mesh Output use state to query vertex bindings
Do not use the "VkGraphicsPipelineCreateInfo" because this does not include the dynamic state.
Fixes Mesh Output being incorrect when dynamic state for vertex input is used.
2024-01-31 12:54:20 +00:00
baldurk 6de0787b58 Update docs to mention customising python path on module project as well 2024-01-30 20:33:13 +00:00
baldurk faa0695323 Support property-page customisation on python module projects 2024-01-30 20:31:35 +00:00
baldurk 1e70124bd6 Support setting overridden python path via VS properties page 2024-01-30 20:29:07 +00:00
Jake Turner 9c163aaeca D3D12 Pixel History fix validation error
D3D12 ERROR: ID3D12CommandList::CopyTextureRegion: D3D12_SUBRESOURCE_FOOTPRINT::RowPitch must be a multiple of 256 (aka. D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) and greater or equal to the pitch implied by the width.[ RESOURCE_MANIPULATION ERROR #855: COPYTEXTUREREGION_INVALIDDSTROWPITCH]
2024-01-30 17:03:11 +00:00
Jake Turner 7b72610d9b D3D12 ExecuteIndirect fix argument buffer reading out of bounds
Only increase the number of bytes to read when crossing an execute boundary and doing a partial execute.
Fixes out of bounds access on the source argument buffer when going from a complete execute to the next complete execute i.e. selecting the draw actions in sequence in the Event Browser
2024-01-30 17:03:11 +00:00
Jake Turner 9d2fe84d69 D3D12 ExecuteIndirect remove asserts on VB and IB
When doing partial replay the data is not guaranteed to be read back into the indirect buffer
2024-01-30 17:03:11 +00:00
Jake Turner 20578f46a6 Extend D3D12 ExecuteIndirect test to do multiple draws per Execute
The argument buffers are used fully used with no spare bytes
The python test iterates over every draw to check the replay has a valid output target count
This verifies the replay did not crash when replaying ExecuteIndirect with multiple draws and an argument buffer with no spare bytes
2024-01-30 17:03:11 +00:00
Jake Turner b6a105d695 D3D12 Pixel History fix for typeCast of CompType::Typeless
For instance history on swapchains
2024-01-30 17:03:11 +00:00
baldurk 32c946dd14 Search for newer python versions at build time 2024-01-30 16:51:03 +00:00
Jake Turner 2cc4558815 Update tests python to work with Python 3.12
Tested running with Python 3.12, 3.11, 3.10, 3.6.8
2024-01-30 09:30:12 +00:00
Jake Turner c8d3b6a79d Apple metal-cpp update to MacOS SDK 14.2 2024-01-29 18:15:33 +00:00
Jake Turner 6fd951acac Fix Apple demos project memory leaks and GC 2024-01-29 18:13:26 +00:00
Jake Turner 3150a1028e Mac compile warning/errors in tests project 2024-01-29 18:13:26 +00:00
Jake Turner 018434e7de Fix Mac demos project compile errors on clang 15
Add "-Wno-deprecated-declarations"

util/test/demos/3rdparty/fmt/core.h:378:30: error: 'char_traits<fmt::internal::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it. [-Werror,-Wdeprecated-declarations]
      : data_(s), size_(std::char_traits<Char>::length(s)) {}
                             ^
util/test/demos/3rdparty/fmt/format.h:580:9: note: in instantiation of member function 'fmt::basic_string_view<fmt::internal::char8_type>::basic_string_view' requested here
      : basic_string_view<internal::char8_type>(
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__string/char_traits.h:79:8: note: 'char_traits<fmt::internal::char8_type>' has been explicitly marked deprecated here
struct _LIBCPP_DEPRECATED_("char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it.")
2024-01-29 18:13:26 +00:00
Isaac Marovitz adb6fe2e8d MTLComputePassDescriptor 2024-01-29 18:12:20 +00:00
Isaac Marovitz e6b8b380d4 MTLComputePipelineDescriptor
Pipeline Descriptor Correction
2024-01-29 18:12:20 +00:00
Isaac Marovitz 115d27a028 MTLComputePassSampleBufferAttachmentDescriptor
SampleBufferAttachemnt Correction
2024-01-29 18:12:20 +00:00