summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_feedback.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-15 13:42:56 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-15 13:42:56 -0600
commit65b1f6947f0d4d83a942478383d27ba84a02b20f (patch)
tree8a795fe531d9a21cebd22016c86e15dcea15fa0c /src/mesa/state_tracker/st_cb_feedback.c
parent520ad5f854723955c89584e4fa0bd172d0969e09 (diff)
setup vertex format for GL_FEEDBACK mode
Diffstat (limited to 'src/mesa/state_tracker/st_cb_feedback.c')
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index f0c6bf6185..5e334e3c85 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -54,6 +54,7 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
+#include "pipe/cso_cache/cso_cache.h"
#include "vf/vf.h"
#include "pipe/draw/draw_context.h"
@@ -307,6 +308,19 @@ st_RenderMode(GLcontext *ctx, GLenum newMode )
draw_set_rasterize_stage(draw, st->feedback_stage);
/* Plug in new vbo draw function */
vbo->draw_prims = st_feedback_draw_vbo;
+ /* setup post-transform vertex attribs */
+ {
+ /* emit all attribs as GLfloat[4] */
+ uint attrs[PIPE_MAX_SHADER_OUTPUTS];
+ interp_mode interp[PIPE_MAX_SHADER_OUTPUTS];
+ GLuint n = st->state.vs->state.num_outputs;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ attrs[i] = FORMAT_4F;
+ interp[i] = INTERP_NONE;
+ }
+ draw_set_vertex_attributes(draw, attrs, interp, n);
+ }
}
}