Commit Graph
1202 Commits
Author SHA1 Message Date
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 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
Jake Turner 26dac0821d Add missing break to DXIL disassembly of Operation::Fence 2024-02-28 15:14:30 +00:00
Jake Turner 226bf7071b Add ShaderBuiltin::MultiViewIndex
Mapped to:
SPIR-V ViewIndex (which was previously mapped to ShaderBuiltin::ViewportIndex)
GL gl_ViewIndex
2024-02-14 11:10:15 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
anthark a55e82a0a2 Fix indexed semantic name when semantic index is not zero 2024-01-23 10:30:44 +00:00
baldurk 5bb66f67de Don't rely on ReplaceChunk silently doing nothing for missing chunks 2024-01-23 10:26:13 +00:00
baldurk e9430a02e0 Fix chunk-adding code to add fourcc and size 2024-01-23 10:25:53 +00:00
baldurk f7eccf03ff Implement DXBC ReplaceChunk adding a new chunk if it's not present 2024-01-22 14:10:43 +00:00
baldurk a232dc9a40 Fix header size being used wrongly
* The sizes changed so these headers are total sized not cumulative
2024-01-22 14:10:42 +00:00
Jake Turner c4e3f96f57 VK Shader Debugger support for Buffer Device Address 2024-01-17 08:24:51 +00:00
baldurk df686bfce0 Handle D3D12 mesh shaders that don't read from an existing payload
* In this case we can't find a getMeshPayload call even though we're expecting
  it, so we can't find the payload type either.
2024-01-11 14:51:33 +00:00
Jake Turner 1f53a414c8 SPIR-V disassembler treat Op::InBoundsAccessChain like OpAccessChain 2024-01-11 10:53:57 +00:00
Jake Turner 3363b29883 SPIR-V Debugger fix Bitcast from vector to scalar 2024-01-09 12:44:14 +00:00
baldurk 586ba368ce Fix incorrect stride when access chaining into vectors within matrices
* This would only break for row-major matrices where the index needs to pull out
  a column.
2023-12-19 17:07:26 +00:00
Jake Turner a7a881c20d SPIR-V debugger: Fix error message parameters not matching format
Fixes a potential crash when displaying an error message about invalid scalar index on a matrix
2023-12-19 16:09:31 +00:00
Steve Karolewics f20c596a69 Fix D3D12 pixel history for events that do not have a pixel shader 2023-12-18 07:54:59 +00:00
baldurk 6dcbafe329 Fix calculation of scalar offsets for task payload in SPIR-V reflection 2023-12-14 13:16:24 +00:00
Jake Turner d9db44fd32 SPIR-V Debugger: Make Op::Unreachable terminate debug session 2023-12-13 10:24:47 +00:00
Jake Turner 5bfb844643 SPIR-V OpSwitch support for 64-bit selectors #3140 2023-12-13 10:24:47 +00:00
baldurk b9c338568f Set the correct type for i8 metadata constants in DXIL 2023-11-20 18:17:21 +00:00
baldurk 0d9ea809dd Fix some test failures by consistently stripping gl_PerVertex_Var prefix 2023-11-17 18:47:47 +00:00
baldurk 58f206eed0 Get output topology reflection on D3D12 for mesh shaders 2023-11-17 18:47:47 +00:00
baldurk d898e2ac09 Detect and prevent crashes on broken dxc-produced task shaders 2023-11-17 00:47:55 +00:00
baldurk cc80757e4e Add DXIL reflection for task/mesh shaders 2023-11-16 18:20:23 +00:00
baldurk 66d0a10142 Add SPIR-V reflection for task/mesh shaders 2023-11-16 18:20:23 +00:00
baldurk 69dcb42a05 Add enums and API-agnostic handling for new task and mesh shader stages
* The enums are given after compute, to preserve indices for the normal vertex
  pipeline.
* Mesh dispatches are considered a new action type, rather than being bundled
  into the `Drawcall` type. This will allow them to be distinguished by API
  backends as needed. The UI treats them as drawcalls
* We apply this universally even though it's not relevant to D3D11/GL. It means
  a couple of empty array entries but it should not cause any significant
  issues.
* Shader messages will be identified by group and thread as with compute
  shaders. For mesh shaders there is an additional subdivision to identify them
  by task group, since each task group can submit a grid of mesh groups.
2023-11-16 18:20:23 +00:00
baldurk 788f68a1f7 Improve DXIL bytecode editor
* Add helpers for creating DX op instructions with less boilerplate.
* On encode, strip any unused functions or globals to comply with strict
  DXIL validation requirements.
* Create attribute sets on demand to match functions.
* Add some extra helpers for creating constants, blocks, and patching
  runtime chunk.
2023-11-16 18:20:23 +00:00
baldurk 2758c080c8 Disassemble inner coverage variable correctly. Closes #3137 2023-11-15 14:51:04 +00:00
baldurk b103d1fcb6 Fix crash disassembling root signature in DXIL metadata 2023-11-01 11:46:42 +00:00
baldurk 8ba23ccea0 Process member decorations immediately in SPIR-V editor after parse 2023-10-30 10:24:30 +00:00
baldurk 29a2925eef Strip unused reflection of arrayed builtin outputs on vulkan 2023-10-30 10:24:30 +00:00
baldurk 89d482ec36 Handle barycentric shader builtin 2023-10-30 10:24:30 +00:00
baldurk a4da2f1eb2 Add SPIR-V processor accessors for data types and decorations by id 2023-10-30 10:24:30 +00:00
baldurk 84e61014a1 Add a SPIR-V editor helper to insert a sequence of operations at once 2023-10-30 10:24:30 +00:00
baldurk 2b779038af Add a SPIR-V editor helper to add or re-use a builtin input 2023-10-30 10:24:30 +00:00
baldurk f87c50af25 Add a SPIR-V editor helper to register a constant with a pre-given ID 2023-10-30 10:24:30 +00:00
baldurk 3ac150d273 Improve SPIR-V code generation
* Prefer vendor-neutral extension aliases for enums over vendor-specific.
* When disassembling opcodes with optional parameters, only include the
  parameters when present.
2023-10-30 10:24:30 +00:00
baldurk 832bb4fb74 Add an early-out for DXBC chunks with the wrong size 2023-09-12 21:53:22 +01:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
Jake Turner df3b17a265 Fix handling of specialization Op::LogicalNot Closes #3046 2023-09-04 21:37:25 +01:00
baldurk 7c2b68390e Ignore a glslang warning on clang 2023-08-22 16:11:49 +01:00
baldurk e7430226e9 Match SPIR-V version as much as possible when rebuilding shaders 2023-08-22 13:41:39 +01:00
baldurk 02933fb6a6 Update glslang to 12.3.1 2023-08-22 13:37:53 +01:00
Jake Turner 39f6296f3a Use existing Files entry for empty shader source file "unnamed_shader"
Fixes source shader stepping when the main shader source file contains #line entries with blank filenames ie.
2023-08-22 05:14:06 +01:00
Jake Turner f0b9aabb5e Change empty shader source file name to "unnamed_shader" from "shader" 2023-08-22 05:14:06 +01:00
baldurk 9c553bbfb1 Handle OpExecutionModeId in SPIR-V reflection 2023-07-31 15:03:24 +01:00