aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_strings.c1
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.c16
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.h4
3 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index 34dec4f8a3e..713631fbec4 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -122,6 +122,7 @@ const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
"FS_DEPTH_LAYOUT",
"VS_PROHIBIT_UCPS",
"GS_INVOCATIONS",
+ "VS_POSITION_WINDOW_SPACE"
};
const char *tgsi_type_names[5] =
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))) {
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index a0a50b7220e..28edea6cdae 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -184,6 +184,10 @@ void
ureg_property_fs_depth_layout(struct ureg_program *ureg,
unsigned fs_depth_layout);
+void
+ureg_property_vs_window_space_position(struct ureg_program *ureg,
+ boolean vs_window_space_position);
+
/***********************************************************************
* Build shader declarations: