summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-09-20 10:07:10 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-09-20 10:07:10 -0400
commit7a06c026ad24b74048f6d125383faf25deb1dfbb (patch)
treee6422224c0da110d2d2e2349377c29ddc976684f /src/mesa/pipe/softpipe
parenta6c0c5532f7bfa50ae54c36cf4d74ad4b9f926f8 (diff)
Fix failover state binding and convert the sampler to use the new
state constant state object semantics.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_state.h9
-rw-r--r--src/mesa/pipe/softpipe/sp_state_sampler.c18
2 files changed, 9 insertions, 18 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h
index 08dfe208fb..62323c41c3 100644
--- a/src/mesa/pipe/softpipe/sp_state.h
+++ b/src/mesa/pipe/softpipe/sp_state.h
@@ -41,14 +41,11 @@ void softpipe_bind_blend_state(struct pipe_context *,
void softpipe_delete_blend_state(struct pipe_context *,
void *);
-const struct pipe_sampler_state *
+void *
softpipe_create_sampler_state(struct pipe_context *,
const struct pipe_sampler_state *);
-void softpipe_bind_sampler_state(struct pipe_context *,
- unsigned,
- const struct pipe_sampler_state *);
-void softpipe_delete_sampler_state(struct pipe_context *,
- const struct pipe_sampler_state *);
+void softpipe_bind_sampler_state(struct pipe_context *, unsigned, void *);
+void softpipe_delete_sampler_state(struct pipe_context *, void *);
void *
softpipe_create_depth_stencil_state(struct pipe_context *,
diff --git a/src/mesa/pipe/softpipe/sp_state_sampler.c b/src/mesa/pipe/softpipe/sp_state_sampler.c
index 09898eb579..ad98375735 100644
--- a/src/mesa/pipe/softpipe/sp_state_sampler.c
+++ b/src/mesa/pipe/softpipe/sp_state_sampler.c
@@ -32,27 +32,21 @@
#include "sp_context.h"
#include "sp_state.h"
-
-
-const struct pipe_sampler_state *
+void *
softpipe_create_sampler_state(struct pipe_context *pipe,
const struct pipe_sampler_state *sampler)
{
- struct pipe_sampler_state *new_sampler = malloc(sizeof(struct pipe_sampler_state));
- memcpy(new_sampler, sampler, sizeof(struct pipe_sampler_state));
-
- return new_sampler;
+ return 0;
}
void
softpipe_bind_sampler_state(struct pipe_context *pipe,
- unsigned unit,
- const struct pipe_sampler_state *sampler)
+ unsigned unit, void *sampler)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
assert(unit < PIPE_MAX_SAMPLERS);
- softpipe->sampler[unit] = sampler;
+ softpipe->sampler[unit] = (struct pipe_sampler_state *)sampler;
softpipe->dirty |= SP_NEW_SAMPLER;
}
@@ -60,9 +54,9 @@ softpipe_bind_sampler_state(struct pipe_context *pipe,
void
softpipe_delete_sampler_state(struct pipe_context *pipe,
- const struct pipe_sampler_state *sampler)
+ void *sampler)
{
- free((struct pipe_sampler_state*)sampler);
+ /* do nothing */
}