OSDN Git Service

mesa/main: fix version/extension checks in _mesa_ClampColor
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 12 Jan 2017 09:55:33 +0000 (10:55 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 13 Jan 2017 10:03:11 +0000 (11:03 +0100)
commit963311b71fd9900351a4a9dd1cd5f5db391f7e1b
treeb8c0c7d2e24cc1e5a07bed12ef665d5af520fa82
parente1ea70d9f3317e09104bb7c9f268ef6de9dfb358
mesa/main: fix version/extension checks in _mesa_ClampColor

Add a proper check for feature support, and raise an invalid enum for
GL_CLAMP_VERTEX/FRAGMENT_COLOR unconditionally in core profiles, since
those enums were explicitly removed after the extension was promoted
to core functionality (not in the profile sense) with OpenGL 3.0.

This matches the behavior of the AMD closed source driver and fixes
GL45-CTS.gtf30.GL3Tests.half_float.half_float_textures.

Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/main/blend.c