Revert "intel/compiler: make uses_pos_offset a tri-state"
This reverts commit 5489033fa8.
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>
This commit is contained in:
committed by
Marge Bot
parent
728e316864
commit
b4b17f8aaa
@@ -7365,16 +7365,12 @@ brw_nir_populate_wm_prog_data(const nir_shader *shader,
|
||||
* per-sample dispatch. If we need gl_SamplePosition and we don't have
|
||||
* persample dispatch, we hard-code it to 0.5.
|
||||
*/
|
||||
prog_data->read_pos_offset_input =
|
||||
BITSET_TEST(shader->info.system_values_read,
|
||||
SYSTEM_VALUE_SAMPLE_POS) ||
|
||||
BITSET_TEST(shader->info.system_values_read,
|
||||
SYSTEM_VALUE_SAMPLE_POS_OR_CENTER);
|
||||
|
||||
if (prog_data->read_pos_offset_input)
|
||||
prog_data->uses_pos_offset = prog_data->persample_dispatch;
|
||||
else
|
||||
prog_data->uses_pos_offset = BRW_NEVER;
|
||||
prog_data->uses_pos_offset =
|
||||
prog_data->persample_dispatch != BRW_NEVER &&
|
||||
(BITSET_TEST(shader->info.system_values_read,
|
||||
SYSTEM_VALUE_SAMPLE_POS) ||
|
||||
BITSET_TEST(shader->info.system_values_read,
|
||||
SYSTEM_VALUE_SAMPLE_POS_OR_CENTER));
|
||||
}
|
||||
|
||||
prog_data->has_render_target_reads = shader->info.outputs_read != 0ull;
|
||||
|
||||
Reference in New Issue
Block a user