radeonsi: enable nir_frag_coord_use_pixel_coord

no change in behavior other than getting pixel_coord from the beginning
unconditionally

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
This commit is contained in:
Marek Olšák 2026-05-09 20:33:27 -04:00 committed by Marge Bot
parent 159f22abbe
commit 7ff4454b41
2 changed files with 5 additions and 1 deletions

View file

@ -340,7 +340,8 @@ static void si_init_screen_nir_options(struct si_screen *sscreen)
sscreen->info.compiler_info.has_packed_math_16bit ? si_alu_to_scalar_packed_math_filter : NULL;
options->max_unroll_iterations = 128;
options->max_unroll_iterations_aggressive = 128;
options->frag_coord_form = nir_frag_coord_xy_z_w_separate | nir_frag_coord_use_w_rcp;
options->frag_coord_form = nir_frag_coord_xy_z_w_separate | nir_frag_coord_use_w_rcp |
nir_frag_coord_use_pixel_coord;
/* For OpenGL, rounding mode is undefined. We want fast packing with v_cvt_pkrtz_f16,
* but if we use it, all f32->f16 conversions have to round towards zero,
* because both scalar and vec2 down-conversions have to round equally.

View file

@ -637,6 +637,8 @@ void si_nir_gather_info(struct si_screen *sscreen, struct nir_shader *nir,
}
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
assert(!BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_FRAG_COORD_XY));
info->output_z_equals_input_z &= !info->output_z_is_not_input_z;
info->allow_flat_shading = !(info->uses_sysval_persp_center || info->uses_sysval_persp_centroid ||
info->uses_sysval_persp_sample || info->uses_sysval_linear_center ||
@ -647,6 +649,7 @@ void si_nir_gather_info(struct si_screen *sscreen, struct nir_shader *nir,
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_FRAG_COORD_XY) ||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_FRAG_COORD_Z) ||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_FRAG_COORD_W_RCP) ||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_PIXEL_COORD) ||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_POINT_COORD) ||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_SAMPLE_ID) ||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_SAMPLE_POS) ||