zink: fix caching of shader variants with inlined uniforms
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 25 May 2021 18:17:56 +0000 (14:17 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Jun 2021 09:24:24 +0000 (09:24 +0000)
commiteb12f7f11ea8d9e05193f475620ff9f9e0947c73
tree79bbac87efaa2957117252ec724c876bfb4c56ac
parentcfe7e81214b8a7b08681795acde1b192f90d71af
zink: fix caching of shader variants with inlined uniforms

attempting to read the inlined uniforms directly after the variant key
using the size of the variant is not going to work since the variant union
is (sometimes) much larger than the size of the actual struct being used,
meaning that this would just copy a bunch of zeroes instead of the actual
inlined uniforms

Fixes: 7f28775edcc ("zink: implement uniform inlining")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11003>
src/gallium/drivers/zink/zink_program.c