diff options
author | Brian <[email protected]> | 2007-08-20 17:25:38 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-20 17:25:38 -0600 |
commit | 3239532795a027ddc578261f556e13e2c80f9676 (patch) | |
tree | 97aba148d20a028022ff899fe41ab3ad01f1946f /src/mesa/pipe/i915simple/i915_state.c | |
parent | a17d5361b257cb44614a926a7f994b4a46a07890 (diff) |
Use new draw_arrays() code.
The i915 driver now uses the software-based vertex shader interpreter
and draws everything through pipe->draw_arrays().
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state.c')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_state.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index 06fa716c4fa..1de6fea2e90 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -121,6 +121,16 @@ static void i915_set_fs_state( struct pipe_context *pipe, } +static void i915_set_vs_state( struct pipe_context *pipe, + const struct pipe_shader_state *vs ) +{ + struct i915_context *i915 = i915_context(pipe); + + /* just pass-through to draw module */ + draw_set_vertex_shader(i915->draw, vs); +} + + static void i915_set_sampler_state(struct pipe_context *pipe, unsigned unit, const struct pipe_sampler_state *sampler) @@ -216,6 +226,28 @@ static void i915_set_setup_state( struct pipe_context *pipe, } +static void i915_set_vertex_buffer( struct pipe_context *pipe, + unsigned index, + const struct pipe_vertex_buffer *buffer ) +{ + struct i915_context *i915 = i915_context(pipe); + i915->vertex_buffer[index] = *buffer; + /* pass-through to draw module */ + draw_set_vertex_buffer(i915->draw, index, buffer); +} + + +static void i915_set_vertex_element( struct pipe_context *pipe, + unsigned index, + const struct pipe_vertex_element *element) +{ + struct i915_context *i915 = i915_context(pipe); + /* pass-through to draw module */ + draw_set_vertex_element(i915->draw, index, element); +} + + + void i915_init_state_functions( struct i915_context *i915 ) { @@ -227,6 +259,7 @@ i915_init_state_functions( struct i915_context *i915 ) i915->pipe.set_depth_state = i915_set_depth_test_state; i915->pipe.set_framebuffer_state = i915_set_framebuffer_state; i915->pipe.set_fs_state = i915_set_fs_state; + i915->pipe.set_vs_state = i915_set_vs_state; i915->pipe.set_polygon_stipple = i915_set_polygon_stipple; i915->pipe.set_sampler_state = i915_set_sampler_state; i915->pipe.set_scissor_state = i915_set_scissor_state; @@ -234,4 +267,6 @@ i915_init_state_functions( struct i915_context *i915 ) i915->pipe.set_stencil_state = i915_set_stencil_state; i915->pipe.set_texture_state = i915_set_texture_state; i915->pipe.set_viewport_state = i915_set_viewport_state; + i915->pipe.set_vertex_buffer = i915_set_vertex_buffer; + i915->pipe.set_vertex_element = i915_set_vertex_element; } |