iris: Fix the constant data address calculation
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 2 Oct 2020 22:41:15 +0000 (17:41 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 3 Oct 2020 03:33:16 +0000 (03:33 +0000)
commit1b0fec444fd23b99345b2818fcbe29d406709b0d
tree27a5f489ef1ce322b91713367a1dffd480fcb5bd
parent23ff2a0e634f4be94fec24c84dc3339a434f69ba
iris: Fix the constant data address calculation

In 536727c46517, we switched iris to patching the constant data address
into the shader but, thanks to my lack of understanding how iris works,
I got the calculation wrong.  I didn't realize, we needed to call
iris_bo_offset_from_base_address to get the BO offset from the start of
instruction state base address.

Fixes: 536727c465170c "iris: Patch constant data pointers into shaders"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3596
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6992>
src/gallium/drivers/iris/iris_program_cache.c