* We still want to have a ResourceId for a command buffer to reflect push
constants - it doesn't matter which command buffer it is currently. If push
constants are present, but never pushed, we should still reflect it.
There are scenarios (specifically when running in anonymous containers) where there is no entry in the password file for the current user, this causes getpwuid() to return a NULL pointer promptly causing a segfault.
This change detects this and then attempts to read the $HOME env var, and if that fails it falls back to the temp dir. Although the temp dir is not valid as a home dir, it is a valid path and so can be used by the calling function.
* For our purposes we can trivially treat this as equal to OpExtInst since we
mostly don't care about forward references and don't use the debug information
where forward references are likely to be generated (class member function
type information).
* We use a different function for serialising addresses via ID+offset compared
to the normal lookup, since on serialise we need to allow out of bounds
references as that's legal in D3D12 too. If we have a mismatch here we could
mark one buffer referenced but serialise as another and be unable to translate
the address.
Fallback to use the embedded compiled shader if the source shader fails to compile
Only try to get pixel history DXIL shaders for captures that use DXIL
The frontend compares the registered child PIDs against the locally running ones, any that aren't in the list are removed - this is how dead procs are removed. Unfortunately this causes any children from a remote context to be immediately removed.
After discussion with upstream, the agreed solution was to prevent child removal entirely for remote contexts as long as clicking on dead children does nothing.
* When a non-zero UAVStartSlot is present, the index in the array and
the slot in the shader do not line up.
* This fixes both the listing for "Usage in Frame" and pixel history
results.
IsDXCNop() checks for DXC Nop generated instructions, which take the form of a Load from a global variable called "dx.nothing.*"
IsSSA() checks if a DXIL::Value is an SSA value i.e. from an instruction, not a constant etc.
Store function name from Operation::Call in a const reference instead of making a copy
AnnotateHandle
* Change the SSA result name to be "_typed_descriptor_<N>"
* Show the input handle SSA name instead of the resource alias name
CreateHandleFromHeap
* Change the SSA result name to be "_untyped_descriptor_<N>"
CBufferLoad, CBufferLoadLegacy
* For SM6.6 use the handle alias instead of the cbuffer name
Before:
_dx.types.Handle _3 = ResourceDescriptorHeap[8];
_dx.types.Handle __heap_descriptor_0 = (StructuredBuffer<stride=8>)ResourceDescriptorHeap[8];
_dx.types.Handle _11 = SamplerDescriptorHeap[0];
_dx.types.Handle __heap_descriptor_1 = (SamplerState)SamplerDescriptorHeap[0];
_dx.types.Handle _15 = ResourceDescriptorHeap[12];
_dx.types.Handle __heap_descriptor_2 = (Texture2D<4xF32>)ResourceDescriptorHeap[12];
_dx.types.ResRet.f32 _19 = __heap_descriptor_2.Sample(__heap_descriptor_1, _.i05, _.i16, Offset = {0, 0});
After:
_dx.types.Handle __untyped_descriptor_0 = ResourceDescriptorHeap[8];
_dx.types.Handle __typed_descriptor_0 = (StructuredBuffer<stride=8>)__untyped_descriptor_0;
_dx.types.Handle __untyped_descriptor_1 = SamplerDescriptorHeap[0];
_dx.types.Handle __typed_descriptor_1 = (SamplerState)__untyped_descriptor_1;
_dx.types.Handle __untyped_descriptor_2 = ResourceDescriptorHeap[12];
_dx.types.Handle __typed_descriptor_2 = (Texture2D<float4>)__untyped_descriptor_2;
_dx.types.ResRet.f32 _19 = __typed_descriptor_2.Sample(__typed_descriptor_1, _.i05, _.i16, Offset = {0, 0});