diff options
author | Zack Rusin <[email protected]> | 2013-05-24 16:17:26 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-05-25 09:49:20 -0400 |
commit | 7756aae815a26c533948081c2c319c20bcf5962c (patch) | |
tree | 36ca7a4f867101633387215925ce3e0d123f7e94 /src/gallium/auxiliary/draw/draw_private.h | |
parent | eaabb4ead07ae043ecc789024028e225ebd0f318 (diff) |
draw: implement support for multiple viewports
This adds support for multiple viewports to the draw module.
Multiple viewports depend on the presence of geometry shaders
which can write the viewport index.
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/auxiliary/draw/draw_private.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_private.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 1b2d55fac55..e5f192b7576 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -241,7 +241,7 @@ struct draw_context /** Rasterizer CSOs without culling/stipple/etc */ void *rasterizer_no_cull[2][2]; - struct pipe_viewport_state viewport; + struct pipe_viewport_state viewports[PIPE_MAX_VIEWPORTS]; boolean identity_viewport; /** Vertex shader state */ @@ -372,9 +372,6 @@ void draw_new_instance(struct draw_context *draw); boolean draw_vs_init( struct draw_context *draw ); void draw_vs_destroy( struct draw_context *draw ); -void draw_vs_set_viewport( struct draw_context *, - const struct pipe_viewport_state * ); - /******************************************************************************* * Geometry shading code: @@ -389,11 +386,14 @@ void draw_gs_destroy( struct draw_context *draw ); */ uint draw_current_shader_outputs(const struct draw_context *draw); uint draw_current_shader_position_output(const struct draw_context *draw); +uint draw_current_shader_viewport_index_output(const struct draw_context *draw); uint draw_current_shader_clipvertex_output(const struct draw_context *draw); uint draw_current_shader_clipdistance_output(const struct draw_context *draw, int index); int draw_alloc_extra_vertex_attrib(struct draw_context *draw, uint semantic_name, uint semantic_index); void draw_remove_extra_vertex_attribs(struct draw_context *draw); +boolean draw_current_shader_uses_viewport_index( + const struct draw_context *draw); /******************************************************************************* |