summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2016-02-26 08:27:48 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2016-03-02 07:19:01 +0100
commite8fd60e7891c7a931cfa04259762df4adb304049 (patch)
tree57d69194bbac5cec3205f44fde65b3f7547d3348 /src/mesa/drivers/dri/i965
parentadd57b3fa8551cca7a1cb94573b4ef1d9a6a52c2 (diff)
i965: set ctx->Const.MaxViewport{Width,Height} to 32k
From ARB_viewport_array spec: " * On GL3-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least [-16384, 16383]. * On GL4-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least [-32768, 32767]." This range is set using ctx->Const.MaxViewportWidth value, so just bump those constants to 32k for gen7+ which can support OpenGL 4.0. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 31b6b2a3641..f5e4aced52c 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -682,6 +682,11 @@ brw_initialize_context_constants(struct brw_context *brw)
brw->intelScreen->compiler->glsl_compiler_options[i];
}
+ if (brw->gen >= 7) {
+ ctx->Const.MaxViewportWidth = 32768;
+ ctx->Const.MaxViewportHeight = 32768;
+ }
+
/* ARB_viewport_array */
if (brw->gen >= 6 && ctx->API == API_OPENGL_CORE) {
ctx->Const.MaxViewports = GEN6_NUM_VIEWPORTS;