summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_vertex_shader.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-01-27 12:35:33 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-01-27 12:35:33 +1100
commita556034514582dc8e1b8b65f56020031d513331b (patch)
tree182aaf4be24733e2943f9e39cfb86bc22f942efb /src/mesa/pipe/draw/draw_vertex_shader.c
parent9043323f1437f9c6791845b3ddbb9af912b45110 (diff)
parentb717de3238a028a3fdfbaf13eb02dbde262f03e7 (diff)
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/pipe/draw/draw_vertex_shader.c')
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c
index c2e038453e..3041974b9a 100644
--- a/src/mesa/pipe/draw/draw_vertex_shader.c
+++ b/src/mesa/pipe/draw/draw_vertex_shader.c
@@ -38,7 +38,6 @@
#endif
#include "draw_private.h"
#include "draw_context.h"
-#include "draw_vertex.h"
#include "x86/rtasm/x86sse.h"
#include "pipe/llvm/gallivm.h"
@@ -176,7 +175,7 @@ run_vertex_program(struct draw_context *draw,
/* Remaining attributes are packed into sequential post-transform
* vertex attrib slots.
*/
- for (slot = 1; slot < draw->vertex_info.num_attribs; slot++) {
+ for (slot = 1; slot < draw->num_vs_outputs; slot++) {
vOut[j]->data[slot][0] = machine->Outputs[slot].xyzw[0].f[j];
vOut[j]->data[slot][1] = machine->Outputs[slot].xyzw[1].f[j];
vOut[j]->data[slot][2] = machine->Outputs[slot].xyzw[2].f[j];
@@ -202,6 +201,10 @@ draw_vertex_shader_queue_flush(struct draw_context *draw)
{
unsigned i, j;
+ /* XXX: do this on statechange:
+ */
+ draw_update_vertex_fetch( draw );
+
// fprintf(stderr, " q(%d) ", draw->vs.queue_nr );
#ifdef MESA_LLVM
if (draw->vertex_shader->llvm_prog) {
@@ -272,8 +275,10 @@ void
draw_bind_vertex_shader(struct draw_context *draw,
struct draw_vertex_shader *dvs)
{
- draw_flush(draw);
+ draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
+
draw->vertex_shader = dvs;
+ draw->num_vs_outputs = dvs->state->num_outputs;
/* specify the fragment program to interpret/execute */
tgsi_exec_machine_init(&draw->machine,