summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-10-04 20:59:40 +0100
committerDave Airlie <[email protected]>2011-10-05 13:44:39 +0100
commit9c697a9d004da4aa7a26d3bda17cc473f50345ea (patch)
treeafbad4ed258d0cf1ae731dc4cb31cf4b580e123d /src
parent38db7ae7fa3b5c05244ebcc5c04228e6aa794262 (diff)
mesa: update fbo format tablet for integer types.
This updates the fbo format table for the integer types. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c62
1 files changed, 61 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 1d3980607f6..7571155841e 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1231,7 +1231,67 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
return ctx->Extensions.EXT_texture_shared_exponent ? GL_RGB : 0;
case GL_R11F_G11F_B10F:
return ctx->Extensions.EXT_packed_float ? GL_RGB : 0;
- /* XXX add integer formats eventually */
+
+ case GL_RGBA8UI_EXT:
+ case GL_RGBA16UI_EXT:
+ case GL_RGBA32UI_EXT:
+ case GL_RGBA8I_EXT:
+ case GL_RGBA16I_EXT:
+ case GL_RGBA32I_EXT:
+ return ctx->Extensions.EXT_texture_integer ? GL_RGBA : 0;
+
+ case GL_RGB8UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_RGB8I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_RGB32I_EXT:
+ return ctx->Extensions.EXT_texture_integer ? GL_RGB : 0;
+
+ case GL_R8UI:
+ case GL_R8I:
+ case GL_R16UI:
+ case GL_R16I:
+ case GL_R32UI:
+ case GL_R32I:
+ return ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.EXT_texture_integer ? GL_RED : 0;
+
+ case GL_RG8UI:
+ case GL_RG8I:
+ case GL_RG16UI:
+ case GL_RG16I:
+ case GL_RG32UI:
+ case GL_RG32I:
+ return ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.EXT_texture_integer ? GL_RG : 0;
+
+ case GL_INTENSITY8I_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_INTENSITY32UI_EXT:
+ return ctx->Extensions.EXT_texture_integer &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0;
+
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ return ctx->Extensions.EXT_texture_integer &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0;
+
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ return ctx->Extensions.EXT_texture_integer &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0;
default:
return 0;
}