[PATCH] D139357: Generate DXIL Shader hash

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 12:22:19 PST 2022


beanz created this revision.
beanz added reviewers: pow2clk, tex3d, python3kgae.
Herald added a subscriber: hiraditya.
Herald added a project: All.
beanz requested review of this revision.
Herald added a project: LLVM.

DXIL shader bitcode is hashed and the hash is placed into the final
output object file in its own data part.

This change modifies the DXContainerGlobals pass to compute the shader
hash (just an MD5 of the bitcode) and put the shader hash data into a
global for the HASH part.

This also sets the hash flag as appropriate for if the hashed shader
contained debug information. There is additional handling required to
get debug information in shaders working correctly with our tooling,
but that will be addressed in subsequent patches.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139357

Files:
  llvm/lib/Target/DirectX/DXContainerGlobals.cpp
  llvm/test/CodeGen/DirectX/ContainerData/DebugShaderHash.ll
  llvm/test/CodeGen/DirectX/ContainerData/ShaderHash.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139357.480201.patch
Type: text/x-patch
Size: 4624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/5716611f/attachment.bin>


More information about the llvm-commits mailing list