From 1d6fe13c138efb836a28052b16260a258d113827 Mon Sep 17 00:00:00 2001 From: Kevin Strasser Date: Mon, 10 Oct 2016 14:29:58 -0700 Subject: mesa/extensions: expose OES_vertex_half_float for ES2 Half float support already exists for desktop GL. Reuse the ARB_half_float_vertex enable bit and account for the different enum to enable the extension for ES2. Signed-off-by: Kevin Strasser Reviewed-by: Kenneth Graunke --- src/mesa/state_tracker/st_atom_array.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c index 5ab10de83a2..221b2c7db3f 100644 --- a/src/mesa/state_tracker/st_atom_array.c +++ b/src/mesa/state_tracker/st_atom_array.c @@ -212,6 +212,7 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format, { assert((type >= GL_BYTE && type <= GL_DOUBLE) || type == GL_FIXED || type == GL_HALF_FLOAT || + type == GL_HALF_FLOAT_OES || type == GL_INT_2_10_10_10_REV || type == GL_UNSIGNED_INT_2_10_10_10_REV || type == GL_UNSIGNED_INT_10F_11F_11F_REV); @@ -281,7 +282,8 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format, switch (type) { case GL_DOUBLE: return double_types[size-1]; case GL_FLOAT: return float_types[size-1]; - case GL_HALF_FLOAT: return half_float_types[size-1]; + case GL_HALF_FLOAT: + case GL_HALF_FLOAT_OES: return half_float_types[size-1]; case GL_INT: return int_types_norm[size-1]; case GL_SHORT: return short_types_norm[size-1]; case GL_BYTE: return byte_types_norm[size-1]; @@ -296,7 +298,8 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format, switch (type) { case GL_DOUBLE: return double_types[size-1]; case GL_FLOAT: return float_types[size-1]; - case GL_HALF_FLOAT: return half_float_types[size-1]; + case GL_HALF_FLOAT: + case GL_HALF_FLOAT_OES: return half_float_types[size-1]; case GL_INT: return int_types_scale[size-1]; case GL_SHORT: return short_types_scale[size-1]; case GL_BYTE: return byte_types_scale[size-1]; -- cgit v1.2.3