Skip to content

v3d: fix shader cache

Iago Toral requested to merge itoral/mesa:v3d_fix_shader_cache into main

Testing with OpenCL revealed bogus behavior with the RAM shader cache leading to GPU hangs. The underlying problem is the shader_state pointer we store in v3d_key which could lead to incorrect hashing/comparison of keys (since we would use the pointer rather than its relevant contents) and thus cause incorrect cache hits some times, leading to bogus shader state selection. It should be noted that we don't really need this pointer in the key and that it was stored there only for convenience, in fact, the vulkan driver doesn't use it at all. This MR fixes the issue and eventually gets rid of this shader_state pointer as well.

Merge request reports