[DX] Begin adding support for pipeline state
authorChris Bieneman <chris.bieneman@me.com>
Thu, 2 Feb 2023 00:39:01 +0000 (18:39 -0600)
committerChris Bieneman <chris.bieneman@me.com>
Thu, 2 Feb 2023 01:00:23 +0000 (19:00 -0600)
commitad93908e3b5593773dfb0484ec06a36fafb5736a
treeb54d108603e4f456b035b5c262e35606eec80291
parent4adabb8786b87e9f105e37d5606e1c0187abc647
[DX] Begin adding support for pipeline state

DirectX shader pipeline state validation information is a fairly
complicated to serialize data structure. This patch adds the first bit
of support for reading and writing the runtime info structure which
comes first in the encoded data.

Subsequent patches will flesh out the remaining fields of the data
structure.

There is no official documentation for the format, but the format is
roughly documented in the code comment here:
https://github.com/microsoft/DirectXShaderCompiler/blob/main/include/dxc
/DxilContainer/DxilPipelineStateValidation.h#L731

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D141649
35 files changed:
llvm/include/llvm/BinaryFormat/DXContainer.h
llvm/include/llvm/BinaryFormat/DXContainerConstants.def
llvm/include/llvm/MC/DXContainerPSVInfo.h [new file with mode: 0644]
llvm/include/llvm/Object/DXContainer.h
llvm/include/llvm/ObjectYAML/DXContainerYAML.h
llvm/lib/MC/CMakeLists.txt
llvm/lib/MC/DXContainerPSVInfo.cpp [new file with mode: 0644]
llvm/lib/Object/DXContainer.cpp
llvm/lib/ObjectYAML/DXContainerEmitter.cpp
llvm/lib/ObjectYAML/DXContainerYAML.cpp
llvm/test/ObjectYAML/DXContainer/PSVv0-amplification.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv0-compute.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv0-domain.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv0-geometry.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv0-hull.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv0-mesh.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv0-pixel.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv0-vertex.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-amplification.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-compute.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-domain.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-geometry.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-hull.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-mesh.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-pixel.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv1-vertex.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-amplification.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-compute.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-domain.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-geometry.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-hull.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-mesh.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-pixel.yaml [new file with mode: 0644]
llvm/test/ObjectYAML/DXContainer/PSVv2-vertex.yaml [new file with mode: 0644]
llvm/tools/obj2yaml/dxcontainer2yaml.cpp