summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-12-15 13:03:40 +1000
committerDave Airlie <[email protected]>2012-12-16 06:55:33 +1000
commit1b62c326ea36dcfe66e84a75d11b4bbbc4231c69 (patch)
tree180607522923c0d41bb5d42d3c155c6a55fde3fc /src/mesa/main/teximage.c
parent7d7a549fa03293ede1d1627be5bdb47c11677f87 (diff)
mesa: add support for ARB_texture_buffer_object_rgb32
This adds the extensions + the tex buffer support for checking the formats. There is a piglit test enhancement sent to that list. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 47c4ed23590..7a0d944fd96 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3848,6 +3848,13 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
case GL_R32UI:
return MESA_FORMAT_R_UINT32;
+ case GL_RGB32F:
+ return MESA_FORMAT_RGB_FLOAT32;
+ case GL_RGB32UI:
+ return MESA_FORMAT_RGB_UINT32;
+ case GL_RGB32I:
+ return MESA_FORMAT_RGB_INT32;
+
default:
return MESA_FORMAT_NONE;
}
@@ -3879,6 +3886,12 @@ validate_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
if (base_format == GL_R || base_format == GL_RG)
return MESA_FORMAT_NONE;
}
+
+ if (!ctx->Extensions.ARB_texture_buffer_object_rgb32) {
+ GLenum base_format = _mesa_get_format_base_format(format);
+ if (base_format == GL_RGB)
+ return MESA_FORMAT_NONE;
+ }
return format;
}