intel/fs: Fix sampler message headers on Gen11+ when using scratch
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 15 Sep 2020 17:54:05 +0000 (10:54 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Nov 2020 23:32:09 +0000 (23:32 +0000)
commit31290f98061acc237ba0f5d9c8c4c38ad6075c70
tree6d97547d8014da17c97f531034468a8f4ca922d1
parent97ebb896afb6801d1fcd69556583975411379998
intel/fs: Fix sampler message headers on Gen11+ when using scratch

Icelake's sampler message header introduces a field in m0.3 bit 0
which controls whether the sampler state pointer should be relative
to bindless sampler state base address or dynamic state base address.

g0.3 bit 0 is part of the per-thread scratch space field.  On older
hardware, we were able to copy that along because the sampler ignored
bits 4:0.  Now, however, we need to mask them out.

Fixes various textureGatherOffsets piglit tests when forcing the FS
to run with 2048 bytes of per-thread scratch space (which is a
per-thread scratch space encoding of 1, meaning bit 0 will be set).

Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6735>
src/intel/compiler/brw_fs.cpp