diff options
author | Corbin Simpson <[email protected]> | 2009-03-31 18:58:03 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-03-31 18:58:03 -0700 |
commit | ddd0c94f0440cebc5e63afc1ae0300e0f51bc0a3 (patch) | |
tree | 272658a8e5357ace93bdf91ae20739e7ae0ca005 /src/gallium/drivers/r300/r300_emit.c | |
parent | 63529c731a090c5e41c1224ca79b544243a1e570 (diff) |
r300-gallium: Add vertex shader emit.
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index a2e9cca39ba..4032eac1337 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -325,9 +325,29 @@ void r300_emit_vertex_format_state(struct r300_context* r300) END_CS; } +void r300_emit_vertex_shader(struct r300_context* r300, + struct r300_vertex_shader* vs) +{ + CS_LOCALS(r300); + int i; + + BEGIN_CS(1 + (vs->instruction_count * 4)); + + OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, vs->instruction_count * 4); + for (i = 0; i < vs->instruction_count; i++) { + OUT_CS(vs->instructions[i].inst0); + OUT_CS(vs->instructions[i].inst1); + OUT_CS(vs->instructions[i].inst2); + OUT_CS(vs->instructions[i].inst3); + } + END_CS; + +} + void r300_emit_viewport_state(struct r300_context* r300, struct r300_viewport_state* viewport) { + /* XXX has_tcl */ return; CS_LOCALS(r300); |