[Mesa-dev] [PATCH 2/2] radeonsi/nir: fix gl_FragCoord for pixel_center_integer
Timothy Arceri
tarceri at itsqueeze.com
Wed Feb 14 05:02:25 UTC 2018
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index b46c7dca86..cb4f8e9255 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -77,6 +77,12 @@ static void scan_instruction(struct tgsi_shader_info *info,
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
switch (intr->intrinsic) {
+ case nir_intrinsic_load_frag_coord:
+ if (intr->const_index[0] == 1) {
+ info->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER] =
+ TGSI_FS_COORD_PIXEL_CENTER_INTEGER;
+ }
+ break;
case nir_intrinsic_load_front_face:
info->uses_frontface = 1;
break;
--
2.14.3
More information about the mesa-dev
mailing list