aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_state.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-09-28 04:33:55 -0400
committerZack Rusin <[email protected]>2007-09-28 09:12:20 -0400
commit6dcfddb8e2ec2bfb6187b912807fa65f28da2c5e (patch)
tree66c447fff8d693fa1a39522271bd29735d7828d6 /src/mesa/pipe/i915simple/i915_state.c
parent7966e479dca22bf2d2b844d50ac5bef70614e15a (diff)
Redoing the way we handle vertex shaders for the draw module.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state.c')
-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 5c6d37a4661..19ca5e575fb 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;