mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 01:30:34 +01:00
radv: Fix RTPSO hashing of pGroups.
There are padding bytes here. Only hash relevant members.
Fixes: ca2d96db51 ("radv: Add caching for RT pipelines.")
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16582>
This commit is contained in:
parent
b58dd252aa
commit
04459c8287
1 changed files with 12 additions and 2 deletions
|
|
@ -164,8 +164,18 @@ radv_hash_rt_shaders(unsigned char *hash, const VkRayTracingPipelineCreateInfoKH
|
|||
}
|
||||
}
|
||||
|
||||
_mesa_sha1_update(&ctx, pCreateInfo->pGroups,
|
||||
pCreateInfo->groupCount * sizeof(*pCreateInfo->pGroups));
|
||||
for (uint32_t i = 0; i < pCreateInfo->groupCount; i++) {
|
||||
_mesa_sha1_update(&ctx, &pCreateInfo->pGroups[i].type,
|
||||
sizeof(pCreateInfo->pGroups[i].type));
|
||||
_mesa_sha1_update(&ctx, &pCreateInfo->pGroups[i].generalShader,
|
||||
sizeof(pCreateInfo->pGroups[i].generalShader));
|
||||
_mesa_sha1_update(&ctx, &pCreateInfo->pGroups[i].anyHitShader,
|
||||
sizeof(pCreateInfo->pGroups[i].anyHitShader));
|
||||
_mesa_sha1_update(&ctx, &pCreateInfo->pGroups[i].closestHitShader,
|
||||
sizeof(pCreateInfo->pGroups[i].closestHitShader));
|
||||
_mesa_sha1_update(&ctx, &pCreateInfo->pGroups[i].intersectionShader,
|
||||
sizeof(pCreateInfo->pGroups[i].intersectionShader));
|
||||
}
|
||||
|
||||
if (!radv_rt_pipeline_has_dynamic_stack_size(pCreateInfo))
|
||||
_mesa_sha1_update(&ctx, &pCreateInfo->maxPipelineRayRecursionDepth, 4);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue