From 241bc5da70e44fc45d7a0a9d6296792a0e774818 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Fri, 21 Feb 2025 10:43:35 -0800 Subject: [PATCH] intel/elk: Use the pixel_coord UW x/y values for noncoherent FB reads. No need to force generating the float cast just to turn it back to an int. Part-of: --- src/intel/compiler/elk/elk_fs_nir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/elk/elk_fs_nir.cpp b/src/intel/compiler/elk/elk_fs_nir.cpp index 2fac136e546..c09d02c47c7 100644 --- a/src/intel/compiler/elk/elk_fs_nir.cpp +++ b/src/intel/compiler/elk/elk_fs_nir.cpp @@ -3187,8 +3187,8 @@ emit_non_coherent_fb_read(nir_to_elk_state &ntb, const fs_builder &bld, const el /* Calculate the fragment coordinates. */ const elk_fs_reg coords = bld.vgrf(ELK_REGISTER_TYPE_UD, 3); - bld.MOV(offset(coords, bld, 0), s.pixel_x); - bld.MOV(offset(coords, bld, 1), s.pixel_y); + bld.MOV(offset(coords, bld, 0), s.uw_pixel_x); + bld.MOV(offset(coords, bld, 1), s.uw_pixel_y); bld.MOV(offset(coords, bld, 2), fetch_render_target_array_index(bld)); /* Calculate the sample index and MCS payload when multisampling. Luckily