summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-09-08 16:58:43 -0400
committerEmil Velikov <[email protected]>2015-09-11 18:54:37 +0100
commitec9bafda7012c269927bb3ec12f4dafafc3ae635 (patch)
tree2ad924d9625adf369cbff3902784a9429bf472b4 /src
parent6654483bc661eef34ab933f812e94707191541df (diff)
st/mesa: increase viewport bounds limits for GL4 hw
According to the ARB_viewport_array spec, GL4 limit is higher than the GL3 limit. Also take this opportunity to fix the GL3 limit. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0" <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit 458e55d7c5793b02af8b08ebec90906a829d3f65)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_extensions.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 17f572f80fb..884761c6c30 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -873,8 +873,13 @@ void st_init_extensions(struct pipe_screen *screen,
consts->MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS);
if (consts->MaxViewports >= 16) {
- consts->ViewportBounds.Min = -16384.0;
- consts->ViewportBounds.Max = 16384.0;
+ if (glsl_feature_level >= 400) {
+ consts->ViewportBounds.Min = -32768.0;
+ consts->ViewportBounds.Max = 32767.0;
+ } else {
+ consts->ViewportBounds.Min = -16384.0;
+ consts->ViewportBounds.Max = 16383.0;
+ }
extensions->ARB_viewport_array = GL_TRUE;
extensions->ARB_fragment_layer_viewport = GL_TRUE;
if (extensions->AMD_vertex_shader_layer)