&postConvHeight);
}
#endif
+
if (copytexture_error_check(ctx, 2, target, level, internalFormat,
postConvWidth, postConvHeight, border))
return;
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
-#if FEATURE_convolve
- /* XXX should test internal format */
- _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
-#endif
-
if (copytexsubimage_error_check1(ctx, 1, target, level))
return;
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+#if FEATURE_convolve
+ if (texImage && _mesa_is_color_format(texImage->InternalFormat)) {
+ _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
+ }
+#endif
+
if (copytexsubimage_error_check2(ctx, 1, target, level,
xoffset, 0, 0, postConvWidth, 1,
texImage))
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
-#if FEATURE_convolve
- /* XXX should test internal format */
- _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight);
-#endif
-
if (copytexsubimage_error_check1(ctx, 2, target, level))
return;
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+#if FEATURE_convolve
+ if (texImage && _mesa_is_color_format(texImage->InternalFormat)) {
+ _mesa_adjust_image_for_convolution(ctx, 2,
+ &postConvWidth, &postConvHeight);
+ }
+#endif
+
if (copytexsubimage_error_check2(ctx, 2, target, level, xoffset, yoffset, 0,
postConvWidth, postConvHeight, texImage))
goto out;
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
-#if FEATURE_convolve
- /* XXX should test internal format */
- _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight);
-#endif
-
if (copytexsubimage_error_check1(ctx, 3, target, level))
return;
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+#if FEATURE_convolve
+ if (texImage && _mesa_is_color_format(texImage->InternalFormat)) {
+ _mesa_adjust_image_for_convolution(ctx, 2,
+ &postConvWidth, &postConvHeight);
+ }
+#endif
+
if (copytexsubimage_error_check2(ctx, 3, target, level, xoffset, yoffset,
zoffset, postConvWidth, postConvHeight,
texImage))