Mesa (i965g-restart): i965g: setup nr_attrs should track nr fragment shader inputs
Keith Whitwell
keithw at kemper.freedesktop.org
Fri Nov 20 13:44:45 UTC 2009
Module: Mesa
Branch: i965g-restart
Commit: 8db59a1fa329b28ba375d54d6d6d5df06f411a6e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8db59a1fa329b28ba375d54d6d6d5df06f411a6e
Author: Keith Whitwell <keithw at vmware.com>
Date: Thu Nov 19 16:14:44 2009 -0800
i965g: setup nr_attrs should track nr fragment shader inputs
This would be equivalent to taking the nr outputs of the vp varient
---
src/gallium/drivers/i965/brw_sf.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/i965/brw_sf.c b/src/gallium/drivers/i965/brw_sf.c
index 52fb2cd..e75f447 100644
--- a/src/gallium/drivers/i965/brw_sf.c
+++ b/src/gallium/drivers/i965/brw_sf.c
@@ -124,8 +124,12 @@ static enum pipe_error upload_sf_prog(struct brw_context *brw)
/* Populate the key, noting state dependencies:
*/
- /* CACHE_NEW_VS_PROG */
- key.nr_attrs = brw->curr.vertex_shader->info.file_max[TGSI_FILE_OUTPUT] + 1;
+
+ /* XXX: Add one to turn the max value into a count, then add
+ * another one to account for the position input.
+ */
+ /* PIPE_NEW_FRAGMENT_SHADER */
+ key.nr_attrs = brw->curr.vertex_shader->info.file_max[TGSI_FILE_INPUT] + 2;
/* XXX: this is probably where the mapping between vertex shader
More information about the mesa-commit
mailing list