Revert "intel/compiler: make uses_pos_offset a tri-state"
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 10 May 2023 05:16:59 +0000 (08:16 +0300)
committerMarge Bot <emma+marge@anholt.net>
Thu, 11 May 2023 08:01:46 +0000 (08:01 +0000)
commitb4b17f8aaac83fa5ff9532533697fa643a8c5741
tree752beab9674175892818a9f2fd40faf18a94c739
parent728e316864712e8714bfc641d5c3a6efa036edbb
Revert "intel/compiler: make uses_pos_offset a tri-state"

This reverts commit 5489033fa8568ecacafe32ceab36f89f2e14f3dc.

The problem I was trying to address is that we were programming the
3DSTATE_PS::PositionXYOffsetSelect bit differently with GPL (CENTROID)
than without (NONE).

I failed to understand that this bit also impacts the thread payload
layout. GPL fragment shaders don't know ahead of time if pos_offset is
going to be used. It'll be choosen at runtime base on push constant
bits. So we need to program this bit different just to have a payload
matching the compiled shader code.

This fixes the freedoom replay with GPL FS shader in SIMD32.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22938>
src/gallium/drivers/crocus/crocus_state.c
src/gallium/drivers/iris/iris_state.c
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp
src/intel/vulkan/genX_pipeline.c
src/intel/vulkan_hasvk/genX_pipeline.c