From 00f730ca44699ca6aecea03f7ddc21e6a147471c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Mon, 16 Jun 2014 18:18:40 +0000 Subject: [PATCH] [OPENGL32/MESA] - Get rid of support for ARB_texture_float, ARB_half_float_vertex and ARB_half_float_pixel svn path=/trunk/; revision=63606 --- reactos/dll/opengl/mesa/main/extensions.c | 6 - reactos/dll/opengl/mesa/main/format_pack.c | 221 ------------------ reactos/dll/opengl/mesa/main/format_unpack.c | 169 -------------- reactos/dll/opengl/mesa/main/formats.c | 176 -------------- reactos/dll/opengl/mesa/main/formats.h | 18 -- reactos/dll/opengl/mesa/main/image.c | 21 -- reactos/dll/opengl/mesa/main/imports.c | 140 ----------- reactos/dll/opengl/mesa/main/imports.h | 6 - reactos/dll/opengl/mesa/main/mtypes.h | 3 - reactos/dll/opengl/mesa/main/pack.c | 167 ------------- reactos/dll/opengl/mesa/main/texformat.c | 75 ------ reactos/dll/opengl/mesa/main/texgetimage.c | 1 - reactos/dll/opengl/mesa/main/teximage.c | 25 -- reactos/dll/opengl/mesa/main/texparam.c | 32 +-- reactos/dll/opengl/mesa/main/texstore.c | 159 ------------- reactos/dll/opengl/mesa/main/varray.c | 5 - reactos/dll/opengl/mesa/main/version.c | 3 - reactos/dll/opengl/mesa/swrast/s_texfetch.c | 73 ------ .../dll/opengl/mesa/swrast/s_texfetch_tmp.h | 213 ----------------- reactos/dll/opengl/mesa/tnl/t_draw.c | 21 -- 20 files changed, 4 insertions(+), 1530 deletions(-) diff --git a/reactos/dll/opengl/mesa/main/extensions.c b/reactos/dll/opengl/mesa/main/extensions.c index a90e7f426b9..02c8dbf1c1b 100644 --- a/reactos/dll/opengl/mesa/main/extensions.c +++ b/reactos/dll/opengl/mesa/main/extensions.c @@ -61,8 +61,6 @@ struct extension { */ static const struct extension extension_table[] = { /* ARB Extensions */ - { "GL_ARB_half_float_pixel", o(ARB_half_float_pixel), 2003 }, - { "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), 2008 }, { "GL_ARB_map_buffer_range", o(ARB_map_buffer_range), 2008 }, { "GL_ARB_multisample", o(dummy_true), 1994 }, { "GL_ARB_point_parameters", o(EXT_point_parameters), 1997 }, @@ -72,7 +70,6 @@ static const struct extension extension_table[] = { { "GL_ARB_texture_env_combine", o(ARB_texture_env_combine), 2001 }, { "GL_ARB_texture_env_crossbar", o(ARB_texture_env_crossbar), 2001 }, { "GL_ARB_texture_env_dot3", o(ARB_texture_env_dot3), 2001 }, - { "GL_ARB_texture_float", o(ARB_texture_float), 2004 }, { "GL_ARB_texture_mirrored_repeat", o(dummy_true), 2001 }, { "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), 2003 }, { "GL_ARB_texture_storage", o(ARB_texture_storage), 2011 }, @@ -121,7 +118,6 @@ static const struct extension extension_table[] = { { "GL_APPLE_vertex_array_object", o(APPLE_vertex_array_object), 2002 }, { "GL_ATI_blend_equation_separate", o(EXT_blend_equation_separate), 2003 }, { "GL_ATI_texture_env_combine3", o(ATI_texture_env_combine3), 2002 }, - { "GL_ATI_texture_float", o(ARB_texture_float), 2002 }, { "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), 1998 }, { "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), 1996 }, { "GL_IBM_texture_mirrored_repeat", o(dummy_true), 1998 }, @@ -203,8 +199,6 @@ static const size_t default_extensions[] = { void _mesa_enable_sw_extensions(struct gl_context *ctx) { - ctx->Extensions.ARB_half_float_pixel = GL_TRUE; - ctx->Extensions.ARB_half_float_vertex = GL_TRUE; ctx->Extensions.ARB_map_buffer_range = GL_TRUE; ctx->Extensions.ARB_point_sprite = GL_TRUE; ctx->Extensions.ARB_texture_cube_map = GL_TRUE; diff --git a/reactos/dll/opengl/mesa/main/format_pack.c b/reactos/dll/opengl/mesa/main/format_pack.c index 31b247650a2..3842289068b 100644 --- a/reactos/dll/opengl/mesa/main/format_pack.c +++ b/reactos/dll/opengl/mesa/main/format_pack.c @@ -810,200 +810,6 @@ pack_float_YCBCR_REV(const GLfloat src[4], void *dst) } -/* MESA_FORMAT_RGBA_FLOAT32 */ - -static void -pack_ubyte_RGBA_FLOAT32(const GLubyte src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = UBYTE_TO_FLOAT(src[0]); - d[1] = UBYTE_TO_FLOAT(src[1]); - d[2] = UBYTE_TO_FLOAT(src[2]); - d[3] = UBYTE_TO_FLOAT(src[3]); -} - -static void -pack_float_RGBA_FLOAT32(const GLfloat src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = src[0]; - d[1] = src[1]; - d[2] = src[2]; - d[3] = src[3]; -} - - -/* MESA_FORMAT_RGBA_FLOAT16 */ - -static void -pack_ubyte_RGBA_FLOAT16(const GLubyte src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[0])); - d[1] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[1])); - d[2] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[2])); - d[3] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[3])); -} - -static void -pack_float_RGBA_FLOAT16(const GLfloat src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(src[0]); - d[1] = _mesa_float_to_half(src[1]); - d[2] = _mesa_float_to_half(src[2]); - d[3] = _mesa_float_to_half(src[3]); -} - - -/* MESA_FORMAT_RGB_FLOAT32 */ - -static void -pack_ubyte_RGB_FLOAT32(const GLubyte src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = UBYTE_TO_FLOAT(src[0]); - d[1] = UBYTE_TO_FLOAT(src[1]); - d[2] = UBYTE_TO_FLOAT(src[2]); -} - -static void -pack_float_RGB_FLOAT32(const GLfloat src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = src[0]; - d[1] = src[1]; - d[2] = src[2]; -} - - -/* MESA_FORMAT_RGB_FLOAT16 */ - -static void -pack_ubyte_RGB_FLOAT16(const GLubyte src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[0])); - d[1] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[1])); - d[2] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[2])); -} - -static void -pack_float_RGB_FLOAT16(const GLfloat src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(src[0]); - d[1] = _mesa_float_to_half(src[1]); - d[2] = _mesa_float_to_half(src[2]); -} - - -/* MESA_FORMAT_ALPHA_FLOAT32 */ - -static void -pack_ubyte_ALPHA_FLOAT32(const GLubyte src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = UBYTE_TO_FLOAT(src[ACOMP]); -} - -static void -pack_float_ALPHA_FLOAT32(const GLfloat src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = src[ACOMP]; -} - - -/* MESA_FORMAT_ALPHA_FLOAT16 */ - -static void -pack_ubyte_ALPHA_FLOAT16(const GLubyte src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[ACOMP])); -} - -static void -pack_float_ALPHA_FLOAT16(const GLfloat src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(src[ACOMP]); -} - - -/* MESA_FORMAT_LUMINANCE_FLOAT32 (and INTENSITY_FLOAT32, R_FLOAT32) */ - -static void -pack_ubyte_LUMINANCE_FLOAT32(const GLubyte src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = UBYTE_TO_FLOAT(src[RCOMP]); -} - -static void -pack_float_LUMINANCE_FLOAT32(const GLfloat src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = src[RCOMP]; -} - - -/* MESA_FORMAT_LUMINANCE_FLOAT16 (and INTENSITY_FLOAT16, R_FLOAT32) */ - -static void -pack_ubyte_LUMINANCE_FLOAT16(const GLubyte src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[RCOMP])); -} - -static void -pack_float_LUMINANCE_FLOAT16(const GLfloat src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(src[RCOMP]); -} - - -/* MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 */ - -static void -pack_ubyte_LUMINANCE_ALPHA_FLOAT32(const GLubyte src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = UBYTE_TO_FLOAT(src[RCOMP]); - d[1] = UBYTE_TO_FLOAT(src[ACOMP]); -} - -static void -pack_float_LUMINANCE_ALPHA_FLOAT32(const GLfloat src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = src[RCOMP]; - d[1] = src[ACOMP]; -} - - -/* MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 */ - -static void -pack_ubyte_LUMINANCE_ALPHA_FLOAT16(const GLubyte src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[RCOMP])); - d[1] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[ACOMP])); -} - -static void -pack_float_LUMINANCE_ALPHA_FLOAT16(const GLfloat src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(src[RCOMP]); - d[1] = _mesa_float_to_half(src[ACOMP]); -} - - /* MESA_FORMAT_RGBA_16 */ static void @@ -1095,19 +901,6 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format) table[MESA_FORMAT_Z32] = NULL; table[MESA_FORMAT_S8] = NULL; - table[MESA_FORMAT_RGBA_FLOAT32] = pack_ubyte_RGBA_FLOAT32; - table[MESA_FORMAT_RGBA_FLOAT16] = pack_ubyte_RGBA_FLOAT16; - table[MESA_FORMAT_RGB_FLOAT32] = pack_ubyte_RGB_FLOAT32; - table[MESA_FORMAT_RGB_FLOAT16] = pack_ubyte_RGB_FLOAT16; - table[MESA_FORMAT_ALPHA_FLOAT32] = pack_ubyte_ALPHA_FLOAT32; - table[MESA_FORMAT_ALPHA_FLOAT16] = pack_ubyte_ALPHA_FLOAT16; - table[MESA_FORMAT_LUMINANCE_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32; - table[MESA_FORMAT_LUMINANCE_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = pack_ubyte_LUMINANCE_ALPHA_FLOAT32; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = pack_ubyte_LUMINANCE_ALPHA_FLOAT16; - table[MESA_FORMAT_INTENSITY_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32; - table[MESA_FORMAT_INTENSITY_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16; - /* n/a */ table[MESA_FORMAT_RGBA_INT8] = NULL; /* pack_ubyte_RGBA_INT8 */ table[MESA_FORMAT_RGBA_INT16] = NULL; /* pack_ubyte_RGBA_INT16 */ @@ -1185,20 +978,6 @@ _mesa_get_pack_float_rgba_function(gl_format format) table[MESA_FORMAT_Z32] = NULL; table[MESA_FORMAT_S8] = NULL; - table[MESA_FORMAT_RGBA_FLOAT32] = pack_float_RGBA_FLOAT32; - table[MESA_FORMAT_RGBA_FLOAT16] = pack_float_RGBA_FLOAT16; - table[MESA_FORMAT_RGB_FLOAT32] = pack_float_RGB_FLOAT32; - table[MESA_FORMAT_RGB_FLOAT16] = pack_float_RGB_FLOAT16; - table[MESA_FORMAT_ALPHA_FLOAT32] = pack_float_ALPHA_FLOAT32; - table[MESA_FORMAT_ALPHA_FLOAT16] = pack_float_ALPHA_FLOAT16; - table[MESA_FORMAT_LUMINANCE_FLOAT32] = pack_float_LUMINANCE_FLOAT32; - table[MESA_FORMAT_LUMINANCE_FLOAT16] = pack_float_LUMINANCE_FLOAT16; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = pack_float_LUMINANCE_ALPHA_FLOAT32; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = pack_float_LUMINANCE_ALPHA_FLOAT16; - - table[MESA_FORMAT_INTENSITY_FLOAT32] = pack_float_LUMINANCE_FLOAT32; - table[MESA_FORMAT_INTENSITY_FLOAT16] = pack_float_LUMINANCE_FLOAT16; - /* n/a */ table[MESA_FORMAT_RGBA_INT8] = NULL; table[MESA_FORMAT_RGBA_INT16] = NULL; diff --git a/reactos/dll/opengl/mesa/main/format_unpack.c b/reactos/dll/opengl/mesa/main/format_unpack.c index 057ceab4533..bca514d9c10 100644 --- a/reactos/dll/opengl/mesa/main/format_unpack.c +++ b/reactos/dll/opengl/mesa/main/format_unpack.c @@ -590,162 +590,6 @@ unpack_S8(const void *src, GLfloat dst[][4], GLuint n) } } -static void -unpack_RGBA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = s[i*4+0]; - dst[i][GCOMP] = s[i*4+1]; - dst[i][BCOMP] = s[i*4+2]; - dst[i][ACOMP] = s[i*4+3]; - } -} - -static void -unpack_RGBA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = _mesa_half_to_float(s[i*4+0]); - dst[i][GCOMP] = _mesa_half_to_float(s[i*4+1]); - dst[i][BCOMP] = _mesa_half_to_float(s[i*4+2]); - dst[i][ACOMP] = _mesa_half_to_float(s[i*4+3]); - } -} - -static void -unpack_RGB_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = s[i*3+0]; - dst[i][GCOMP] = s[i*3+1]; - dst[i][BCOMP] = s[i*3+2]; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_RGB_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = _mesa_half_to_float(s[i*3+0]); - dst[i][GCOMP] = _mesa_half_to_float(s[i*3+1]); - dst[i][BCOMP] = _mesa_half_to_float(s[i*3+2]); - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = s[i]; - } -} - -static void -unpack_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = _mesa_half_to_float(s[i]); - } -} - -static void -unpack_LUMINANCE_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = s[i]; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_LUMINANCE_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = _mesa_half_to_float(s[i]); - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_LUMINANCE_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = s[i*2+0]; - dst[i][ACOMP] = s[i*2+1]; - } -} - -static void -unpack_LUMINANCE_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = _mesa_half_to_float(s[i*2+0]); - dst[i][ACOMP] = _mesa_half_to_float(s[i*2+1]); - } -} - -static void -unpack_INTENSITY_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = - dst[i][ACOMP] = s[i]; - } -} - -static void -unpack_INTENSITY_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = - dst[i][ACOMP] = _mesa_half_to_float(s[i]); - } -} - static void unpack_RGBA_INT8(const void *src, GLfloat dst[][4], GLuint n) { @@ -900,19 +744,6 @@ get_unpack_rgba_function(gl_format format) table[MESA_FORMAT_Z32] = unpack_Z32; table[MESA_FORMAT_S8] = unpack_S8; - table[MESA_FORMAT_RGBA_FLOAT32] = unpack_RGBA_FLOAT32; - table[MESA_FORMAT_RGBA_FLOAT16] = unpack_RGBA_FLOAT16; - table[MESA_FORMAT_RGB_FLOAT32] = unpack_RGB_FLOAT32; - table[MESA_FORMAT_RGB_FLOAT16] = unpack_RGB_FLOAT16; - table[MESA_FORMAT_ALPHA_FLOAT32] = unpack_ALPHA_FLOAT32; - table[MESA_FORMAT_ALPHA_FLOAT16] = unpack_ALPHA_FLOAT16; - table[MESA_FORMAT_LUMINANCE_FLOAT32] = unpack_LUMINANCE_FLOAT32; - table[MESA_FORMAT_LUMINANCE_FLOAT16] = unpack_LUMINANCE_FLOAT16; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = unpack_LUMINANCE_ALPHA_FLOAT32; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = unpack_LUMINANCE_ALPHA_FLOAT16; - table[MESA_FORMAT_INTENSITY_FLOAT32] = unpack_INTENSITY_FLOAT32; - table[MESA_FORMAT_INTENSITY_FLOAT16] = unpack_INTENSITY_FLOAT16; - table[MESA_FORMAT_RGBA_INT8] = unpack_RGBA_INT8; table[MESA_FORMAT_RGBA_INT16] = unpack_RGBA_INT16; table[MESA_FORMAT_RGBA_INT32] = unpack_RGBA_INT32; diff --git a/reactos/dll/opengl/mesa/main/formats.c b/reactos/dll/opengl/mesa/main/formats.c index e1e636f4389..1d46fa3e18d 100644 --- a/reactos/dll/opengl/mesa/main/formats.c +++ b/reactos/dll/opengl/mesa/main/formats.c @@ -406,116 +406,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 8, /* Lum/Int/Index/Depth/StencilBits */ 1, 1, 1 /* BlockWidth/Height,Bytes */ }, - { - MESA_FORMAT_RGBA_FLOAT32, - "MESA_FORMAT_RGBA_FLOAT32", - GL_RGBA, - GL_FLOAT, - 32, 32, 32, 32, - 0, 0, 0, 0, 0, - 1, 1, 16 - }, - { - MESA_FORMAT_RGBA_FLOAT16, - "MESA_FORMAT_RGBA_FLOAT16", - GL_RGBA, - GL_FLOAT, - 16, 16, 16, 16, - 0, 0, 0, 0, 0, - 1, 1, 8 - }, - { - MESA_FORMAT_RGB_FLOAT32, - "MESA_FORMAT_RGB_FLOAT32", - GL_RGB, - GL_FLOAT, - 32, 32, 32, 0, - 0, 0, 0, 0, 0, - 1, 1, 12 - }, - { - MESA_FORMAT_RGB_FLOAT16, - "MESA_FORMAT_RGB_FLOAT16", - GL_RGB, - GL_FLOAT, - 16, 16, 16, 0, - 0, 0, 0, 0, 0, - 1, 1, 6 - }, - { - MESA_FORMAT_ALPHA_FLOAT32, - "MESA_FORMAT_ALPHA_FLOAT32", - GL_ALPHA, - GL_FLOAT, - 0, 0, 0, 32, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_ALPHA_FLOAT16, - "MESA_FORMAT_ALPHA_FLOAT16", - GL_ALPHA, - GL_FLOAT, - 0, 0, 0, 16, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_LUMINANCE_FLOAT32, - "MESA_FORMAT_LUMINANCE_FLOAT32", - GL_LUMINANCE, - GL_FLOAT, - 0, 0, 0, 0, - 32, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_LUMINANCE_FLOAT16, - "MESA_FORMAT_LUMINANCE_FLOAT16", - GL_LUMINANCE, - GL_FLOAT, - 0, 0, 0, 0, - 16, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, - "MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32", - GL_LUMINANCE_ALPHA, - GL_FLOAT, - 0, 0, 0, 32, - 32, 0, 0, 0, 0, - 1, 1, 8 - }, - { - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, - "MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16", - GL_LUMINANCE_ALPHA, - GL_FLOAT, - 0, 0, 0, 16, - 16, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_INTENSITY_FLOAT32, - "MESA_FORMAT_INTENSITY_FLOAT32", - GL_INTENSITY, - GL_FLOAT, - 0, 0, 0, 0, - 0, 32, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_INTENSITY_FLOAT16, - "MESA_FORMAT_INTENSITY_FLOAT16", - GL_INTENSITY, - GL_FLOAT, - 0, 0, 0, 0, - 0, 16, 0, 0, 0, - 1, 1, 2 - }, - /* unnormalized signed int formats */ /* unnormalized unsigned int formats */ { MESA_FORMAT_ALPHA_UINT8, @@ -1355,43 +1246,6 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 4; return; - case MESA_FORMAT_RGBA_FLOAT32: - *datatype = GL_FLOAT; - *comps = 4; - return; - case MESA_FORMAT_RGBA_FLOAT16: - *datatype = GL_HALF_FLOAT_ARB; - *comps = 4; - return; - case MESA_FORMAT_RGB_FLOAT32: - *datatype = GL_FLOAT; - *comps = 3; - return; - case MESA_FORMAT_RGB_FLOAT16: - *datatype = GL_HALF_FLOAT_ARB; - *comps = 3; - return; - case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32: - *datatype = GL_FLOAT; - *comps = 2; - return; - case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16: - *datatype = GL_HALF_FLOAT_ARB; - *comps = 2; - return; - case MESA_FORMAT_ALPHA_FLOAT32: - case MESA_FORMAT_LUMINANCE_FLOAT32: - case MESA_FORMAT_INTENSITY_FLOAT32: - *datatype = GL_FLOAT; - *comps = 1; - return; - case MESA_FORMAT_ALPHA_FLOAT16: - case MESA_FORMAT_LUMINANCE_FLOAT16: - case MESA_FORMAT_INTENSITY_FLOAT16: - *datatype = GL_HALF_FLOAT_ARB; - *comps = 1; - return; - case MESA_FORMAT_ALPHA_UINT8: case MESA_FORMAT_LUMINANCE_UINT8: case MESA_FORMAT_INTENSITY_UINT8: @@ -1654,36 +1508,6 @@ _mesa_format_matches_format_and_type(gl_format gl_format, case MESA_FORMAT_S8: return GL_FALSE; - case MESA_FORMAT_RGBA_FLOAT32: - return format == GL_RGBA && type == GL_FLOAT; - case MESA_FORMAT_RGBA_FLOAT16: - return format == GL_RGBA && type == GL_HALF_FLOAT; - - case MESA_FORMAT_RGB_FLOAT32: - return format == GL_RGB && type == GL_FLOAT; - case MESA_FORMAT_RGB_FLOAT16: - return format == GL_RGB && type == GL_HALF_FLOAT; - - case MESA_FORMAT_ALPHA_FLOAT32: - return format == GL_ALPHA && type == GL_FLOAT; - case MESA_FORMAT_ALPHA_FLOAT16: - return format == GL_ALPHA && type == GL_HALF_FLOAT; - - case MESA_FORMAT_LUMINANCE_FLOAT32: - return format == GL_LUMINANCE && type == GL_FLOAT; - case MESA_FORMAT_LUMINANCE_FLOAT16: - return format == GL_LUMINANCE && type == GL_HALF_FLOAT; - - case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32: - return format == GL_LUMINANCE_ALPHA && type == GL_FLOAT; - case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16: - return format == GL_LUMINANCE_ALPHA && type == GL_HALF_FLOAT; - - case MESA_FORMAT_INTENSITY_FLOAT32: - return format == GL_INTENSITY && type == GL_FLOAT; - case MESA_FORMAT_INTENSITY_FLOAT16: - return format == GL_INTENSITY && type == GL_HALF_FLOAT; - /* FINISHME: What do we want to do for GL_EXT_texture_integer? */ case MESA_FORMAT_ALPHA_UINT8: case MESA_FORMAT_ALPHA_UINT16: diff --git a/reactos/dll/opengl/mesa/main/formats.h b/reactos/dll/opengl/mesa/main/formats.h index 2ff4af1fa59..5a93a5c5a8e 100644 --- a/reactos/dll/opengl/mesa/main/formats.h +++ b/reactos/dll/opengl/mesa/main/formats.h @@ -105,24 +105,6 @@ typedef enum MESA_FORMAT_S8, /* SSSS SSSS */ /*@}*/ - /** - * \name Floating point texture formats. - */ - /*@{*/ - MESA_FORMAT_RGBA_FLOAT32, - MESA_FORMAT_RGBA_FLOAT16, - MESA_FORMAT_RGB_FLOAT32, - MESA_FORMAT_RGB_FLOAT16, - MESA_FORMAT_ALPHA_FLOAT32, - MESA_FORMAT_ALPHA_FLOAT16, - MESA_FORMAT_LUMINANCE_FLOAT32, - MESA_FORMAT_LUMINANCE_FLOAT16, - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, - MESA_FORMAT_INTENSITY_FLOAT32, - MESA_FORMAT_INTENSITY_FLOAT16, - /*@}*/ - /** * \name Non-normalized signed integer formats. * XXX Note: these are just stand-ins for some better hardware diff --git a/reactos/dll/opengl/mesa/main/image.c b/reactos/dll/opengl/mesa/main/image.c index 676ebf7ff8c..820323b4dd3 100644 --- a/reactos/dll/opengl/mesa/main/image.c +++ b/reactos/dll/opengl/mesa/main/image.c @@ -125,8 +125,6 @@ _mesa_sizeof_type( GLenum type ) return sizeof(GLfloat); case GL_DOUBLE: return sizeof(GLdouble); - case GL_HALF_FLOAT_ARB: - return sizeof(GLhalfARB); case GL_FIXED: return sizeof(GLfixed); default: @@ -157,8 +155,6 @@ _mesa_sizeof_packed_type( GLenum type ) return sizeof(GLuint); case GL_INT: return sizeof(GLint); - case GL_HALF_FLOAT_ARB: - return sizeof(GLhalfARB); case GL_FLOAT: return sizeof(GLfloat); case GL_UNSIGNED_BYTE_3_3_2: @@ -267,8 +263,6 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) return comps * sizeof(GLint); case GL_FLOAT: return comps * sizeof(GLfloat); - case GL_HALF_FLOAT_ARB: - return comps * sizeof(GLhalfARB); case GL_UNSIGNED_BYTE_3_3_2: case GL_UNSIGNED_BYTE_2_3_3_REV: if (format == GL_RGB || format == GL_BGR || @@ -384,9 +378,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_INT: case GL_FLOAT: return GL_NO_ERROR; - case GL_HALF_FLOAT: - return ctx->Extensions.ARB_half_float_pixel - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } @@ -410,9 +401,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_INT: case GL_FLOAT: return GL_NO_ERROR; - case GL_HALF_FLOAT: - return ctx->Extensions.ARB_half_float_pixel - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } @@ -431,9 +419,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_SHORT_5_6_5: case GL_UNSIGNED_SHORT_5_6_5_REV: return GL_NO_ERROR; - case GL_HALF_FLOAT: - return ctx->Extensions.ARB_half_float_pixel - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } @@ -451,9 +436,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_INT: case GL_FLOAT: return GL_NO_ERROR; - case GL_HALF_FLOAT: - return ctx->Extensions.ARB_half_float_pixel - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } @@ -476,9 +458,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_INT_8_8_8_8: case GL_UNSIGNED_INT_8_8_8_8_REV: return GL_NO_ERROR; - case GL_HALF_FLOAT: - return ctx->Extensions.ARB_half_float_pixel - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } diff --git a/reactos/dll/opengl/mesa/main/imports.c b/reactos/dll/opengl/mesa/main/imports.c index 9652e39d07d..e9d9209f2a1 100644 --- a/reactos/dll/opengl/mesa/main/imports.c +++ b/reactos/dll/opengl/mesa/main/imports.c @@ -537,146 +537,6 @@ _mesa_bitcount_64(uint64_t n) } #endif - -/** - * Convert a 4-byte float to a 2-byte half float. - * Based on code from: - * http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/008786.html - */ -GLhalfARB -_mesa_float_to_half(float val) -{ - const fi_type fi = {val}; - const int flt_m = fi.i & 0x7fffff; - const int flt_e = (fi.i >> 23) & 0xff; - const int flt_s = (fi.i >> 31) & 0x1; - int s, e, m = 0; - GLhalfARB result; - - /* sign bit */ - s = flt_s; - - /* handle special cases */ - if ((flt_e == 0) && (flt_m == 0)) { - /* zero */ - /* m = 0; - already set */ - e = 0; - } - else if ((flt_e == 0) && (flt_m != 0)) { - /* denorm -- denorm float maps to 0 half */ - /* m = 0; - already set */ - e = 0; - } - else if ((flt_e == 0xff) && (flt_m == 0)) { - /* infinity */ - /* m = 0; - already set */ - e = 31; - } - else if ((flt_e == 0xff) && (flt_m != 0)) { - /* NaN */ - m = 1; - e = 31; - } - else { - /* regular number */ - const int new_exp = flt_e - 127; - if (new_exp < -24) { - /* this maps to 0 */ - /* m = 0; - already set */ - e = 0; - } - else if (new_exp < -14) { - /* this maps to a denorm */ - unsigned int exp_val = (unsigned int) (-14 - new_exp); /* 2^-exp_val*/ - e = 0; - switch (exp_val) { - case 0: - _mesa_warning(NULL, - "float_to_half: logical error in denorm creation!\n"); - /* m = 0; - already set */ - break; - case 1: m = 512 + (flt_m >> 14); break; - case 2: m = 256 + (flt_m >> 15); break; - case 3: m = 128 + (flt_m >> 16); break; - case 4: m = 64 + (flt_m >> 17); break; - case 5: m = 32 + (flt_m >> 18); break; - case 6: m = 16 + (flt_m >> 19); break; - case 7: m = 8 + (flt_m >> 20); break; - case 8: m = 4 + (flt_m >> 21); break; - case 9: m = 2 + (flt_m >> 22); break; - case 10: m = 1; break; - } - } - else if (new_exp > 15) { - /* map this value to infinity */ - /* m = 0; - already set */ - e = 31; - } - else { - /* regular */ - e = new_exp + 15; - m = flt_m >> 13; - } - } - - result = (s << 15) | (e << 10) | m; - return result; -} - - -/** - * Convert a 2-byte half float to a 4-byte float. - * Based on code from: - * http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/008786.html - */ -float -_mesa_half_to_float(GLhalfARB val) -{ - /* XXX could also use a 64K-entry lookup table */ - const int m = val & 0x3ff; - const int e = (val >> 10) & 0x1f; - const int s = (val >> 15) & 0x1; - int flt_m, flt_e, flt_s; - fi_type fi; - float result; - - /* sign bit */ - flt_s = s; - - /* handle special cases */ - if ((e == 0) && (m == 0)) { - /* zero */ - flt_m = 0; - flt_e = 0; - } - else if ((e == 0) && (m != 0)) { - /* denorm -- denorm half will fit in non-denorm single */ - const float half_denorm = 1.0f / 16384.0f; /* 2^-14 */ - float mantissa = ((float) (m)) / 1024.0f; - float sign = s ? -1.0f : 1.0f; - return sign * mantissa * half_denorm; - } - else if ((e == 31) && (m == 0)) { - /* infinity */ - flt_e = 0xff; - flt_m = 0; - } - else if ((e == 31) && (m != 0)) { - /* NaN */ - flt_e = 0xff; - flt_m = 1; - } - else { - /* regular */ - flt_e = e + 112; - flt_m = m << 13; - } - - fi.i = (flt_s << 31) | (flt_e << 23) | flt_m; - result = fi.f; - return result; -} - /*@}*/ diff --git a/reactos/dll/opengl/mesa/main/imports.h b/reactos/dll/opengl/mesa/main/imports.h index b7e87439f4c..d2ba34db888 100644 --- a/reactos/dll/opengl/mesa/main/imports.h +++ b/reactos/dll/opengl/mesa/main/imports.h @@ -597,12 +597,6 @@ extern unsigned int _mesa_bitcount(unsigned int n); #endif -extern GLhalfARB -_mesa_float_to_half(float f); - -extern float -_mesa_half_to_float(GLhalfARB h); - extern void * _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, diff --git a/reactos/dll/opengl/mesa/main/mtypes.h b/reactos/dll/opengl/mesa/main/mtypes.h index 7cc01fef843..2dc4ce80524 100644 --- a/reactos/dll/opengl/mesa/main/mtypes.h +++ b/reactos/dll/opengl/mesa/main/mtypes.h @@ -1577,15 +1577,12 @@ struct gl_extensions GLboolean dummy; /* don't remove this! */ GLboolean dummy_true; /* Set true by _mesa_init_extensions(). */ GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */ - GLboolean ARB_half_float_pixel; - GLboolean ARB_half_float_vertex; GLboolean ARB_map_buffer_range; GLboolean ARB_point_sprite; GLboolean ARB_texture_cube_map; GLboolean ARB_texture_env_combine; GLboolean ARB_texture_env_crossbar; GLboolean ARB_texture_env_dot3; - GLboolean ARB_texture_float; GLboolean ARB_texture_non_power_of_two; GLboolean ARB_texture_storage; GLboolean ARB_transpose_matrix; diff --git a/reactos/dll/opengl/mesa/main/pack.c b/reactos/dll/opengl/mesa/main/pack.c index 5a8f3a4c942..6217e2f3d8c 100644 --- a/reactos/dll/opengl/mesa/main/pack.c +++ b/reactos/dll/opengl/mesa/main/pack.c @@ -1568,85 +1568,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4], } } break; - case GL_HALF_FLOAT_ARB: - { - GLhalfARB *dst = (GLhalfARB *) dstAddr; - switch (dstFormat) { - case GL_RED: - for (i=0;iSwapBytes) { - for (i = 0; i < n; i++) { - GLhalfARB value = s[i]; - SWAP2BYTE(value); - indexes[i] = (GLuint) _mesa_half_to_float(value); - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = (GLuint) _mesa_half_to_float(s[i]); - } - } - break; default: _mesa_problem(NULL, "bad srcType in extract_uint_indexes"); @@ -2378,12 +2282,6 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], PROCESS(bSrc, BCOMP, 0.0F, 0.0F, GLfloat, (GLfloat)); PROCESS(aSrc, ACOMP, 1.0F, 1.0F, GLfloat, (GLfloat)); break; - case GL_HALF_FLOAT_ARB: - PROCESS(rSrc, RCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float); - PROCESS(gSrc, GCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float); - PROCESS(bSrc, BCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float); - PROCESS(aSrc, ACOMP, 1.0F, 1.0F, GLhalfARB, _mesa_half_to_float); - break; case GL_UNSIGNED_BYTE_3_3_2: { const GLubyte *ubsrc = (const GLubyte *) src; @@ -2698,15 +2596,6 @@ clamp_float_to_uint(GLfloat f) return f < 0.0F ? 0 : IROUND(f); } - -static inline GLuint -clamp_half_to_uint(GLhalfARB h) -{ - GLfloat f = _mesa_half_to_float(h); - return f < 0.0F ? 0 : IROUND(f); -} - - /** * \sa extract_float_rgba() */ @@ -2845,12 +2734,6 @@ extract_uint_rgba(GLuint n, GLuint rgba[][4], PROCESS(bSrc, BCOMP, 0, GLfloat, clamp_float_to_uint); PROCESS(aSrc, ACOMP, 1, GLfloat, clamp_float_to_uint); break; - case GL_HALF_FLOAT_ARB: - PROCESS(rSrc, RCOMP, 0, GLhalfARB, clamp_half_to_uint); - PROCESS(gSrc, GCOMP, 0, GLhalfARB, clamp_half_to_uint); - PROCESS(bSrc, BCOMP, 0, GLhalfARB, clamp_half_to_uint); - PROCESS(aSrc, ACOMP, 1, GLhalfARB, clamp_half_to_uint); - break; case GL_UNSIGNED_BYTE_3_3_2: { const GLubyte *ubsrc = (const GLubyte *) src; @@ -3891,18 +3774,6 @@ _mesa_pack_index_span( struct gl_context *ctx, GLuint n, } } break; - case GL_HALF_FLOAT_ARB: - { - GLhalfARB *dst = (GLhalfARB *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = _mesa_float_to_half((GLfloat) source[i]); - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; default: _mesa_problem(ctx, "bad type in _mesa_pack_index_span"); } @@ -4118,18 +3989,6 @@ _mesa_pack_stencil_span( struct gl_context *ctx, GLuint n, } } break; - case GL_HALF_FLOAT_ARB: - { - GLhalfARB *dst = (GLhalfARB *) dest; - GLuint i; - for (i=0;iSwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; case GL_BITMAP: if (dstPacking->LsbFirst) { GLubyte *dst = (GLubyte *) dest; @@ -4279,20 +4138,6 @@ _mesa_unpack_depth_span( struct gl_context *ctx, GLuint n, DEPTH_VALUES(GLfloat, 1*); needClamp = GL_TRUE; break; - case GL_HALF_FLOAT_ARB: - { - GLuint i; - const GLhalfARB *src = (const GLhalfARB *) source; - for (i = 0; i < n; i++) { - GLhalfARB value = src[i]; - if (srcPacking->SwapBytes) { - SWAP2BYTE(value); - } - depthValues[i] = _mesa_half_to_float(value); - } - needClamp = GL_TRUE; - } - break; default: _mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()"); free(depthTemp); @@ -4461,18 +4306,6 @@ _mesa_pack_depth_span( struct gl_context *ctx, GLuint n, GLvoid *dest, } } break; - case GL_HALF_FLOAT_ARB: - { - GLhalfARB *dst = (GLhalfARB *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = _mesa_float_to_half(depthSpan[i]); - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; default: _mesa_problem(ctx, "bad type in _mesa_pack_depth_span"); } diff --git a/reactos/dll/opengl/mesa/main/texformat.c b/reactos/dll/opengl/mesa/main/texformat.c index 971ec030fd3..052dfc1691f 100644 --- a/reactos/dll/opengl/mesa/main/texformat.c +++ b/reactos/dll/opengl/mesa/main/texformat.c @@ -206,81 +206,6 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, } } - if (ctx->Extensions.ARB_texture_float) { - switch (internalFormat) { - case GL_ALPHA16F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - break; - case GL_ALPHA32F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - break; - case GL_LUMINANCE16F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - break; - case GL_LUMINANCE32F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - break; - case GL_LUMINANCE_ALPHA16F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - break; - case GL_LUMINANCE_ALPHA32F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - break; - case GL_INTENSITY16F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - break; - case GL_INTENSITY32F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - break; - case GL_RGB16F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - break; - case GL_RGB32F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - break; - case GL_RGBA16F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - break; - case GL_RGBA32F_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); - break; - default: - ; /* fallthrough */ - } - } - if (ctx->Extensions.EXT_texture_integer) { switch (internalFormat) { case GL_ALPHA8UI_EXT: diff --git a/reactos/dll/opengl/mesa/main/texgetimage.c b/reactos/dll/opengl/mesa/main/texgetimage.c index 450b7984c1e..29590ce5348 100644 --- a/reactos/dll/opengl/mesa/main/texgetimage.c +++ b/reactos/dll/opengl/mesa/main/texgetimage.c @@ -40,7 +40,6 @@ type_needs_clamping(GLenum type) case GL_SHORT: case GL_INT: case GL_FLOAT: - case GL_HALF_FLOAT_ARB: case GL_UNSIGNED_INT_10F_11F_11F_REV: case GL_UNSIGNED_INT_5_9_9_9_REV: return GL_FALSE; diff --git a/reactos/dll/opengl/mesa/main/teximage.c b/reactos/dll/opengl/mesa/main/teximage.c index ccf9d8111bb..cd7b1c96ab1 100644 --- a/reactos/dll/opengl/mesa/main/teximage.c +++ b/reactos/dll/opengl/mesa/main/teximage.c @@ -115,31 +115,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) return GL_YCBCR_MESA; } - if (ctx->Extensions.ARB_texture_float) { - switch (internalFormat) { - case GL_ALPHA16F_ARB: - case GL_ALPHA32F_ARB: - return GL_ALPHA; - case GL_RGBA16F_ARB: - case GL_RGBA32F_ARB: - return GL_RGBA; - case GL_RGB16F_ARB: - case GL_RGB32F_ARB: - return GL_RGB; - case GL_INTENSITY16F_ARB: - case GL_INTENSITY32F_ARB: - return GL_INTENSITY; - case GL_LUMINANCE16F_ARB: - case GL_LUMINANCE32F_ARB: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA16F_ARB: - case GL_LUMINANCE_ALPHA32F_ARB: - return GL_LUMINANCE_ALPHA; - default: - ; /* fallthrough */ - } - } - if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) { switch (internalFormat) { diff --git a/reactos/dll/opengl/mesa/main/texparam.c b/reactos/dll/opengl/mesa/main/texparam.c index 539bc189d57..13cf0b793b3 100644 --- a/reactos/dll/opengl/mesa/main/texparam.c +++ b/reactos/dll/opengl/mesa/main/texparam.c @@ -247,18 +247,10 @@ set_tex_parameterf(struct gl_context *ctx, case GL_TEXTURE_BORDER_COLOR: flush(ctx); - /* ARB_texture_float disables clamping */ - if (ctx->Extensions.ARB_texture_float) { - texObj->Sampler.BorderColor.f[RCOMP] = params[0]; - texObj->Sampler.BorderColor.f[GCOMP] = params[1]; - texObj->Sampler.BorderColor.f[BCOMP] = params[2]; - texObj->Sampler.BorderColor.f[ACOMP] = params[3]; - } else { - texObj->Sampler.BorderColor.f[RCOMP] = CLAMP(params[0], 0.0F, 1.0F); - texObj->Sampler.BorderColor.f[GCOMP] = CLAMP(params[1], 0.0F, 1.0F); - texObj->Sampler.BorderColor.f[BCOMP] = CLAMP(params[2], 0.0F, 1.0F); - texObj->Sampler.BorderColor.f[ACOMP] = CLAMP(params[3], 0.0F, 1.0F); - } + texObj->Sampler.BorderColor.f[RCOMP] = CLAMP(params[0], 0.0F, 1.0F); + texObj->Sampler.BorderColor.f[GCOMP] = CLAMP(params[1], 0.0F, 1.0F); + texObj->Sampler.BorderColor.f[BCOMP] = CLAMP(params[2], 0.0F, 1.0F); + texObj->Sampler.BorderColor.f[ACOMP] = CLAMP(params[3], 0.0F, 1.0F); return GL_TRUE; default: @@ -634,22 +626,6 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, } break; - /* GL_ARB_texture_float */ - case GL_TEXTURE_RED_TYPE_ARB: - case GL_TEXTURE_GREEN_TYPE_ARB: - case GL_TEXTURE_BLUE_TYPE_ARB: - case GL_TEXTURE_ALPHA_TYPE_ARB: - case GL_TEXTURE_LUMINANCE_TYPE_ARB: - case GL_TEXTURE_INTENSITY_TYPE_ARB: - case GL_TEXTURE_DEPTH_TYPE_ARB: - if (!ctx->Extensions.ARB_texture_float) - goto invalid_pname; - if (_mesa_base_format_has_channel(img->_BaseFormat, pname)) - *params = _mesa_get_format_datatype(texFormat); - else - *params = GL_NONE; - break; - default: goto invalid_pname; } diff --git a/reactos/dll/opengl/mesa/main/texstore.c b/reactos/dll/opengl/mesa/main/texstore.c index 397c69775d5..43b5b45ef18 100644 --- a/reactos/dll/opengl/mesa/main/texstore.c +++ b/reactos/dll/opengl/mesa/main/texstore.c @@ -2563,153 +2563,6 @@ _mesa_texstore_s8(TEXSTORE_PARAMS) } -/** - * Store an image in any of the formats: - * _mesa_texformat_rgba_float32 - * _mesa_texformat_rgb_float32 - * _mesa_texformat_alpha_float32 - * _mesa_texformat_luminance_float32 - * _mesa_texformat_luminance_alpha_float32 - * _mesa_texformat_intensity_float32 - */ -static GLboolean -_mesa_texstore_rgba_float32(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT32 || - dstFormat == MESA_FORMAT_RGB_FLOAT32 || - dstFormat == MESA_FORMAT_ALPHA_FLOAT32 || - dstFormat == MESA_FORMAT_LUMINANCE_FLOAT32 || - dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 || - dstFormat == MESA_FORMAT_INTENSITY_FLOAT32 || - dstFormat == MESA_FORMAT_R_FLOAT32 || - dstFormat == MESA_FORMAT_RG_FLOAT32); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY || - baseInternalFormat == GL_RED || - baseInternalFormat == GL_RG); - ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLfloat)); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - baseInternalFormat == baseFormat && - srcType == GL_FLOAT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint bytesPerRow; - GLint img, row; - if (!tempImage) - return GL_FALSE; - bytesPerRow = srcWidth * components * sizeof(GLfloat); - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - memcpy(dstRow, srcRow, bytesPerRow); - dstRow += dstRowStride; - srcRow += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - - -/** - * As above, but store 16-bit floats. - */ -static GLboolean -_mesa_texstore_rgba_float16(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT16 || - dstFormat == MESA_FORMAT_RGB_FLOAT16 || - dstFormat == MESA_FORMAT_ALPHA_FLOAT16 || - dstFormat == MESA_FORMAT_LUMINANCE_FLOAT16 || - dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 || - dstFormat == MESA_FORMAT_INTENSITY_FLOAT16 || - dstFormat == MESA_FORMAT_R_FLOAT16 || - dstFormat == MESA_FORMAT_RG_FLOAT16); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY || - baseInternalFormat == GL_RED || - baseInternalFormat == GL_RG); - ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLhalfARB)); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - baseInternalFormat == baseFormat && - srcType == GL_HALF_FLOAT_ARB) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLhalfARB *dstTexel = (GLhalfARB *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = _mesa_float_to_half(src[i]); - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - /* non-normalized, signed int8 */ static GLboolean _mesa_texstore_rgba_int8(TEXSTORE_PARAMS) @@ -3186,18 +3039,6 @@ _mesa_get_texstore_func(gl_format format) table[MESA_FORMAT_Z24_X8] = _mesa_texstore_z24_x8; table[MESA_FORMAT_Z32] = _mesa_texstore_z32; table[MESA_FORMAT_S8] = _mesa_texstore_s8; - table[MESA_FORMAT_RGBA_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_RGBA_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_RGB_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_RGB_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_ALPHA_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_ALPHA_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_LUMINANCE_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_LUMINANCE_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_INTENSITY_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_INTENSITY_FLOAT16] = _mesa_texstore_rgba_float16; table[MESA_FORMAT_SIGNED_RGBA_16] = _mesa_texstore_signed_rgba_16; table[MESA_FORMAT_RGBA_16] = _mesa_texstore_rgba_16; diff --git a/reactos/dll/opengl/mesa/main/varray.c b/reactos/dll/opengl/mesa/main/varray.c index a8b2b395c17..71b3eab96ba 100644 --- a/reactos/dll/opengl/mesa/main/varray.c +++ b/reactos/dll/opengl/mesa/main/varray.c @@ -59,11 +59,6 @@ type_to_bit(const struct gl_context *ctx, GLenum type) return INT_BIT; case GL_UNSIGNED_INT: return UNSIGNED_INT_BIT; - case GL_HALF_FLOAT: - if (ctx->Extensions.ARB_half_float_vertex) - return HALF_BIT; - else - return 0x0; case GL_FLOAT: return FLOAT_BIT; case GL_DOUBLE: diff --git a/reactos/dll/opengl/mesa/main/version.c b/reactos/dll/opengl/mesa/main/version.c index 55d3769c94c..7520274ba7d 100644 --- a/reactos/dll/opengl/mesa/main/version.c +++ b/reactos/dll/opengl/mesa/main/version.c @@ -79,10 +79,7 @@ compute_version(struct gl_context *ctx) ctx->Extensions.EXT_blend_equation_separate); const GLboolean ver_2_1 = (ver_2_0); const GLboolean ver_3_0 = (ver_2_1 && - ctx->Extensions.ARB_half_float_pixel && - ctx->Extensions.ARB_half_float_vertex && ctx->Extensions.ARB_map_buffer_range && - ctx->Extensions.ARB_texture_float && ctx->Extensions.APPLE_vertex_array_object); diff --git a/reactos/dll/opengl/mesa/swrast/s_texfetch.c b/reactos/dll/opengl/mesa/swrast/s_texfetch.c index d3207425d53..e8025fa869d 100644 --- a/reactos/dll/opengl/mesa/swrast/s_texfetch.c +++ b/reactos/dll/opengl/mesa/swrast/s_texfetch.c @@ -325,79 +325,6 @@ texfetch_funcs[MESA_FORMAT_COUNT] = NULL, NULL }, - { - MESA_FORMAT_RGBA_FLOAT32, - fetch_texel_1d_f_rgba_f32, - fetch_texel_2d_f_rgba_f32, - fetch_texel_3d_f_rgba_f32 - }, - { - MESA_FORMAT_RGBA_FLOAT16, - fetch_texel_1d_f_rgba_f16, - fetch_texel_2d_f_rgba_f16, - fetch_texel_3d_f_rgba_f16 - }, - { - MESA_FORMAT_RGB_FLOAT32, - fetch_texel_1d_f_rgb_f32, - fetch_texel_2d_f_rgb_f32, - fetch_texel_3d_f_rgb_f32 - }, - { - MESA_FORMAT_RGB_FLOAT16, - fetch_texel_1d_f_rgb_f16, - fetch_texel_2d_f_rgb_f16, - fetch_texel_3d_f_rgb_f16 - }, - { - MESA_FORMAT_ALPHA_FLOAT32, - fetch_texel_1d_f_alpha_f32, - fetch_texel_2d_f_alpha_f32, - fetch_texel_3d_f_alpha_f32 - }, - { - MESA_FORMAT_ALPHA_FLOAT16, - fetch_texel_1d_f_alpha_f16, - fetch_texel_2d_f_alpha_f16, - fetch_texel_3d_f_alpha_f16 - }, - { - MESA_FORMAT_LUMINANCE_FLOAT32, - fetch_texel_1d_f_luminance_f32, - fetch_texel_2d_f_luminance_f32, - fetch_texel_3d_f_luminance_f32 - }, - { - MESA_FORMAT_LUMINANCE_FLOAT16, - fetch_texel_1d_f_luminance_f16, - fetch_texel_2d_f_luminance_f16, - fetch_texel_3d_f_luminance_f16 - }, - { - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, - fetch_texel_1d_f_luminance_alpha_f32, - fetch_texel_2d_f_luminance_alpha_f32, - fetch_texel_3d_f_luminance_alpha_f32 - }, - { - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, - fetch_texel_1d_f_luminance_alpha_f16, - fetch_texel_2d_f_luminance_alpha_f16, - fetch_texel_3d_f_luminance_alpha_f16 - }, - { - MESA_FORMAT_INTENSITY_FLOAT32, - fetch_texel_1d_f_intensity_f32, - fetch_texel_2d_f_intensity_f32, - fetch_texel_3d_f_intensity_f32 - }, - { - MESA_FORMAT_INTENSITY_FLOAT16, - fetch_texel_1d_f_intensity_f16, - fetch_texel_2d_f_intensity_f16, - fetch_texel_3d_f_intensity_f16 - }, - { MESA_FORMAT_ALPHA_UINT8, NULL, diff --git a/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h b/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h index da996b8a100..88ebec98c9e 100644 --- a/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h +++ b/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h @@ -97,219 +97,6 @@ static void FETCH(f_z16)(const struct swrast_texture_image *texImage, -/* MESA_FORMAT_RGBA_F32 ******************************************************/ - -/* Fetch texel from 1D, 2D or 3D RGBA_FLOAT32 texture, returning 4 GLfloats. - */ -static void FETCH(f_rgba_f32)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 4); - texel[RCOMP] = src[0]; - texel[GCOMP] = src[1]; - texel[BCOMP] = src[2]; - texel[ACOMP] = src[3]; -} - - - - -/* MESA_FORMAT_RGBA_F16 ******************************************************/ - -/* Fetch texel from 1D, 2D or 3D RGBA_FLOAT16 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_rgba_f16)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 4); - texel[RCOMP] = _mesa_half_to_float(src[0]); - texel[GCOMP] = _mesa_half_to_float(src[1]); - texel[BCOMP] = _mesa_half_to_float(src[2]); - texel[ACOMP] = _mesa_half_to_float(src[3]); -} - - - -/* MESA_FORMAT_RGB_F32 *******************************************************/ - -/* Fetch texel from 1D, 2D or 3D RGB_FLOAT32 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_rgb_f32)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 3); - texel[RCOMP] = src[0]; - texel[GCOMP] = src[1]; - texel[BCOMP] = src[2]; - texel[ACOMP] = 1.0F; -} - - - - -/* MESA_FORMAT_RGB_F16 *******************************************************/ - -/* Fetch texel from 1D, 2D or 3D RGB_FLOAT16 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_rgb_f16)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 3); - texel[RCOMP] = _mesa_half_to_float(src[0]); - texel[GCOMP] = _mesa_half_to_float(src[1]); - texel[BCOMP] = _mesa_half_to_float(src[2]); - texel[ACOMP] = 1.0F; -} - - - - -/* MESA_FORMAT_ALPHA_F32 *****************************************************/ - -/* Fetch texel from 1D, 2D or 3D ALPHA_FLOAT32 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_alpha_f32)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = 0.0F; - texel[ACOMP] = src[0]; -} - - - - -/* MESA_FORMAT_ALPHA_F32 *****************************************************/ - -/* Fetch texel from 1D, 2D or 3D ALPHA_FLOAT16 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_alpha_f16)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = 0.0F; - texel[ACOMP] = _mesa_half_to_float(src[0]); -} - - - - -/* MESA_FORMAT_LUMINANCE_F32 *************************************************/ - -/* Fetch texel from 1D, 2D or 3D LUMINANCE_FLOAT32 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_luminance_f32)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = src[0]; - texel[ACOMP] = 1.0F; -} - - - - -/* MESA_FORMAT_LUMINANCE_F16 *************************************************/ - -/* Fetch texel from 1D, 2D or 3D LUMINANCE_FLOAT16 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_luminance_f16)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = _mesa_half_to_float(src[0]); - texel[ACOMP] = 1.0F; -} - - - - -/* MESA_FORMAT_LUMINANCE_ALPHA_F32 *******************************************/ - -/* Fetch texel from 1D, 2D or 3D LUMINANCE_ALPHA_FLOAT32 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_luminance_alpha_f32)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = src[0]; - texel[ACOMP] = src[1]; -} - - - - -/* MESA_FORMAT_LUMINANCE_ALPHA_F16 *******************************************/ - -/* Fetch texel from 1D, 2D or 3D LUMINANCE_ALPHA_FLOAT16 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_luminance_alpha_f16)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 2); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = _mesa_half_to_float(src[0]); - texel[ACOMP] = _mesa_half_to_float(src[1]); -} - - - - -/* MESA_FORMAT_INTENSITY_F32 *************************************************/ - -/* Fetch texel from 1D, 2D or 3D INTENSITY_FLOAT32 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_intensity_f32)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = - texel[ACOMP] = src[0]; -} - - - - -/* MESA_FORMAT_INTENSITY_F16 *************************************************/ - -/* Fetch texel from 1D, 2D or 3D INTENSITY_FLOAT16 texture, - * returning 4 GLfloats. - */ -static void FETCH(f_intensity_f16)( const struct swrast_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1); - texel[RCOMP] = - texel[GCOMP] = - texel[BCOMP] = - texel[ACOMP] = _mesa_half_to_float(src[0]); -} - - - /* * Begin Hardware formats */ diff --git a/reactos/dll/opengl/mesa/tnl/t_draw.c b/reactos/dll/opengl/mesa/tnl/t_draw.c index afcebc9d434..5314b86037b 100644 --- a/reactos/dll/opengl/mesa/tnl/t_draw.c +++ b/reactos/dll/opengl/mesa/tnl/t_draw.c @@ -73,24 +73,6 @@ static void free_space(struct gl_context *ctx) } \ } while (0) - -static void -convert_half_to_float(const struct gl_client_array *input, - const GLubyte *ptr, GLfloat *fptr, - GLuint count, GLuint sz) -{ - GLuint i, j; - - for (i = 0; i < count; i++) { - GLhalfARB *in = (GLhalfARB *)ptr; - - for (j = 0; j < sz; j++) { - *fptr++ = _mesa_half_to_float(in[j]); - } - ptr += input->StrideB; - } -} - /** * \brief Convert fixed-point to floating-point. * @@ -168,9 +150,6 @@ static void _tnl_import_array( struct gl_context *ctx, case GL_DOUBLE: CONVERT(GLdouble, (GLfloat)); break; - case GL_HALF_FLOAT: - convert_half_to_float(input, ptr, fptr, count, sz); - break; case GL_FIXED: convert_fixed_to_float(input, ptr, fptr, count); break;