vc4: don't use imprecise_32bit_lowering for idiv lowering
authorEric Engestrom <eric@igalia.com>
Fri, 5 Aug 2022 12:45:47 +0000 (13:45 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 25 Oct 2022 06:07:29 +0000 (06:07 +0000)
commit4e570cbfa20fb00c923bcb0218c058643c4b7c77
tree6ef448ee3dc580e5ffce67a89a46ea5191e1cb5a
parent210e8a80ac18e0cdb55940e1ebf56f706edc60e6
vc4: don't use imprecise_32bit_lowering for idiv lowering

This is known to produce bogus results for certain combinations of
operands, so don't use it. See this issue for details:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6555

None of the shaders in shaderdb are affected by this change, as all of
the shaders containing an integer division require a higher GLSL version
than vc4 supports and are therefore all skipped.

This is port of the v3d change 73e8fc3efbfe4a46bfd5ca5b3269d06f086bc224
to vc4; we expect the impact to be the same as for v3d, based on testing
a custom shader.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18019>
src/gallium/drivers/vc4/vc4_program.c