[PATCH] D141649: [DX] Begin adding support for pipeline state

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 09:53:31 PST 2023


beanz added inline comments.


================
Comment at: llvm/include/llvm/BinaryFormat/DXContainer.h:287
+
+  void swapBytes(Triple::EnvironmentType Stage) { StageInfo.swapBytes(Stage); }
+};
----------------
python3kgae wrote:
> Both swapBytes() and swapBytes(Stage) changed data.
> Do we call both of them?
Yes, proper byte swapping of the union requires knowing the shader stage. The default `swapBytes` method gets called generically when reading the structures, but the version that needs to know the shader stage has to be called explicitly.


================
Comment at: llvm/test/ObjectYAML/DXContainer/PSVv0-mesh.yaml:32
+      DXILMajorVersion: 0
+      DXILMinorVersion: 1
+      DXILSize:        0
----------------
python3kgae wrote:
> mesh shader needs shader model 6.5
The point of these tests is to verify the testing infrastructure's ability to deconstruct and re-construct the data structures. They do not (and should not) validate the data itself. The testing infrastructure needs to be able to generate invalid data so that we can test for error cases in the tools that do validate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141649/new/

https://reviews.llvm.org/D141649



More information about the llvm-commits mailing list