*/
gl_format
st_ChooseTextureFormat(struct gl_context *ctx, GLenum target,
- GLint internalFormat, GLenum format, GLenum type)
+ GLint internalFormat,
+ GLenum format, GLenum type)
{
boolean want_renderable =
internalFormat == 3 || internalFormat == 4 ||
internalFormat == GL_RGB8 || internalFormat == GL_RGBA8 ||
internalFormat == GL_BGRA;
+ if (target == GL_TEXTURE_1D || target == GL_TEXTURE_1D_ARRAY) {
+ /* We don't do compression for these texture targets because of
+ * difficulty with sub-texture updates on non-block boundaries, etc.
+ * So change the internal format request to an uncompressed format.
+ */
+ internalFormat =
+ _mesa_generic_compressed_format_to_uncompressed_format(internalFormat);
+ }
+
return st_ChooseTextureFormat_renderable(ctx, internalFormat,
format, type, want_renderable);
}