summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-04-21 20:44:45 +0900
committerJosé Fonseca <[email protected]>2008-04-21 22:23:31 +0900
commit08717d94619802f7816420be155c0c92fa727109 (patch)
tree64d8eb858455894646f38b22bb10092ac7480f4c /src
parent76a3590046d74c923d9837f82ece1587224b9a41 (diff)
gallium: Do not mistake pipe state objects for state tracker state objects.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 746b1761850..4541be8a5ca 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -266,8 +266,9 @@ void cso_save_samplers(struct cso_context *ctx)
void cso_restore_samplers(struct cso_context *ctx)
{
- cso_set_samplers(ctx, ctx->nr_samplers_saved,
- (const struct pipe_sampler_state **) ctx->samplers_saved);
+ ctx->nr_samplers = ctx->nr_samplers_saved;
+ memcpy(ctx->samplers, ctx->samplers_saved, sizeof(ctx->samplers));
+ cso_single_sampler_done( ctx );
}
@@ -313,6 +314,8 @@ void cso_restore_sampler_textures( struct cso_context *ctx )
pipe_texture_reference(&ctx->textures[i], NULL);
ctx->pipe->set_sampler_textures(ctx->pipe, ctx->nr_textures, ctx->textures);
+
+ ctx->nr_textures_saved = 0;
}