mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
mesa: don't clamp just based on ARB_viewport_array extension
The ARB_viewport_array spec says:
"Dependencies
OpenGL 1.0 is required.
OpenGL 3.2 or the EXT_geometry_shader4 or ARB_geometry_shader4 extensions
are required.
This extension is written against the OpenGL 3.2 (Compatibility)
Specification."
As such, we should ignore it for GLES2 contexts.
Fixes:
dEQP-GLES2.functional.state_query.integers.viewport_getinteger
dEQP-GLES2.functional.state_query.integers.viewport_getfloat
on llvmpipe and virgl.
v2: Use _mesa_has_* (Ilia)
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Cc: 17.3 18.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit c6694793e1)
This commit is contained in:
parent
58a0e9e1d6
commit
4a880db56c
1 changed files with 2 additions and 3 deletions
|
|
@ -51,9 +51,8 @@ clamp_viewport(struct gl_context *ctx, GLfloat *x, GLfloat *y,
|
|||
* determined by calling GetFloatv with the symbolic constant
|
||||
* VIEWPORT_BOUNDS_RANGE (see section 6.1)."
|
||||
*/
|
||||
if (ctx->Extensions.ARB_viewport_array ||
|
||||
(ctx->Extensions.OES_viewport_array &&
|
||||
_mesa_is_gles31(ctx))) {
|
||||
if (_mesa_has_ARB_viewport_array(ctx) ||
|
||||
_mesa_has_OES_viewport_array(ctx)) {
|
||||
*x = CLAMP(*x,
|
||||
ctx->Const.ViewportBounds.Min, ctx->Const.ViewportBounds.Max);
|
||||
*y = CLAMP(*y,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue