r600g: make a local copy of viewport state
authorMarek Olšák <maraeo@gmail.com>
Sat, 29 May 2010 13:27:42 +0000 (15:27 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 29 May 2010 13:41:22 +0000 (15:41 +0200)
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/r600/r600_context.h
src/gallium/drivers/r600/r600_state.c

index e92e92810592bcb716474416390d9c80651895f4..a257d83d3a6ac3e9214c55be6be837e2436476de 100644 (file)
@@ -50,7 +50,7 @@ static void r600_blitter_save_states(struct pipe_context *ctx)
        util_blitter_save_vertex_elements(rctx->blitter,
                                        rctx->vertex_elements);
        util_blitter_save_viewport(rctx->blitter,
-                                       rctx->viewport);
+                                       &rctx->viewport);
 }
 
 void r600_clear(struct pipe_context *ctx, unsigned buffers,
index b8ce8b88caef05f4a638f3e4bb742322584695b7..a5149038e22bf149f92bcd2d18eb32f9419a273c 100644 (file)
@@ -76,7 +76,7 @@ struct r600_context {
        struct pipe_stencil_ref         stencil_ref;
        struct pipe_framebuffer_state   fb_state;
        struct radeon_draw              *draw;
-       struct pipe_viewport_state *viewport;
+       struct pipe_viewport_state      viewport;
 };
 
 void r600_draw_arrays(struct pipe_context *ctx, unsigned mode,
index d57e88dd56eb1fc52ba0e8d625cfb9ac8e7809d7..ff574b828554f4dd48df5a9377b492ed69a3dbd1 100644 (file)
@@ -309,7 +309,7 @@ static void r600_set_viewport_state(struct pipe_context *ctx,
                return;
        }
        radeon_draw_set_new(rctx->draw, rstate);
-       rctx->viewport = state;
+       rctx->viewport = *state;
 }
 
 static void r600_set_vertex_buffers(struct pipe_context *ctx,