summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vue_map.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-05-15 09:58:42 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-06-22 14:05:44 -0700
commit94e3864707e48d4b1d5fb5f88a01370a73ddb0cb (patch)
tree38aec67991242e38e63a8039694836e6162ea4ad /src/mesa/drivers/dri/i965/brw_vue_map.c
parent38eb9015e3be9b93248e64b6befce16872107a7c (diff)
downloadexternal_mesa3d-94e3864707e48d4b1d5fb5f88a01370a73ddb0cb.tar.gz
external_mesa3d-94e3864707e48d4b1d5fb5f88a01370a73ddb0cb.tar.bz2
external_mesa3d-94e3864707e48d4b1d5fb5f88a01370a73ddb0cb.zip
i965: Add and fix comments in brw_vue_map.c.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vue_map.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vue_map.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vue_map.c b/src/mesa/drivers/dri/i965/brw_vue_map.c
index ff92bd266a..76875789ba 100644
--- a/src/mesa/drivers/dri/i965/brw_vue_map.c
+++ b/src/mesa/drivers/dri/i965/brw_vue_map.c
@@ -24,6 +24,15 @@
/**
* @file brw_vue_map.c
*
+ * This file computes the "VUE map" for a (non-fragment) shader stage, which
+ * describes the layout of its output varyings. The VUE map is used to match
+ * outputs from one stage with the inputs of the next.
+ *
+ * Largely, varyings can be placed however we like - producers/consumers simply
+ * have to agree on the layout. However, there is also a "VUE Header" that
+ * prescribes a fixed-layout for items that interact with fixed function
+ * hardware, such as the clipper and rasterizer.
+ *
* Authors:
* Paul Berry <stereotype441@gmail.com>
* Chris Forbes <chrisf@ijw.co.nz>
@@ -45,7 +54,7 @@ assign_vue_slot(struct brw_vue_map *vue_map, int varying)
}
/**
- * Compute the VUE map for vertex shader program.
+ * Compute the VUE map for a shader stage.
*/
void
brw_compute_vue_map(const struct brw_device_info *devinfo,
@@ -76,6 +85,9 @@ brw_compute_vue_map(const struct brw_device_info *devinfo,
/* VUE header: format depends on chip generation and whether clipping is
* enabled.
+ *
+ * See the Sandybridge PRM, Volume 2 Part 1, section 1.5.1 (page 30),
+ * "Vertex URB Entry (VUE) Formats" which describes the VUE header layout.
*/
if (devinfo->gen < 6) {
/* There are 8 dwords in VUE header pre-Ironlake: