summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_ureg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 2bf93ee6adb..bd0a3f79fbd 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -173,6 +173,7 @@ struct ureg_program
unsigned char property_fs_coord_pixel_center; /* = TGSI_FS_COORD_PIXEL_CENTER_* */
unsigned char property_fs_color0_writes_all_cbufs; /* = TGSI_FS_COLOR0_WRITES_ALL_CBUFS * */
unsigned char property_fs_depth_layout; /* TGSI_FS_DEPTH_LAYOUT */
+ boolean property_vs_window_space_position; /* TGSI_VS_WINDOW_SPACE_POSITION */
unsigned nr_addrs;
unsigned nr_preds;
@@ -331,6 +332,13 @@ ureg_property_fs_depth_layout(struct ureg_program *ureg,
ureg->property_fs_depth_layout = fs_depth_layout;
}
+void
+ureg_property_vs_window_space_position(struct ureg_program *ureg,
+ boolean vs_window_space_position)
+{
+ ureg->property_vs_window_space_position = vs_window_space_position;
+}
+
struct ureg_src
ureg_DECL_fs_input_cyl_centroid(struct ureg_program *ureg,
unsigned semantic_name,
@@ -1508,6 +1516,14 @@ static void emit_decls( struct ureg_program *ureg )
ureg->property_fs_depth_layout);
}
+ if (ureg->property_vs_window_space_position) {
+ assert(ureg->processor == TGSI_PROCESSOR_VERTEX);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION,
+ ureg->property_vs_window_space_position);
+ }
+
if (ureg->processor == TGSI_PROCESSOR_VERTEX) {
for (i = 0; i < UREG_MAX_INPUT; i++) {
if (ureg->vs_inputs[i/32] & (1 << (i%32))) {