diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index cc2fdb71..5bfffbde 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -676,11 +676,22 @@ namespace dxvk { // Compute hash from both the xfb info and the source // code, because both influence the generated code - std::array chunks = {{ - { pShaderBytecode, BytecodeLength }, - { &xfb, sizeof(xfb) }, + DxbcXfbInfo hashXfb = xfb; + + std::vector chunks = {{ + { pShaderBytecode, BytecodeLength }, + { &hashXfb, sizeof(hashXfb) }, }}; + for (uint32_t i = 0; i < hashXfb.entryCount; i++) { + const char* semantic = hashXfb.entries[i].semanticName; + + if (semantic) { + chunks.push_back({ semantic, std::strlen(semantic) }); + hashXfb.entries[i].semanticName = nullptr; + } + } + Sha1Hash hash = Sha1Hash::compute(chunks.size(), chunks.data()); // Create the actual shader module