* index, depth, stencil, etc).
* \param format the image format value (may by an internal texture format)
* \return GL_TRUE if its a color/RGBA format, GL_FALSE otherwise.
+ * XXX maybe move this func to image.c
*/
-static GLboolean
-is_color_format(GLenum format)
+GLboolean
+_mesa_is_color_format(GLenum format)
{
switch (format) {
case GL_RED:
#endif /* FEATURE_EXT_texture_sRGB */
return GL_TRUE;
case GL_YCBCR_MESA: /* not considered to be RGB */
+ /* fall-through */
default:
return GL_FALSE;
}
}
/* make sure internal format and format basically agree */
- colorFormat = is_color_format(format);
+ colorFormat = _mesa_is_color_format(format);
indexFormat = is_index_format(format);
- if ((is_color_format(internalFormat) && !colorFormat && !indexFormat) ||
+ if ((_mesa_is_color_format(internalFormat) && !colorFormat && !indexFormat) ||
(is_index_format(internalFormat) && !indexFormat) ||
(is_depth_format(internalFormat) != is_depth_format(format)) ||
(is_ycbcr_format(internalFormat) != is_ycbcr_format(format)) ||
* texture's format. Note that a color index texture can be converted
* to RGBA so that combo is allowed.
*/
- if (is_color_format(format)
- && !is_color_format(texImage->TexFormat->BaseFormat)
+ if (_mesa_is_color_format(format)
+ && !_mesa_is_color_format(texImage->TexFormat->BaseFormat)
&& !is_index_format(texImage->TexFormat->BaseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
goto out;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
#if FEATURE_convolve
- if (is_color_format(internalFormat)) {
+ if (_mesa_is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
}
#endif
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
#if FEATURE_convolve
- if (is_color_format(internalFormat)) {
+ if (_mesa_is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
&postConvHeight);
}
#if FEATURE_convolve
/* XXX should test internal format */
- if (is_color_format(format)) {
+ if (_mesa_is_color_format(format)) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
}
#endif
#if FEATURE_convolve
/* XXX should test internal format */
- if (is_color_format(format)) {
+ if (_mesa_is_color_format(format)) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
&postConvHeight);
}
_mesa_update_state(ctx);
#if FEATURE_convolve
- if (is_color_format(internalFormat)) {
+ if (_mesa_is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
}
#endif
_mesa_update_state(ctx);
#if FEATURE_convolve
- if (is_color_format(internalFormat)) {
+ if (_mesa_is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
&postConvHeight);
}
_mesa_update_state(ctx);
#if FEATURE_convolve
+
/* XXX should test internal format */
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
#endif