Remove link results from program hash

The program hash should be independent of link output.  The fragment
shader output locations were being hashed in the program hash, but that
should be unnecessary, as they are derived from the link input, which is
already entirely present in the program hash.

Bug: angleproject:1085
Bug: angleproject:8297
Change-Id: I4befd45c69c2f0d4d6d8b620167a07eedffd5098
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817829
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Shahbaz Youssefi
2023-08-28 15:27:11 -04:00
committed by Angle LUCI CQ
parent cd3592505e
commit 0df4adbd24

View File

@@ -51,17 +51,6 @@ void WriteProgramAliasedBindings(BinaryOutputStream *stream, const ProgramAliase
}
}
void WriteVariableLocations(BinaryOutputStream *stream,
const std::vector<gl::VariableLocation> &locations)
{
for (const auto &loc : locations)
{
stream->writeInt(loc.index);
stream->writeInt(loc.arrayIndex);
stream->writeBool(loc.ignored);
}
}
} // anonymous namespace
MemoryProgramCache::MemoryProgramCache(egl::BlobCache &blobCache) : mBlobCache(blobCache) {}
@@ -101,8 +90,6 @@ void MemoryProgramCache::ComputeHash(const Context *context,
hashStream.writeString(transformFeedbackVaryingName);
}
hashStream.writeInt(program->getState().getTransformFeedbackBufferMode());
WriteVariableLocations(&hashStream, program->getState().getOutputLocations());
WriteVariableLocations(&hashStream, program->getState().getSecondaryOutputLocations());
// Include the status of FrameCapture, which adds source strings to the binary
hashStream.writeBool(context->getShareGroup()->getFrameCaptureShared()->enabled());