Commit Graph

11079 Commits

Author SHA1 Message Date
baldurk 2c998ffbb2 Don't print linkage for variables with initializers 2020-06-19 17:48:12 +01:00
baldurk 4d156f0904 Handle ret not being in last basic block 2020-06-19 17:44:55 +01:00
baldurk 5b5cd18283 Handle forward references in any LLVM instruction 2020-06-19 17:44:55 +01:00
baldurk a0c66317e3 Add test of DXBC and DXIL D3D12 shader reflection 2020-06-19 14:46:00 +01:00
baldurk ab5c527489 Update D3D12 cbuffer test to check DXIL 2020-06-19 14:46:00 +01:00
baldurk d6ef32c5d0 Reflect inner type for structured buffers on DXIL 2020-06-19 14:46:00 +01:00
baldurk a550521bd5 Find struct annotations more robustly 2020-06-19 14:46:00 +01:00
baldurk f9218b5a90 Allow specifying D3D12_DESCRIPTOR_RANGE_FLAGS in root signatures 2020-06-19 14:46:00 +01:00
baldurk 2b40de2a6a Update docs about DXIL support 2020-06-19 14:46:00 +01:00
baldurk 01d7eaaca6 Fix assert that doesn't handle whole-array mappings 2020-06-19 14:46:00 +01:00
baldurk d3ef145c87 Patch VkRenderPassMultiviewCreateInfo when making single-subpass RPs 2020-06-19 14:46:00 +01:00
baldurk 4d6e4857f6 Implement debug interface for DXIL, to get embedded shader source 2020-06-19 14:45:57 +01:00
baldurk 253a03f5be Truncate long strings in DXIL disassembly 2020-06-19 14:45:44 +01:00
baldurk ad10f9ac01 Store shader profile in ShaderCompileFlags for D3D 2020-06-19 14:45:44 +01:00
baldurk d4ddb565d0 Add a per-shader debuggable flag to allow finer grained status
* E.g. on D3D12 we can debug DXBC shaders but not DXIL shaders. On vulkan this
  will allow us to have the UI work better when encountering shaders with
  unsupported capabilities or extensions.
2020-06-18 17:22:45 +01:00
baldurk 885e2b619c Fix a few cases in struct reflection 2020-06-18 17:22:45 +01:00
baldurk 7b96962ba0 Rename 'Value' to 'Constant' to get away from the overloaded LLVM term 2020-06-18 17:22:45 +01:00
baldurk 9225961462 Add support for GEP constant ops 2020-06-18 17:22:44 +01:00
baldurk 213ce9c43a Don't print 0 align on load/store/alloc 2020-06-18 17:22:44 +01:00
baldurk 631b56a04e Add support for compiling with dxcompiler in tests 2020-06-18 17:22:44 +01:00
baldurk 592cf968e3 Add a new analytics tracking flag for "has any capture used DXIL" 2020-06-18 17:22:44 +01:00
baldurk 28127e6249 Only init DXC and create DXIL shaders when capture uses DXIL shaders 2020-06-18 17:22:44 +01:00
baldurk 0bd48d3c2c Update overlays to use DXIL as needed
* This is needed because D3D12 requires all shaders in a pipeline to use DXIL if
  any do.
* We try to bake the couple of DXIL shaders that we will mix-and-match with
  application shaders at build time, in case we aren't able to find a working
  dxcompiler at runtime to build them. But this can only happen if we find a
  working dxc.exe in one of the windows 10 SDKs.
2020-06-18 17:22:44 +01:00
baldurk 9f210d5617 Hardcode variants of fixed colour shader needed on D3D12
* We will be adding an offline baked version of the DXIL variant of each of
  these, so we want to make it friendly to build-time generation.
2020-06-18 17:22:44 +01:00
baldurk 33b4d351a8 Try to locate and use DXC when compiling shaders for SM6.0 and up
* This will first try and use any dxcompiler.dll in the renderdoc plugins
  folder, or in the PATH. Otherwise it will search through windows 10 SDKs
  located via the registry.
2020-06-18 17:22:44 +01:00
baldurk 1c2aff1cd7 Add helper to quickly check for if DXIL is in use 2020-06-18 17:22:44 +01:00
baldurk e4aff40405 Rename basic disassembly type on D3D12 to include DXIL 2020-06-18 17:22:44 +01:00
baldurk 23c23951ad Account for padding in DXIL bitcode chunk 2020-06-18 17:22:44 +01:00
baldurk 993204b817 Allow capturing with DXIL shaders. Closes #1718 2020-06-18 17:22:44 +01:00
baldurk 6783f6a851 Improve handling if reflection information is stripped 2020-06-18 17:22:43 +01:00
baldurk b55d4c1c3f Prefer to get reflection information from STAT chunk if present
* This has some type information still present that's stripped out of the DXIL
  chunk
2020-06-18 17:22:43 +01:00
baldurk 11fa7686c4 Allow enabling D3D12ExperimentalShaderModels, and enable it on replay
* This needs to happen to allow loading unsigned DXIL
2020-06-18 17:22:43 +01:00
baldurk 743d75c510 Update DX headers to latest from SDK 10.0.19041
* Don't allow querying for the new interfaces since we don't support anything in
  them.
2020-06-18 17:22:43 +01:00
baldurk b7570358a4 Handle dx.op.annotateHandle type annotations 2020-06-18 17:22:43 +01:00
baldurk be65ec48d7 Process cbuffer/structure types with type annotations 2020-06-18 17:22:43 +01:00
baldurk c112b3d2c0 Reflect SRVs and UAVs 2020-06-18 17:22:43 +01:00
baldurk ba8b49e4d8 Handle register name for stencil ref output in DXBC bytecode 2020-06-18 17:22:43 +01:00
baldurk b4ae6c4b10 Start adding reflection based on the metadata 2020-06-18 17:22:43 +01:00
baldurk 2f10c52b0c Remove some unused fields in DXBC reflection
* These are present in the DXBC file itself but we don't use them
2020-06-18 17:22:43 +01:00
baldurk fc5c58a6c9 Move reflection to separate file, implement GetOutputTopology() 2020-06-18 17:22:42 +01:00
baldurk 6fcd4fee91 Ignore PSV0 chunk 2020-06-18 17:22:42 +01:00
baldurk b4db14915a Disassemble empty types with no padding 2020-06-18 17:22:42 +01:00
baldurk 505a674b85 Ensure DXIL populates compute shader fake input signature 2020-06-18 17:22:42 +01:00
baldurk 2081c4219c Ignore DXIL STAT chunk since we decode bytecode always 2020-06-18 17:22:42 +01:00
baldurk fec709b2d1 Support using ILDN to locate separate debug info
* This works the same way as the existing separate pdb support
2020-06-18 17:22:42 +01:00
baldurk 57721e4688 Include new ILDN chunk and global flags in disassembly
* This is used for both DXBC and DXIL bytecode
2020-06-18 17:22:42 +01:00
baldurk 6641030fbc Print types in same order as LLVM 2020-06-18 17:22:42 +01:00
baldurk d73452f012 Print metadata values inline instead of referencing them by number 2020-06-18 17:22:42 +01:00
baldurk df1187b8ee Support naming basic blocks in function symbol table 2020-06-18 17:22:42 +01:00
baldurk 343e13def0 Fix disassembly of DIDerivedType 2020-06-18 17:22:42 +01:00