summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_attrib_tmp.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-02-14 21:19:33 +0100
committerMarek Olšák <[email protected]>2018-02-23 20:50:22 +0100
commit1881f41b6c3fe6e68b76c561f33942657b135bc8 (patch)
tree6966e6ec4c3d710b37cbd7199faf13d0c79b2ee9 /src/mesa/vbo/vbo_attrib_tmp.h
parent1defc973db3266a0ae72097951d12f8d851fed9a (diff)
mesa: replace some API_OPENGL_CORE checks with _mesa_is_desktop_gl
This is more accurate with respect to the compatibility profile. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_attrib_tmp.h')
-rw-r--r--src/mesa/vbo/vbo_attrib_tmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index fd24e571c7e..796b3883633 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -150,7 +150,7 @@ static inline float conv_i10_to_norm_float(const struct gl_context *ctx, int i10
* is used in every case. They remove equation 2.2 completely.
*/
if (_mesa_is_gles3(ctx) ||
- (ctx->API == API_OPENGL_CORE && ctx->Version >= 42)) {
+ (_mesa_is_desktop_gl(ctx) && ctx->Version >= 42)) {
/* Equation 2.3 above. */
float f = ((float) val.x) / 511.0F;
return MAX2(f, -1.0f);
@@ -166,7 +166,7 @@ static inline float conv_i2_to_norm_float(const struct gl_context *ctx, int i2)
val.x = i2;
if (_mesa_is_gles3(ctx) ||
- (ctx->API == API_OPENGL_CORE && ctx->Version >= 42)) {
+ (_mesa_is_desktop_gl(ctx) && ctx->Version >= 42)) {
/* Equation 2.3 above. */
float f = (float) val.x;
return MAX2(f, -1.0f);