Commit Graph

14444 Commits

Author SHA1 Message Date
baldurk 4caf3e4e13 Correct struct name typo in python script 2024-03-18 10:28:37 +00:00
baldurk 525babb868 Add a semaphore per swapchain image
* With only a single semaphore we can only have one frame in flight and get
  validation layer messages if we run faster than that and re-use the
  renderStartSemaphore before the previous frame has completed.
2024-03-18 10:28:36 +00:00
Jake Turner e249981d8a Replace {blah} args directly when building tool command line
To support this type of usage:
"{hlsl_stage2}_6_0"
"-fspv-target-env={vulkan_ver}"
2024-03-14 10:50:31 +00:00
baldurk d180460872 Update some stale parts of extension support document 2024-03-13 16:16:33 +00:00
baldurk 5304351d00 Allow VK_EXT_texture_compression_astc_hdr as the extension is supported 2024-03-13 16:16:33 +00:00
Jovan Ristic cd19c52aa5 D3D12 Pixel History fix lack of integer clamping.
* When the shader outputs a value larger than the texture format
supports, the use of a 32bit target for history targets resulted in the
Tex After for fragments showing a value larger than possible.
* The int/uint path for ConvertAndFillInColor was missing the clamping
step that the other path includes.
2024-03-13 08:20:57 +00:00
Jake Turner 3cb8998841 Vulkan DebugPixel support for multiview debugging
Output "ViewIndex" into the pixel shader hits array
Select the pixel shader input which matches the viewIndex to the passed in view
Ignore the view parameter if set to ~0U (rd.ReplayController.NoPreference)
Ignore the view parameter if any subpass has empty multiviews
2024-03-13 07:58:48 +00:00
Jake Turner b36b7cf6b8 Vulkan Multi-view test
Vertex shader output Red for view 0, Green for view 1, fragment shader does not use viewIndex.
Fragment shader output Red for view 0, Green for view 1, vertex shader does not use viewIndex.
Geometry shader output Red for view 0, Green for view 1, vertex and fragment shader do not use viewIndex.

Python checks vertex and pixel shader debug output against replay rendering output
2024-03-13 07:58:48 +00:00
Jake Turner 7934d1d16e Change DebugPixel() to take a DebugShaderInputs struct
DebugShaderInputs struct contains existing the parameters:

sample
primitive

and a new parameter

view

Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
2024-03-13 07:58:48 +00:00
Jake Turner 5516f67227 Vk Tests added vkh::RenderPassCreator::next() 2024-03-13 07:58:48 +00:00
Jake Turner d00781d436 Update D3D12 enum's stringise 2024-03-12 11:44:03 +00:00
Jake Turner 3d561b48ab Quad Overdraw overlay requires pixel shader root signature access
Remove D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS from the root signature flags
2024-03-12 11:02:09 +00:00
Jake Turner 3fb6f80d1d Update D3D12_ROOT_SIGNATURE_FLAGS stringise 2024-03-12 10:59:35 +00:00
Jake Turner f66cb495f9 Add lock around access to m_DeviceAddressResourcesLock 2024-03-07 12:53:13 +00:00
Jake Turner 01b9c8234e D3D12 Pixel History support and acknowledgement 2024-03-07 12:52:41 +00:00
Kacper Zielinski 10d402358c Add comments to differentiate vkEnumeratePhysicalDeviceGroups usages 2024-03-05 16:45:30 +00:00
Kacper Zielinski e594d28127 Limit amount of physical devices groups requested by user 2024-03-05 16:45:30 +00:00
Kacper Zielinski 3c02b6f920 Fix non-conformant vkEnumeratePhysicalDeviceGroups behavior 2024-03-05 16:45:30 +00:00
baldurk b90252882f Add handling for shading rate builtin in SPIR-V 2024-03-05 11:38:28 +00:00
baldurk b9fd432d11 Report and handle source-level entry point name from exported name
* The compiler could compile an entry point "foo" into an export "bar". We use
  the exported name in most places as that's guaranteed to be unique by the API
  and used for cross-referencing, but when recompiling we pass the original
  source name as in the debug info.
2024-03-05 11:38:19 +00:00
baldurk c1f775eb2e Keep source files with either blank name or contents in SPIR-V
* Only filter out source files with no name and no contents.
2024-03-05 08:02:25 +00:00
baldurk 47cef17f5a Reset D3D12 DSV pipeline state to empty if unbound 2024-03-05 07:48:19 +00:00
baldurk 68929a567b Work around D3D12 confusion where feature can be unsupported but used
* Even if new barriers aren't supported, it's still possible to use the creation
  function and create them in any of the new layouts. In this case we can't use
  new barriers to transition them out of that state so we have to pretend
  they've already been moved out.
2024-03-02 13:46:45 +00:00
baldurk 9348bb4510 Don't recreate heaps as displayable 2024-03-02 00:14:31 +00:00
baldurk 9500ebd94b Fix initialisation errors and resource leaks 2024-03-02 00:03:25 +00:00
baldurk cab4928b34 Bump the versions of some CI actions to avoid deprecation warnings 2024-03-01 13:57:19 +00:00
baldurk 24f4bd7b42 Generate SPIR-V code with utf-8 encoding 2024-03-01 13:44:25 +00:00
baldurk 10c8d1f58a Remove accidentally included unit test 2024-03-01 13:03:18 +00:00
baldurk 6855013033 Fix compilation 2024-03-01 12:27:30 +00:00
baldurk 7c40d92905 Fix renderdoc project filters 2024-03-01 12:13:32 +00:00
baldurk 755291ad47 Handle SPIR-V with empty and file contents source directives
* This can happen if e.g. there's an OpSource with no contents, and then a
  DebugSource with contents.
2024-03-01 12:11:37 +00:00
baldurk 3e2340fe16 Add identified support for slang (the language and the tool) 2024-03-01 12:11:37 +00:00
baldurk b8261d9357 Update SPIR-V headers to latest 2024-03-01 12:11:37 +00:00
baldurk 02539a6240 Add experimental option to allow use of D3D12 RT 2024-03-01 12:11:37 +00:00
Amit Prakash 6254393bdf Add serialisation & replay of Acceleration structure build calls
* Add patching of BLAS address in TLAS
* Add a compute shader to patch the BLAS address
* Adds a pipeline, and root signature for patching the BLAS
2024-03-01 12:11:37 +00:00
Amit Prakash 19701205ef Add helper to reference all buffer resources
* There is no easy way to track the referenced resources in
  acceleration structure builds, especially BLAS resource, as there is
  no way to track how and when they will change.
  Now with this change, we will track all the buffer resource
  irrespective they are used in AS or not after the first call to AS
  build.
2024-03-01 12:11:37 +00:00
Amit Prakash 475dc0aabf Add to track the lifetime of acceleration structs
* During recording of acceleration structure builds, add a callback to
  track lifetime of virtual acceleration structure resource.
* Execute the callback at time command list execution to ensure the
  order of correct acceleration structure on the backing buffer storage.
2024-03-01 12:11:37 +00:00
Amit Prakash ae8bc03c18 Add acceleration structure as a virtual resource
* Add Resource_AccelerationStructure as a new resource type
* Add D3D12AccelerationStructure class for virtual resource for tracking
  acceleration structure lifetime.
* Since D3D12 doesn't provide a proper API-tracked way of seeing these
  resources, we instead will track it ourselves and create a virtual
  resource where valid ASs exist.
2024-03-01 12:11:37 +00:00
Amit Prakash 4e37c99d53 Add RT buffer management and resource handling helpers
* Add D3D12RaytracingResourceAndUtilHandler for managing DXR additional
  resources and workload
* Add D3D12GpuBufferPool to manage GPU buffer resources
2024-03-01 12:11:37 +00:00
Amit Prakash 38ff2b859d Add serialization for state object desc
Co-authored-by: Nate, High <nate.high@amd.com>
2024-03-01 12:11:37 +00:00
Amit Prakash b52bb00101 Add inital plumbing/stub code for DXR
* Adds specialized serialization for DXR enums, and structs
* Adds new Chunks for DXR API Calls
2024-03-01 12:11:37 +00:00
Amit Prakash f67ce809ed Add include handler for 6_0+ compilation 2024-03-01 12:11:36 +00:00
Jake Turner cb18d1cf52 D3D12 Pixel History fix format conversion for post-modification value
The per fragment post-modification value needs similar handling as the per fragment shader out
2024-02-29 06:47:14 +00:00
Jake Turner 5b55188260 Pixel History UI draw background colour for UINT and SINT targets 2024-02-29 06:47:14 +00:00
Jake Turner 298deafb40 D3D12 Pixel History handle copying data from Texture3D
Tested with different and different slices
2024-02-29 06:47:14 +00:00
Jake Turner 985531cf0e D3D12 Pixel History force scratch targets to be Texture2D
Fixes device timeout for history on 1D or 3D targets
2024-02-29 06:47:14 +00:00
Jake Turner 00777e8474 D3D12 Pixel History force event info structures to be 48 byte aligned
This is to ensure buffer offsets are always a multiple of 16 & 12 bytes
12 byte alignment is required to support copying R32G32B32 pixels
2024-02-29 06:47:14 +00:00
Jake Turner 713194f7bf D3D12 Pixel History rework how image states are computed
The CPU image state tracking does not know about state changes from a future command list which is submitted before the current list.
This leads to incorrect state transition when copying pixel data and getting incorrect data in the pixel history
2024-02-29 06:47:14 +00:00
Jake Turner 8eb4342704 D3D12 Pixel History Test split barriers into new command list
Record the draw command list before the barrier command list
Submit the barrier command list before the draw command list
2024-02-29 06:47:14 +00:00
baldurk 70b79d73e7 Ensure vulkan pixel history that adds dynamic states gets those bound 2024-02-28 15:48:20 +00:00