* No API supports the quad overdraw with MSAA, but on other APIs it's feasible
to downgrade and render the overlay at single sampled. On Vulkan with
renderpasses this is not possible.
If an AS build command is called on an already built AS (i.e. an update build) then we need to safely destroy the previously copied input buffers and their memory. However at the point this happens, we do not own the command buffer so we don't know if the original data has actually been copied yet.
Using the mechanism in this patch we associate function objects with the command buffer that will be executed when the queue the command buffer is submitted to, has finished executing on the GPU.
This works by carying the function objects in command buffer and once it is submitted, we poll on a VkEvent we inserted. Once signalled, we call the function objects in the order they were inserted.
* We create a fake handle to provide to the wrapping system which will be non-
functional, and then later on update the mapping information once the real
handle has been patched in.
* On vulkan we don't know what valid handles might be but we assume they will
likely be pointer-like, so we start from -1 and move downward with the fake
handles to avoid a clash (which would break).
* We only expect to use jobs currently for the loading portion before the frame
capture scope, so we synchronise on jobs and process any deferred failures
immediately after applying initial contents and before doing the first frame
capture replay.
* This removes the dependency on the serialisers/deserialisers provided by
D3D12.dll or the D3D12Core.dlls
* It also allows us to easily decode root signatures that don't have DXBC
containers, such as those in embedded subobjects.
* Since the serialised format is mostly memcpy'd we don't aim for complete
coverage but just edge cases like empty lists, all different types of
descriptors and flags, and all root signature versions.
* This is slightly less efficient but this isn't high-performance code, and it
makes settings like shader debug SearchDirPaths safe to access on multiple
threads.
Moved DXBCDebug::GatherPSDataForIntialValues() to DXDebug namespace and altered the input parameters.
Moved DXBCDebug::PSInputElement to DXDebug namespace
Added DXBCDebug::GetInterpolationModeForInputParams()
Added DXILDebug::GetInterpolationModeForInputParams()
Saves having to do repeated string comparisons for function calls to identify if the instruction is a DXOp call or an LLVM Dbg call.
The LLVM Dbg calls are unique and the specific llvm dbg operation is stored in the DXIL::Function
The DXOp calls are not unique and the zero'th argument of the CALL Instruction is used to determine the DXOp opcode.
* For some reason in RDAT the strings are deduplicated, but in PSV they are not.
Similarly in RDAT the index array packing prefixes each array with its length
but in PSV the index array is entirely loose and deduplication can happen
effectively anywhere.
* Only tested so far on round-trip behaviour, not with modifications. By default
we don't make any changes yet but the DXIL program editor may in future
automatically decode and encode the RDAT so it can stay in sync if resources
are added.