Commit 8539177ca877220db255ff4bc7abf531cf0c3dcd

Amirali Abdolrashidi 2023-05-12T15:27:03

Vulkan: Change pipeline cache header into class Currently the pipeline cache header is represented by a single value of type uint64_t. This prevents us from expanding the header if needed, for example if there is a need to increase the size of any of the data already included, such as numChunks, or add new data to the header. * Added the class CacheDataHeader to RendererVk.cpp, which is comprised of various elements of fixed size. * Replaced the uint64_t with CacheDataHeader. memcpy() is used for data transfer. * The order of the values is based on LSB, similar to the order in the original uint64_t. * Removed kBlobHeaderSize, replaced with sizeof(CacheDataHeader). * In GetAndDecompressPipelineCacheVk(), replaced the assert for chunk index 0 with a warning regarding unexpected values and the function returning without success. The assert was removed since in the case of expanding the chunk index beyond 8 bits, a non-zero value could be decoded. * numChunks and uncompressed data size are also checked to make sure they are non-zero before continuing the decompression. Otherwise, the function would return with no success. Bug: b/246683126 Change-Id: I4caaaef28c3e9ab2a7ca22f89962c11705577be5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4528540 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>