gallium: Do not mistake pipe state objects for state tracker state objects.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 21 Apr 2008 11:44:45 +0000 (20:44 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 21 Apr 2008 13:23:31 +0000 (22:23 +0900)
src/gallium/auxiliary/cso_cache/cso_context.c

index 746b1761850f94e51c818e1ac6a6d2ba8f1712df..4541be8a5ca05e657a058832220781392061eb97 100644 (file)
@@ -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;
 }