summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-16 13:33:43 -0600
committerBrian <[email protected]>2007-08-16 13:33:43 -0600
commitde653b4c9bddcec46f3ddf411ec082dd178d7b38 (patch)
treec46350dc671e6bfc32c7a0f3df45b4d0d82c6661 /src/mesa/pipe/softpipe
parentebe510766927315ec6dcd846a980cb851b5331d4 (diff)
Begin added vertex shader state/support.
Renamed pipe_fs_state to pipe_shader_state since it can be used for both vertex and fragment shader info.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.h4
-rw-r--r--src/mesa/pipe/softpipe/sp_state.h5
-rw-r--r--src/mesa/pipe/softpipe/sp_state_fs.c14
3 files changed, 15 insertions, 8 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h
index f45cb6fe2c4..8f184c644a2 100644
--- a/src/mesa/pipe/softpipe/sp_context.h
+++ b/src/mesa/pipe/softpipe/sp_context.h
@@ -63,6 +63,7 @@ enum interp_mode {
#define SP_NEW_TEXTURE 0x800
#define SP_NEW_STENCIL 0x1000
#define SP_NEW_VERTEX 0x2000
+#define SP_NEW_VS 0x4000
struct softpipe_context {
@@ -79,7 +80,8 @@ struct softpipe_context {
struct pipe_clip_state clip;
struct pipe_depth_state depth_test;
struct pipe_framebuffer_state framebuffer;
- struct pipe_fs_state fs;
+ struct pipe_shader_state fs;
+ struct pipe_shader_state vs;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h
index d754acaa38a..f25a20a5e3f 100644
--- a/src/mesa/pipe/softpipe/sp_state.h
+++ b/src/mesa/pipe/softpipe/sp_state.h
@@ -56,7 +56,10 @@ void softpipe_set_depth_test_state( struct pipe_context *,
const struct pipe_depth_state * );
void softpipe_set_fs_state( struct pipe_context *,
- const struct pipe_fs_state * );
+ const struct pipe_shader_state * );
+
+void softpipe_set_vs_state( struct pipe_context *,
+ const struct pipe_shader_state * );
void softpipe_set_polygon_stipple( struct pipe_context *,
const struct pipe_poly_stipple * );
diff --git a/src/mesa/pipe/softpipe/sp_state_fs.c b/src/mesa/pipe/softpipe/sp_state_fs.c
index c7ef1f1cfc9..3505c2f1fb6 100644
--- a/src/mesa/pipe/softpipe/sp_state_fs.c
+++ b/src/mesa/pipe/softpipe/sp_state_fs.c
@@ -31,7 +31,7 @@
void softpipe_set_fs_state( struct pipe_context *pipe,
- const struct pipe_fs_state *fs )
+ const struct pipe_shader_state *fs )
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -41,10 +41,12 @@ void softpipe_set_fs_state( struct pipe_context *pipe,
}
+void softpipe_set_vs_state( struct pipe_context *pipe,
+ const struct pipe_shader_state *vs )
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+ memcpy(&softpipe->vs, vs, sizeof(*vs));
-
-
-
-
-
+ softpipe->dirty |= SP_NEW_VS;
+}