[Mesa-dev] [PATCH 1/2] nir: retain pixel_center_integer information when lowering gl_FragCoord
Timothy Arceri
tarceri at itsqueeze.com
Wed Feb 14 05:02:24 UTC 2018
radeonsi needs to gather this information.
---
src/compiler/nir/nir_lower_system_values.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c
index 3594f4ae5c..f8d8463f7f 100644
--- a/src/compiler/nir/nir_lower_system_values.c
+++ b/src/compiler/nir/nir_lower_system_values.c
@@ -133,6 +133,15 @@ convert_block(nir_block *block, nir_builder *b)
break;
}
+ case SYSTEM_VALUE_FRAG_COORD: {
+ nir_intrinsic_op sysval_op =
+ nir_intrinsic_from_system_value(var->data.location);
+ int idx = 0;
+ if (var->data.pixel_center_integer) {
+ idx = 1;
+ }
+ sysval = nir_load_system_value(b, sysval_op, idx);
+ }
default:
break;
}
--
2.14.3
More information about the mesa-dev
mailing list