diff options
author | Zack Rusin <[email protected]> | 2013-05-24 16:28:19 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-05-25 09:49:20 -0400 |
commit | 97b8ae429ec64003e258764db12ea69d4e978f6d (patch) | |
tree | d7cfd03cb9d7f16044338c7d5d38814808de8b9b /src/gallium/drivers/llvmpipe/lp_state_clip.c | |
parent | 7756aae815a26c533948081c2c319c20bcf5962c (diff) |
llvmpipe: implement support for multiple viewports
Largely related to making sure the rasterizer can correctly
pick out the correct scissor box for the current viewport.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: José Fonseca<[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_clip.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_clip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_clip.c b/src/gallium/drivers/llvmpipe/lp_state_clip.c index a26c79f72f6..0e027fa9128 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_clip.c +++ b/src/gallium/drivers/llvmpipe/lp_state_clip.c @@ -55,7 +55,8 @@ llvmpipe_set_viewport_states(struct pipe_context *pipe, draw_set_viewport_states(llvmpipe->draw, start_slot, num_viewports, viewports); - llvmpipe->viewport = *viewports; /* struct copy */ + memcpy(llvmpipe->viewports + start_slot, viewports, + sizeof(struct pipe_viewport_state) * num_viewports); llvmpipe->dirty |= LP_NEW_VIEWPORT; } @@ -70,7 +71,8 @@ llvmpipe_set_scissor_states(struct pipe_context *pipe, draw_flush(llvmpipe->draw); - llvmpipe->scissor = *scissors; /* struct copy */ + memcpy(llvmpipe->scissors + start_slot, scissors, + sizeof(struct pipe_scissor_state) * num_scissors); llvmpipe->dirty |= LP_NEW_SCISSOR; } |