diff options
author | Dave Airlie <[email protected]> | 2014-01-21 15:26:29 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2014-02-11 14:14:50 +1000 |
commit | 0705fa35cdaf15ec969c28dc85e88b8be1149a3b (patch) | |
tree | 73b98d63456cd60823101bc864baf2dfd150609e /src/mesa/state_tracker/st_extensions.c | |
parent | c116ee604260faca75aaf2b0d8bbbd78b9c71154 (diff) |
st/mesa: add support for GL_ARB_viewport_array (v0.2)
this just ties the mesa code to the pre-existing gallium interface,
I'm not sure what to do with the CSO stuff yet.
0.2: fix min/max bounds
Acked-by: Ilia Mirkin <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index f9b7a445f1f..1f391c9f0dd 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -779,4 +779,13 @@ void st_init_extensions(struct st_context *st) if (!ctx->Extensions.EXT_transform_feedback) ctx->Const.DisableVaryingPacking = GL_TRUE; } + + if (ctx->API == API_OPENGL_CORE) { + ctx->Const.MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS); + if (ctx->Const.MaxViewports >= 16) { + ctx->Const.ViewportBounds.Min = -(float)ctx->Const.MaxViewportWidth; + ctx->Const.ViewportBounds.Max = ctx->Const.MaxViewportWidth; + ctx->Extensions.ARB_viewport_array = GL_TRUE; + } + } } |