radv: allow input attachment to use pixel coord optimization
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The vectorized f2i32 would block nir_opt_frag_coord_to_pixel_coord.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40985>
This commit is contained in:
Georg Lehmann 2026-02-21 22:04:56 +01:00 committed by Marge Bot
parent 4b81cb6206
commit ae8f83d465

View file

@ -135,9 +135,9 @@ lower_load_input_attachment(nir_builder *b, nir_intrinsic_instr *intrin, void *s
case nir_intrinsic_load_input_attachment_coord: {
b->cursor = nir_before_instr(&intrin->instr);
nir_def *pos = nir_f2i32(b, nir_load_frag_coord(b));
nir_def *pos = nir_load_frag_coord(b);
nir_def *layer = nir_load_layer_id(b);
nir_def *coord = nir_vec3(b, nir_channel(b, pos, 0), nir_channel(b, pos, 1), layer);
nir_def *coord = nir_vec3(b, nir_f2i32(b, nir_channel(b, pos, 0)), nir_f2i32(b, nir_channel(b, pos, 1)), layer);
nir_def_replace(&intrin->def, coord);
return true;