summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-09-28 04:33:55 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-09-28 12:29:22 -0400
commita1a989f0be8dc34082b52bb3b3a6eacb36d9e75e (patch)
tree66c447fff8d693fa1a39522271bd29735d7828d6 /src/mesa/pipe/i915simple
parentf78193f444dad2a1aee219f538bc0da3f040c2e1 (diff)
Redoing the way we handle vertex shaders for the draw module.
Diffstat (limited to 'src/mesa/pipe/i915simple')
-rw-r--r--src/mesa/pipe/i915simple/i915_state.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c
index 5c6d37a466..19ca5e575f 100644
--- a/src/mesa/pipe/i915simple/i915_state.c
+++ b/src/mesa/pipe/i915simple/i915_state.c
@@ -443,16 +443,13 @@ static void i915_set_polygon_stipple( struct pipe_context *pipe,
{
}
-
-static void *
-i915_create_shader_state(struct pipe_context *pipe,
- const struct pipe_shader_state *templ)
+static void * i915_create_fs_state(struct pipe_context *pipe,
+ const struct pipe_shader_state *templ)
{
return 0;
}
-static void i915_bind_fs_state( struct pipe_context *pipe,
- void *fs )
+static void i915_bind_fs_state(struct pipe_context *pipe, void *fs)
{
struct i915_context *i915 = i915_context(pipe);
@@ -461,20 +458,35 @@ static void i915_bind_fs_state( struct pipe_context *pipe,
i915->dirty |= I915_NEW_FS;
}
+static void i915_delete_fs_state(struct pipe_context *pipe, void *shader)
+{
+ /*do nothing*/
+}
-static void i915_bind_vs_state(struct pipe_context *pipe,
- void *vs)
+static void *
+i915_create_vs_state(struct pipe_context *pipe,
+ const struct pipe_shader_state *templ)
{
struct i915_context *i915 = i915_context(pipe);
/* just pass-through to draw module */
- draw_set_vertex_shader(i915->draw, (const struct pipe_shader_state *)vs);
+ return draw_create_vertex_shader(i915->draw, templ);
}
-static void i915_delete_shader_state(struct pipe_context *pipe,
- void *shader)
+static void i915_bind_vs_state(struct pipe_context *pipe, void *vs)
{
- /*do nothing*/
+ struct i915_context *i915 = i915_context(pipe);
+
+ /* just pass-through to draw module */
+ draw_bind_vertex_shader(i915->draw, vs);
+}
+
+static void i915_delete_vs_state(struct pipe_context *pipe, void *shader)
+{
+ struct i915_context *i915 = i915_context(pipe);
+
+ /* just pass-through to draw module */
+ draw_delete_vertex_shader(i915->draw, shader);
}
static void i915_set_constant_buffer(struct pipe_context *pipe,
@@ -707,12 +719,12 @@ i915_init_state_functions( struct i915_context *i915 )
i915->pipe.create_rasterizer_state = i915_create_rasterizer_state;
i915->pipe.bind_rasterizer_state = i915_bind_rasterizer_state;
i915->pipe.delete_rasterizer_state = i915_delete_rasterizer_state;
- i915->pipe.create_fs_state = i915_create_shader_state;
+ i915->pipe.create_fs_state = i915_create_fs_state;
i915->pipe.bind_fs_state = i915_bind_fs_state;
- i915->pipe.delete_fs_state = i915_delete_shader_state;
- i915->pipe.create_vs_state = i915_create_shader_state;
+ i915->pipe.delete_fs_state = i915_delete_fs_state;
+ i915->pipe.create_vs_state = i915_create_vs_state;
i915->pipe.bind_vs_state = i915_bind_vs_state;
- i915->pipe.delete_vs_state = i915_delete_shader_state;
+ i915->pipe.delete_vs_state = i915_delete_vs_state;
i915->pipe.set_blend_color = i915_set_blend_color;
i915->pipe.set_clip_state = i915_set_clip_state;