diff options
author | Courtney Goeltzenleuchter <[email protected]> | 2013-11-13 16:24:56 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-01-20 11:31:56 -0800 |
commit | cbb271a48845c2d236f31327df316d42888a1907 (patch) | |
tree | a860c48f113d8171d31d77bacf1c341627e4c099 /src/mesa/main/context.c | |
parent | 5b84226c31e941219422f6d60c31524081b7a188 (diff) |
mesa: Convert gl_context::Viewport to gl_context::ViewportArray
Only element 0 of the array is used anywhere at this time, so there
should be no changes.
v4: Split out from a single megapatch. Suggested by Ken.
Signed-off-by: Courtney Goeltzenleuchter <[email protected]>
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 538322e9eb8..5c67159e5a9 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -594,6 +594,9 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.ViewportBounds.Min = 0; ctx->Const.ViewportBounds.Max = 0; + /* Driver must override if it supports ARB_viewport_array */ + ctx->Const.MaxViewports = 1; + /** GL_ARB_uniform_buffer_object */ ctx->Const.MaxCombinedUniformBlocks = 36; ctx->Const.MaxUniformBufferBindings = 36; @@ -1354,13 +1357,14 @@ _mesa_copy_context( const struct gl_context *src, struct gl_context *dst, } if (mask & GL_VIEWPORT_BIT) { /* Cannot use memcpy, because of pointers in GLmatrix _WindowMap */ - dst->Viewport.X = src->Viewport.X; - dst->Viewport.Y = src->Viewport.Y; - dst->Viewport.Width = src->Viewport.Width; - dst->Viewport.Height = src->Viewport.Height; - dst->Viewport.Near = src->Viewport.Near; - dst->Viewport.Far = src->Viewport.Far; - _math_matrix_copy(&dst->Viewport._WindowMap, &src->Viewport._WindowMap); + dst->ViewportArray[0].X = src->ViewportArray[0].X; + dst->ViewportArray[0].Y = src->ViewportArray[0].Y; + dst->ViewportArray[0].Width = src->ViewportArray[0].Width; + dst->ViewportArray[0].Height = src->ViewportArray[0].Height; + dst->ViewportArray[0].Near = src->ViewportArray[0].Near; + dst->ViewportArray[0].Far = src->ViewportArray[0].Far; + _math_matrix_copy(&dst->ViewportArray[0]._WindowMap, + &src->ViewportArray[0]._WindowMap); } /* XXX FIXME: Call callbacks? |