Mesa (i965g-restart): i965g: hook up some missing vertex shader code
Keith Whitwell
keithw at kemper.freedesktop.org
Wed Nov 4 23:45:25 UTC 2009
Module: Mesa
Branch: i965g-restart
Commit: 1b611f99b430333e840908b42471a721689b2529
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b611f99b430333e840908b42471a721689b2529
Author: Keith Whitwell <keithw at vmware.com>
Date: Wed Nov 4 23:18:07 2009 +0000
i965g: hook up some missing vertex shader code
---
src/gallium/drivers/i965/brw_pipe_shader.c | 11 +++++++++--
src/gallium/drivers/i965/brw_vs_emit.c | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/i965/brw_pipe_shader.c b/src/gallium/drivers/i965/brw_pipe_shader.c
index 8e10edb..2833f2b 100644
--- a/src/gallium/drivers/i965/brw_pipe_shader.c
+++ b/src/gallium/drivers/i965/brw_pipe_shader.c
@@ -128,12 +128,19 @@ static void *brw_create_vs_state( struct pipe_context *pipe,
vs->id = brw->program_id++;
//vs->has_flow_control = brw_wm_has_flow_control(vs);
- /* Tell the draw module about this shader:
- */
+ vs->tokens = tgsi_dup_tokens(shader->tokens);
+ if (vs->tokens == NULL)
+ goto fail;
+
+ tgsi_scan_shader(vs->tokens, &vs->info);
/* Done:
*/
return (void *)vs;
+
+fail:
+ FREE(vs);
+ return NULL;
}
diff --git a/src/gallium/drivers/i965/brw_vs_emit.c b/src/gallium/drivers/i965/brw_vs_emit.c
index bcc5c5f..95e2b8e 100644
--- a/src/gallium/drivers/i965/brw_vs_emit.c
+++ b/src/gallium/drivers/i965/brw_vs_emit.c
@@ -90,7 +90,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
/* XXX: immediates can go elsewhere if necessary:
*/
assert(c->vp->info.file_max[TGSI_FILE_IMMEDIATE] +
- c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 21 > BRW_MAX_GRF);
+ c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 21 <= BRW_MAX_GRF);
c->vp->use_const_buffer = GL_FALSE;
}
More information about the mesa-commit
mailing list