diff options
author | Olivier Galibert <[email protected]> | 2012-07-19 22:00:16 +0200 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-09 09:07:49 -0700 |
commit | 7426d9d7699452f15f3288e781e1791d8d00a64a (patch) | |
tree | 28f136033bfadb37dcf663a59a9dcc6ea7aded4d /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | 34665381713249c29b7da5028396222dfea477c2 (diff) |
i965/fs: Fix the FS inputs setup when some SF outputs aren't used in the FS.
If there was an edge flag or a two-side-color pair present, we'd end up
mismatched and read values from earlier in the VUE for later FS inputs.
v2: Fix regression in gles2conform shaders generating point size. (change by
anholt)
Signed-off-by: Olivier Galibert <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 90dddce8670..e8ee0cb8f7e 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -954,11 +954,22 @@ fs_visitor::calculate_urb_setup() } else { /* FINISHME: The sf doesn't map VS->FS inputs for us very well. */ for (unsigned int i = 0; i < VERT_RESULT_MAX; i++) { + /* Point size is packed into the header, not as a general attribute */ + if (i == VERT_RESULT_PSIZ) + continue; + if (c->key.vp_outputs_written & BITFIELD64_BIT(i)) { int fp_index = _mesa_vert_result_to_frag_attrib((gl_vert_result) i); + /* The back color slot is skipped when the front color is + * also written to. In addition, some slots can be + * written in the vertex shader and not read in the + * fragment shader. So the register number must always be + * incremented, mapped or not. + */ if (fp_index >= 0) - urb_setup[fp_index] = urb_next++; + urb_setup[fp_index] = urb_next; + urb_next++; } } |