Commit Graph

14859 Commits

Author SHA1 Message Date
feng716 9c41ef366e add option '-Wno-error=template-id-cdtor' 2024-07-10 05:24:12 +01:00
Aliya Pazylbekova 9ebd796cd8 Remove GGP support 2024-07-08 14:19:42 +01:00
Jake Turner aa5538b2e9 Added helper D3D12ShaderDebug::GetRenderTargetSampleInfo()
Used by the DXIL debugger and the DXBC D3D12 version of GetSampleInfo()
2024-07-04 05:42:37 +01:00
Jake Turner fcc6ab5087 Added helper D3D12ShaderDebug::GetSampleInfo()
Used by DXBC and DXIL Shader Debuggers
2024-07-04 05:41:53 +01:00
Jake Turner 4fe5962490 Added helper D3D12ShaderDebug::GetResourceInfo()
Used by DXBC and DXIL Shader Debuggers
2024-07-04 05:41:53 +01:00
Jake Turner 546049310f Added DXBCDXILDebug::get_sample_position() helper 2024-07-04 05:41:53 +01:00
Jake Turner aff288dfb7 RD DXIL Disassembly Improvements
Show BufferLoad, RawBufferLoad as <resource>.Load
Show BUfferStore, RawBufferStore as <resource>.Store
Hand decode DXOp::GetDimensions, DXOp::Texture2DMSGetSamplePosition
Removed "index =" from output of GetRenderTargetSamplePosition()
2024-07-03 11:15:11 +01:00
Jake Turner b3236c0fbe Added DoStringise() for DXIL::Type::ScalarKind 2024-07-03 11:14:49 +01:00
Jake Turner 67777f16af Change D3D11/12 Shader_Debug_Zoo to use 32x32 mipmapped texture
32 x 32 means the mip count (5) is different to the MSSA count (4)
2024-07-03 11:14:01 +01:00
Jake Turner 0b9ed7bd8e DXIL disassembly parsing track labels in functions and blocks
Per Function compute:
labelToBlockIndex container : to go from a label to its block index
blockIndexToLabel container : to go from block index to its label

For each Block store the starting instruction index
2024-07-03 07:22:26 +01:00
Jake Turner 71da2b55bb Added dxbcdxil_debug.cpp source file with DXBC/DXIL debugger helpers
Shared between DXBC and DXIL shader debuggers

float dxbc_min(float a, float b);
double dxbc_min(double a, double b);
float dxbc_max(float a, float b);
double dxbc_max(double a, double b);
float round_ne(float x);
float flush_denorm(const float f);
2024-07-03 07:20:59 +01:00
Jake Turner 0406d3766f Change DXIL disassembly exp & log names to exp2 & log2 2024-07-02 14:20:26 +01:00
Jake Turner dbd4d7cf0d Fix DXIL Shader Debugger GPU implementation of EXP & LOG
DXIL EXP is exp2. HLSL is exp.
DXIL LOG is log2. HLSL is ln.
2024-07-02 14:20:14 +01:00
Jake Turner 1307393836 D3D11 PipelineStateViewer use UAV tag for CS UAV resources
Fixes problem that going to a compute shader UAV Buffer would not show the correct format for the buffer
2024-07-02 13:49:44 +01:00
Jake Turner 452f75b966 In DescriptorData() set nonsamp.type to D3D12DescriptorType::Undefined
If it defaults to zero then it would be treated as D3D12DescriptorType::Sampler
which lead to a crash calling "Create" on an uninitialized descriptor
2024-07-02 12:05:07 +01:00
Jake Turner 9a075cf21e Tweaks to D3D12ShaderDebug::FindDescriptor() 2024-07-01 08:32:09 +01:00
Jake Turner a4ccbaba35 DXIL RD Fixes to MakeCBufferRegisterStr()
Changed array offset handling
Added TODO about handling double vectors, the load might not start at x component
Improved handling of variable offset for when the offset is within a variable i.e. matrix row, array element.

Removed unused function GetCBufferVariableTypeName()
2024-06-27 14:36:28 +01:00
Jake Turner 8608e7bc97 Fix matrix byte size in DXIL MakeCBufferVariableType
Account for cbuffer D3D matrix row/column alignment (16 bytes)
2024-06-27 14:36:28 +01:00
baldurk 41adeb65b1 Add UI to manage the list of ignored PDBs for callstacks. Closes #3329 2024-06-27 13:54:41 +01:00
baldurk 6990a6b046 Show - for byte offset when displaying specialisation constants 2024-06-27 13:54:41 +01:00
baldurk 2b40a17f8a Add packing rule for bitfield packing/straddling a la #pragma pack(1) 2024-06-27 13:54:41 +01:00
Jake Turner 64b966f4df D3D12 ShaderDebugging adding helper namespace D3D12ShaderDebug
Added

bool D3D12ShaderDebug::CalculateMathIntrinsic(WrappedID3D12Device* device, MathOp mathOp, const ShaderVariable &input, ShaderVariable &output1, ShaderVariable &output2);

which is used by DXBC and DXIL ShaderDebugger CalculateMathIntrinsic methods

Extended shaderdebug.hlsl math intrinsics to support DXIL math opcodes

Use custom math operation values for DXBC and DXIL, not the DXBC OpCode value.
Use custom sampler operation values for DXBC and DXIL, not the DXBC OpCode value.

This changes DXBCDebug::DebugAPIWrapper, updated D3D11DebugAPIWrapper to match changes to interface and shader math and sample operation values.
2024-06-27 09:27:13 +01:00
Jake Turner 1add3b1ea8 Added D3D12_DebugManager DXIL Shader Debugger helper methods
GetDXILMathIntrinsicsPso()
GetDXILTexSamplePso()
2024-06-27 09:27:13 +01:00
baldurk e6dc1d2516 Fix compile error 2024-06-26 18:30:22 +01:00
baldurk 1de0d75627 Update out of date log message 2024-06-26 17:07:09 +01:00
baldurk 928048b786 Tweak entrypoint disassembly to work better for large interface lists 2024-06-26 17:07:09 +01:00
baldurk 187ab5726a Update helpers with all shader stages 2024-06-26 17:07:09 +01:00
baldurk cd8e6b7bde Fix state handling for new pipeline bind point 2024-06-26 17:07:09 +01:00
baldurk 1b6e09430e Implement ray dispatch functions on Vulkan 2024-06-26 17:07:09 +01:00
baldurk 00b07693a6 Treat ray dispatches as dispatches for action callbacks 2024-06-26 17:07:09 +01:00
baldurk 6fa26849cd Implement RT pipeline creation & capture/replay handle folding in 2024-06-26 17:07:09 +01:00
baldurk 9e521e29a6 Implement struct handling and function stubs for RT pipelines 2024-06-26 17:07:08 +01:00
Jake Turner 3373f4b50e DXIL Reflection for compute shaders correctly detect threadIdInGroup
Searches for "dx.op.threadId" was also incorrectly matching "dx.op.threadIdInGroup"
2024-06-26 08:41:35 +01:00
Jake Turner 419d321a4a RD DXIL Disassembly add compute shader inputs and thread group size
e.g.

[numthreads(3, 2, 1)]
void main()
{
  InitialiseHandle(bufOut); //  index = 1
  InitialiseHandle(bufIn); //  index = 0
  InitialiseHandle(consts); //  index = 0

Inputs
  float3 threadId;

Inputs
  float flattenedThreadIdInGroup;
2024-06-26 08:27:56 +01:00
Jake Turner 6cddf16263 DXIL Shader Debugger call FillTraceLine() for DXBC and DXIL debugging
Some lines of the disassembly output come from DXBC parsing and need to account for that in the trace line info
2024-06-26 06:17:57 +01:00
Jake Turner c49d688f13 DXIL Disassembly ParseReferences tweaks for CreateHandleFromBinding
Handle the constant binding struct being NULL which means all its members are zero
2024-06-26 06:16:24 +01:00
baldurk 12518fda49 Remove PIPELINE_COMPILE_REQUIRED flag on compute pipelines too 2024-06-25 18:56:27 +01:00
Jasmine Hansen 33d81cc1cc Enable VK_EXT_shader_object 2024-06-25 17:55:10 +01:00
Jasmine Hansen 244aef2f76 Prevent pixel history crash with shader objects 2024-06-25 17:55:10 +01:00
Jasmine Hansen cb951ba689 UI support for shader objects
Info queries for pipeline state viewer and descriptor sets
Shader editing
2024-06-25 17:55:10 +01:00
baldurk 78d267a1d4 Don't continually expand a constant buffer view if it's re-opened solo 2024-06-25 17:25:16 +01:00
baldurk 1ec36140bf Ensure push constant command buffer is always registered
* 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.
2024-06-25 17:25:16 +01:00
baldurk 0943d8882f Harden descriptor access handling on both sides of the replay API
* Avoid generating bad descriptor accesses in the first place, and make the
  pipeline state more robust in that case so that it doesn't crash.
2024-06-25 17:25:16 +01:00
baldurk 499da16b45 When doing an action callback for a sub-region, don't replay whole EI 2024-06-25 17:25:15 +01:00
baldurk a90d3eb9c8 Account for padding in argument constant buffer for EI patching 2024-06-25 17:25:15 +01:00
baldurk 1a1437ee19 Fix ExecuteIndirect state decoding not properly respecting stride
* It was also broken even for tightly packed argument signatures because it
  wasn't incrementing the data pointer over the dispatch/draw arguments.
2024-06-25 17:25:15 +01:00
baldurk e2a03f5d23 During capture use application's device configuration for root sigs
* If we don't, we'll try to use the builtin root sig decoder and possibly break.
2024-06-25 17:25:15 +01:00
Cam Mannett bc94410ece Provide fallbacks within POSIX GetHomeFolderFilename()
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.
2024-06-25 09:56:26 +01:00
baldurk 4648ef27f9 Serialise and replay calls to SetPipelineStackSize 2024-06-24 15:35:04 +01:00
baldurk 01384c4d42 Update vulkan headers to 1.3.288
* Add support for VK_KHR_shader_relaxed_extended_instruction which is trivially
  supportable
2024-06-24 12:48:13 +01:00