mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 14:08:05 +02:00
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 <imirkin@alum.mit.edu> Cc: "11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
39df725f73
commit
458e55d7c5
1 changed files with 7 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue