convolve.h revision 4a49301e
17117f1b4Smrg 27117f1b4Smrg/* 37117f1b4Smrg * Mesa 3-D graphics library 47117f1b4Smrg * Version: 3.5 57117f1b4Smrg * 67117f1b4Smrg * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 77117f1b4Smrg * 87117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a 97117f1b4Smrg * copy of this software and associated documentation files (the "Software"), 107117f1b4Smrg * to deal in the Software without restriction, including without limitation 117117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 127117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the 137117f1b4Smrg * Software is furnished to do so, subject to the following conditions: 147117f1b4Smrg * 157117f1b4Smrg * The above copyright notice and this permission notice shall be included 167117f1b4Smrg * in all copies or substantial portions of the Software. 177117f1b4Smrg * 187117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 197117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 207117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 217117f1b4Smrg * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 227117f1b4Smrg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 237117f1b4Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 247117f1b4Smrg */ 257117f1b4Smrg 267117f1b4Smrg 277117f1b4Smrg#ifndef CONVOLVE_H 287117f1b4Smrg#define CONVOLVE_H 297117f1b4Smrg 307117f1b4Smrg 314a49301eSmrg#include "main/mtypes.h" 327117f1b4Smrg 337117f1b4Smrg 344a49301eSmrg#if FEATURE_convolve 354a49301eSmrg 364a49301eSmrg#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) \ 374a49301eSmrg do { \ 384a49301eSmrg (driver)->CopyConvolutionFilter1D = impl ## CopyConvolutionFilter1D; \ 394a49301eSmrg (driver)->CopyConvolutionFilter2D = impl ## CopyConvolutionFilter2D; \ 404a49301eSmrg } while (0) 414a49301eSmrg 427117f1b4Smrgextern void GLAPIENTRY 437117f1b4Smrg_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, 447117f1b4Smrg GLenum format, GLenum type, const GLvoid *image); 457117f1b4Smrg 467117f1b4Smrgextern void GLAPIENTRY 477117f1b4Smrg_mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, 487117f1b4Smrg GLsizei height, GLenum format, GLenum type, 497117f1b4Smrg const GLvoid *image); 507117f1b4Smrg 514a49301eSmrgextern void 524a49301eSmrg_mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width, 534a49301eSmrg const GLfloat *srcImage, GLfloat *dstImage); 547117f1b4Smrg 554a49301eSmrgextern void 564a49301eSmrg_mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height, 574a49301eSmrg const GLfloat *srcImage, GLfloat *dstImage); 587117f1b4Smrg 594a49301eSmrgextern void 604a49301eSmrg_mesa_convolve_sep_image(const GLcontext *ctx, 614a49301eSmrg GLsizei *width, GLsizei *height, 624a49301eSmrg const GLfloat *srcImage, GLfloat *dstImage); 637117f1b4Smrg 644a49301eSmrgextern void 654a49301eSmrg_mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions, 664a49301eSmrg GLsizei *width, GLsizei *height); 677117f1b4Smrg 684a49301eSmrgextern void 694a49301eSmrg_mesa_init_convolve_dispatch(struct _glapi_table *disp); 707117f1b4Smrg 714a49301eSmrg#else /* FEATURE_convolve */ 727117f1b4Smrg 734a49301eSmrg#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) do { } while (0) 747117f1b4Smrg 754a49301eSmrgstatic INLINE void GLAPIENTRY 764a49301eSmrg_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, 774a49301eSmrg GLenum format, GLenum type, const GLvoid *image) 784a49301eSmrg{ 794a49301eSmrg ASSERT_NO_FEATURE(); 804a49301eSmrg} 817117f1b4Smrg 824a49301eSmrgstatic INLINE void GLAPIENTRY 834a49301eSmrg_mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, 844a49301eSmrg GLsizei height, GLenum format, GLenum type, 854a49301eSmrg const GLvoid *image) 864a49301eSmrg{ 874a49301eSmrg ASSERT_NO_FEATURE(); 884a49301eSmrg} 897117f1b4Smrg 904a49301eSmrgstatic INLINE void 917117f1b4Smrg_mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width, 924a49301eSmrg const GLfloat *srcImage, GLfloat *dstImage) 934a49301eSmrg{ 944a49301eSmrg ASSERT_NO_FEATURE(); 954a49301eSmrg} 967117f1b4Smrg 974a49301eSmrgstatic INLINE void 987117f1b4Smrg_mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height, 994a49301eSmrg const GLfloat *srcImage, GLfloat *dstImage) 1004a49301eSmrg{ 1014a49301eSmrg ASSERT_NO_FEATURE(); 1024a49301eSmrg} 1037117f1b4Smrg 1047117f1b4Smrg 1054a49301eSmrgstatic INLINE void 1067117f1b4Smrg_mesa_convolve_sep_image(const GLcontext *ctx, 1077117f1b4Smrg GLsizei *width, GLsizei *height, 1084a49301eSmrg const GLfloat *srcImage, GLfloat *dstImage) 1094a49301eSmrg{ 1104a49301eSmrg ASSERT_NO_FEATURE(); 1114a49301eSmrg} 1127117f1b4Smrg 1134a49301eSmrgstatic INLINE void 1147117f1b4Smrg_mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions, 1154a49301eSmrg GLsizei *width, GLsizei *height) 1164a49301eSmrg{ 1174a49301eSmrg} 1184a49301eSmrg 1194a49301eSmrgstatic INLINE void 1204a49301eSmrg_mesa_init_convolve_dispatch(struct _glapi_table *disp) 1214a49301eSmrg{ 1224a49301eSmrg} 1237117f1b4Smrg 1244a49301eSmrg#endif /* FEATURE_convolve */ 1257117f1b4Smrg 1264a49301eSmrg#endif /* CONVOLVE_H */ 127