summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-13 16:57:57 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-13 16:57:57 -0600
commit269fbeb5459952532f5d188dd3653fa6b7425cfe (patch)
tree35f9889ccac69760d2cb91aeae60e6bfce8c20c4 /src/gallium/drivers/softpipe
parent13334c8dd2744402d43f8ea0a9d2c0e5e76ac28e (diff)
gallium: in softpipe_get_vertex_info() generate a vbuf vertex_info with real attribs
Can't use the EMIT_ALL shortcut/optimization anymore because of passthrough mode.
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_derived.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c
index eafbaed4b9..10483675ea 100644
--- a/src/gallium/drivers/softpipe/sp_state_derived.c
+++ b/src/gallium/drivers/softpipe/sp_state_derived.c
@@ -72,10 +72,22 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
*/
struct vertex_info *vinfo_vbuf = &softpipe->vertex_info_vbuf;
vinfo_vbuf->num_attribs = 0;
+#if 0
+ /* special-case to allow memcpy of whole vertex */
draw_emit_vertex_attr(vinfo_vbuf, EMIT_ALL, INTERP_NONE, 0);
/* size in dwords or floats */
vinfo_vbuf->size = 4 * draw_num_vs_outputs(softpipe->draw)
+ sizeof(struct vertex_header) / 4;
+#else
+ /* for pass-through mode, we need a more explicit list of attribs */
+ const uint num = draw_num_vs_outputs(softpipe->draw);
+ uint i;
+ draw_emit_vertex_attr(vinfo_vbuf, EMIT_HEADER, INTERP_NONE, 0);
+ for (i = 0; i < num; i++) {
+ draw_emit_vertex_attr(vinfo_vbuf, EMIT_4F, INTERP_PERSPECTIVE, i);
+ }
+ draw_compute_vertex_size(vinfo_vbuf);
+#endif
}
/*