summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-03-22 12:34:19 -0700
committerPaul Berry <[email protected]>2013-08-23 11:03:47 -0700
commit60ddb96f7e0ea8dfb277cd1f249c7912c07c46b1 (patch)
tree4488c241cbac4259fbbddc54ab82dab24ac9056d
parent06918f84c2d1092ac327d836ce9f136f41736e6f (diff)
i965/gs: Add a data structure for tracking VS output VUE map.
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h9
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c8
2 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index e4a1886325e..98a59fda261 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -150,6 +150,7 @@ enum brw_state_id {
BRW_STATE_VS_CONSTBUF,
BRW_STATE_PROGRAM_CACHE,
BRW_STATE_STATE_BASE_ADDRESS,
+ BRW_STATE_VUE_MAP_VS,
BRW_STATE_VUE_MAP_GEOM_OUT,
BRW_STATE_TRANSFORM_FEEDBACK,
BRW_STATE_RASTERIZER_DISCARD,
@@ -185,6 +186,7 @@ enum brw_state_id {
#define BRW_NEW_VS_CONSTBUF (1 << BRW_STATE_VS_CONSTBUF)
#define BRW_NEW_PROGRAM_CACHE (1 << BRW_STATE_PROGRAM_CACHE)
#define BRW_NEW_STATE_BASE_ADDRESS (1 << BRW_STATE_STATE_BASE_ADDRESS)
+#define BRW_NEW_VUE_MAP_VS (1 << BRW_STATE_VUE_MAP_VS)
#define BRW_NEW_VUE_MAP_GEOM_OUT (1 << BRW_STATE_VUE_MAP_GEOM_OUT)
#define BRW_NEW_TRANSFORM_FEEDBACK (1 << BRW_STATE_TRANSFORM_FEEDBACK)
#define BRW_NEW_RASTERIZER_DISCARD (1 << BRW_STATE_RASTERIZER_DISCARD)
@@ -1103,6 +1105,13 @@ struct brw_context
} curbe;
/**
+ * Layout of vertex data exiting the vertex shader.
+ *
+ * BRW_NEW_VUE_MAP_VS is flagged when this VUE map changes.
+ */
+ struct brw_vue_map vue_map_vs;
+
+ /**
* Layout of vertex data exiting the geometry portion of the pipleine.
* This comes from the geometry shader if one exists, otherwise from the
* vertex shader.
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 0a3924fddf4..6a67bc47042 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -484,7 +484,13 @@ static void brw_upload_vs_prog(struct brw_context *brw)
}
if (memcmp(&brw->vs.prog_data->base.vue_map, &brw->vue_map_geom_out,
sizeof(brw->vue_map_geom_out)) != 0) {
- brw->vue_map_geom_out = brw->vs.prog_data->base.vue_map;
+ brw->vue_map_vs = brw->vs.prog_data->base.vue_map;
+ brw->state.dirty.brw |= BRW_NEW_VUE_MAP_VS;
+
+ /* No geometry shader support yet, so the VS VUE map is the VUE map for
+ * the output of the "geometry" portion of the pipeline.
+ */
+ brw->vue_map_geom_out = brw->vue_map_vs;
brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT;
}
}