diff options
author | marha <marha@users.sourceforge.net> | 2011-10-05 17:44:57 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-10-05 17:44:57 +0200 |
commit | 8af87a5b60e37ae84fdd759e2c1602be38be4905 (patch) | |
tree | 2e621c7fbdc4dfe9eb8d733af4cc232bc03643d4 /mesalib/src/mesa/main/texformat.c | |
parent | 8238de0fe0c28bd54b3e6cdd1fc94513cf21d3cc (diff) | |
parent | f7025b4baa1ba35ee796785641f04eac5bedb0a6 (diff) | |
download | vcxsrv-8af87a5b60e37ae84fdd759e2c1602be38be4905.tar.gz vcxsrv-8af87a5b60e37ae84fdd759e2c1602be38be4905.tar.bz2 vcxsrv-8af87a5b60e37ae84fdd759e2c1602be38be4905.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/glapi.h
mesalib/src/mesa/main/syncobj.h
xorg-server/dix/events.c
xorg-server/dix/getevents.c
xorg-server/include/misc.h
Diffstat (limited to 'mesalib/src/mesa/main/texformat.c')
-rw-r--r-- | mesalib/src/mesa/main/texformat.c | 83 |
1 files changed, 79 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c index b763a689a..ccc3c49f5 100644 --- a/mesalib/src/mesa/main/texformat.c +++ b/mesalib/src/mesa/main/texformat.c @@ -609,35 +609,67 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, break; case GL_RGBA8UI_EXT: case GL_RGB8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + break; case GL_ALPHA8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT8); + break; case GL_INTENSITY8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT8); + break; case GL_LUMINANCE8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT8); + break; case GL_LUMINANCE_ALPHA8UI_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT8); break; case GL_RGBA32I_EXT: case GL_RGB32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + break; case GL_ALPHA32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT32); + break; case GL_INTENSITY32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT32); + break; case GL_LUMINANCE32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT32); + break; case GL_LUMINANCE_ALPHA32I_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT32); break; case GL_RGBA16I_EXT: case GL_RGB16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + break; case GL_ALPHA16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT16); + break; case GL_INTENSITY16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT16); + break; case GL_LUMINANCE16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT16); + break; case GL_LUMINANCE_ALPHA16I_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT16); break; case GL_RGBA8I_EXT: case GL_RGB8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + break; case GL_ALPHA8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT8); + break; case GL_INTENSITY8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT8); + break; case GL_LUMINANCE8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT8); + break; case GL_LUMINANCE_ALPHA8I_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT8); break; } } @@ -703,6 +735,49 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, } } + if (ctx->Extensions.ARB_texture_rg && ctx->Extensions.EXT_texture_integer) { + switch (internalFormat) { + case GL_R8UI: + RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT8); + break; + case GL_RG8UI: + RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT8); + break; + case GL_R16UI: + RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT16); + break; + case GL_RG16UI: + RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT16); + break; + case GL_R32UI: + RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT32); + break; + case GL_RG32UI: + RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT32); + break; + case GL_R8I: + RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT8); + break; + case GL_RG8I: + RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT8); + break; + case GL_R16I: + RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT16); + break; + case GL_RG16I: + RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT16); + break; + case GL_R32I: + RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT32); + break; + case GL_RG32I: + RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT32); + break; + default: + break; + } + } + /* GL_BGRA can be an internal format *only* in OpenGL ES (1.x or 2.0). */ if (ctx->API != API_OPENGL) { |