Author: jgardou Date: Mon Jun 16 18:18:40 2014 New Revision: 63606
URL: http://svn.reactos.org/svn/reactos?rev=63606&view=rev Log: [OPENGL32/MESA] - Get rid of support for ARB_texture_float, ARB_half_float_vertex and ARB_half_float_pixel
Modified: trunk/reactos/dll/opengl/mesa/main/extensions.c trunk/reactos/dll/opengl/mesa/main/format_pack.c trunk/reactos/dll/opengl/mesa/main/format_unpack.c trunk/reactos/dll/opengl/mesa/main/formats.c trunk/reactos/dll/opengl/mesa/main/formats.h trunk/reactos/dll/opengl/mesa/main/image.c trunk/reactos/dll/opengl/mesa/main/imports.c trunk/reactos/dll/opengl/mesa/main/imports.h trunk/reactos/dll/opengl/mesa/main/mtypes.h trunk/reactos/dll/opengl/mesa/main/pack.c trunk/reactos/dll/opengl/mesa/main/texformat.c trunk/reactos/dll/opengl/mesa/main/texgetimage.c trunk/reactos/dll/opengl/mesa/main/teximage.c trunk/reactos/dll/opengl/mesa/main/texparam.c trunk/reactos/dll/opengl/mesa/main/texstore.c trunk/reactos/dll/opengl/mesa/main/varray.c trunk/reactos/dll/opengl/mesa/main/version.c trunk/reactos/dll/opengl/mesa/swrast/s_texfetch.c trunk/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h trunk/reactos/dll/opengl/mesa/tnl/t_draw.c
Modified: trunk/reactos/dll/opengl/mesa/main/extensions.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/extens... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/extensions.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/extensions.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -61,8 +61,6 @@ */ 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 @@ { "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 @@ { "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 @@ 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;
Modified: trunk/reactos/dll/opengl/mesa/main/format_pack.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/format... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/format_pack.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/format_pack.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -807,200 +807,6 @@ pack_float_YCBCR_REV(const GLfloat src[4], void *dst) { /* todo */ -} - - -/* 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]); }
@@ -1095,19 +901,6 @@ 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 */ @@ -1184,20 +977,6 @@ table[MESA_FORMAT_Z24_X8] = NULL; 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;
Modified: trunk/reactos/dll/opengl/mesa/main/format_unpack.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/format... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/format_unpack.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/format_unpack.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -587,162 +587,6 @@ dst[i][1] = dst[i][2] = 0.0F; dst[i][3] = 1.0F; - } -} - -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]); } }
@@ -900,19 +744,6 @@ 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;
Modified: trunk/reactos/dll/opengl/mesa/main/formats.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/format... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/formats.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/formats.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -406,116 +406,7 @@ 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 @@ *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 @@ 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:
Modified: trunk/reactos/dll/opengl/mesa/main/formats.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/format... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/formats.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/formats.h [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -106,24 +106,6 @@ /*@}*/
/** - * \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 * formats TBD such as BGRA or ARGB.
Modified: trunk/reactos/dll/opengl/mesa/main/image.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/image.... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/image.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/image.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -125,8 +125,6 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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; }
Modified: trunk/reactos/dll/opengl/mesa/main/imports.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/import... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/imports.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/imports.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -536,146 +536,6 @@ return bits; } #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; -}
/*@}*/
Modified: trunk/reactos/dll/opengl/mesa/main/imports.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/import... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/imports.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/imports.h [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -597,12 +597,6 @@ _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,
Modified: trunk/reactos/dll/opengl/mesa/main/mtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/mtypes... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/mtypes.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/mtypes.h [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -1577,15 +1577,12 @@ 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;
Modified: trunk/reactos/dll/opengl/mesa/main/pack.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/pack.c... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/pack.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/pack.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -1568,85 +1568,6 @@ } } break; - case GL_HALF_FLOAT_ARB: - { - GLhalfARB *dst = (GLhalfARB *) dstAddr; - switch (dstFormat) { - case GL_RED: - for (i=0;i<n;i++) - dst[i] = _mesa_float_to_half(rgba[i][RCOMP]); - break; - case GL_GREEN: - for (i=0;i<n;i++) - dst[i] = _mesa_float_to_half(rgba[i][GCOMP]); - break; - case GL_BLUE: - for (i=0;i<n;i++) - dst[i] = _mesa_float_to_half(rgba[i][BCOMP]); - break; - case GL_ALPHA: - for (i=0;i<n;i++) - dst[i] = _mesa_float_to_half(rgba[i][ACOMP]); - break; - case GL_LUMINANCE: - for (i=0;i<n;i++) - dst[i] = _mesa_float_to_half(luminance[i]); - break; - case GL_LUMINANCE_ALPHA: - for (i=0;i<n;i++) { - dst[i*2+0] = _mesa_float_to_half(luminance[i]); - dst[i*2+1] = _mesa_float_to_half(rgba[i][ACOMP]); - } - break; - case GL_RG: - for (i=0;i<n;i++) { - dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]); - dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]); - } - break; - case GL_RGB: - for (i=0;i<n;i++) { - dst[i*3+0] = _mesa_float_to_half(rgba[i][RCOMP]); - dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]); - dst[i*3+2] = _mesa_float_to_half(rgba[i][BCOMP]); - } - break; - case GL_RGBA: - for (i=0;i<n;i++) { - dst[i*4+0] = _mesa_float_to_half(rgba[i][RCOMP]); - dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]); - dst[i*4+2] = _mesa_float_to_half(rgba[i][BCOMP]); - dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]); - } - break; - case GL_BGR: - for (i=0;i<n;i++) { - dst[i*3+0] = _mesa_float_to_half(rgba[i][BCOMP]); - dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]); - dst[i*3+2] = _mesa_float_to_half(rgba[i][RCOMP]); - } - break; - case GL_BGRA: - for (i=0;i<n;i++) { - dst[i*4+0] = _mesa_float_to_half(rgba[i][BCOMP]); - dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]); - dst[i*4+2] = _mesa_float_to_half(rgba[i][RCOMP]); - dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]); - } - break; - case GL_ABGR_EXT: - for (i=0;i<n;i++) { - dst[i*4+0] = _mesa_float_to_half(rgba[i][ACOMP]); - dst[i*4+1] = _mesa_float_to_half(rgba[i][BCOMP]); - dst[i*4+2] = _mesa_float_to_half(rgba[i][GCOMP]); - dst[i*4+3] = _mesa_float_to_half(rgba[i][RCOMP]); - } - break; - default: - _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); - } - } - break; case GL_UNSIGNED_BYTE_3_3_2: if (dstFormat == GL_RGB) { GLubyte *dst = (GLubyte *) dstAddr; @@ -2055,23 +1976,6 @@ else { for (i = 0; i < n; i++) indexes[i] = (GLuint) s[i]; - } - } - break; - case GL_HALF_FLOAT_ARB: - { - GLuint i; - const GLhalfARB *s = (const GLhalfARB *) src; - if (unpack->SwapBytes) { - 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; @@ -2378,12 +2282,6 @@ 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; @@ -2697,15 +2595,6 @@ { 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() @@ -2844,12 +2733,6 @@ PROCESS(gSrc, GCOMP, 0, GLfloat, clamp_float_to_uint); 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: { @@ -3891,18 +3774,6 @@ } } 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 @@ } } break; - case GL_HALF_FLOAT_ARB: - { - GLhalfARB *dst = (GLhalfARB *) dest; - GLuint i; - for (i=0;i<n;i++) { - dst[i] = _mesa_float_to_half( (float) source[i] ); - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; case GL_BITMAP: if (dstPacking->LsbFirst) { GLubyte *dst = (GLubyte *) dest; @@ -4279,20 +4138,6 @@ 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); @@ -4458,18 +4303,6 @@ } if (dstPacking->SwapBytes) { _mesa_swap4( (GLuint *) dst, 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(depthSpan[i]); - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); } } break;
Modified: trunk/reactos/dll/opengl/mesa/main/texformat.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/texfor... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/texformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/texformat.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -206,81 +206,6 @@ } }
- 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:
Modified: trunk/reactos/dll/opengl/mesa/main/texgetimage.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/texget... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/texgetimage.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/texgetimage.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -40,7 +40,6 @@ 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;
Modified: trunk/reactos/dll/opengl/mesa/main/teximage.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/texima... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/teximage.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/teximage.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -115,31 +115,6 @@ 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) {
Modified: trunk/reactos/dll/opengl/mesa/main/texparam.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/texpar... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/texparam.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/texparam.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -247,18 +247,10 @@
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: @@ -632,22 +624,6 @@ else { *params = 0; } - 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:
Modified: trunk/reactos/dll/opengl/mesa/main/texstore.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/texsto... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/texstore.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/texstore.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -2559,153 +2559,6 @@
}
- return GL_TRUE; -} - - -/** - * 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; }
@@ -3186,18 +3039,6 @@ 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;
Modified: trunk/reactos/dll/opengl/mesa/main/varray.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/varray... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/varray.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/varray.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -59,11 +59,6 @@ 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:
Modified: trunk/reactos/dll/opengl/mesa/main/version.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/versio... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/version.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/version.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -79,10 +79,7 @@ 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);
Modified: trunk/reactos/dll/opengl/mesa/swrast/s_texfetch.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/swrast/s_te... ============================================================================== --- trunk/reactos/dll/opengl/mesa/swrast/s_texfetch.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/swrast/s_texfetch.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -326,79 +326,6 @@ 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, NULL,
Modified: trunk/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/swrast/s_te... ============================================================================== --- trunk/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/swrast/s_texfetch_tmp.h [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -97,219 +97,6 @@
-/* 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 */
Modified: trunk/reactos/dll/opengl/mesa/tnl/t_draw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/tnl/t_draw.... ============================================================================== --- trunk/reactos/dll/opengl/mesa/tnl/t_draw.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/tnl/t_draw.c [iso-8859-1] Mon Jun 16 18:18:40 2014 @@ -73,24 +73,6 @@ } \ } 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. * @@ -167,9 +149,6 @@ break; 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);