intel: make a bunch of glTexImage-related functions static
This commit is contained in:
@@ -550,6 +550,9 @@ intelInitDriverFunctions(struct dd_function_table *functions)
|
|||||||
functions->CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
|
functions->CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
|
||||||
|
|
||||||
intelInitTextureFuncs(functions);
|
intelInitTextureFuncs(functions);
|
||||||
|
intelInitTextureImageFuncs(functions);
|
||||||
|
intelInitTextureSubImageFuncs(functions);
|
||||||
|
intelInitTextureCopyImageFuncs(functions);
|
||||||
intelInitStateFuncs(functions);
|
intelInitStateFuncs(functions);
|
||||||
intelInitClearFuncs(functions);
|
intelInitClearFuncs(functions);
|
||||||
intelInitBufferFuncs(functions);
|
intelInitBufferFuncs(functions);
|
||||||
|
@@ -162,24 +162,8 @@ void
|
|||||||
intelInitTextureFuncs(struct dd_function_table *functions)
|
intelInitTextureFuncs(struct dd_function_table *functions)
|
||||||
{
|
{
|
||||||
functions->ChooseTextureFormat = intelChooseTextureFormat;
|
functions->ChooseTextureFormat = intelChooseTextureFormat;
|
||||||
functions->TexImage1D = intelTexImage1D;
|
|
||||||
functions->TexImage2D = intelTexImage2D;
|
|
||||||
functions->TexImage3D = intelTexImage3D;
|
|
||||||
functions->TexSubImage1D = intelTexSubImage1D;
|
|
||||||
functions->TexSubImage2D = intelTexSubImage2D;
|
|
||||||
functions->TexSubImage3D = intelTexSubImage3D;
|
|
||||||
functions->CopyTexImage1D = intelCopyTexImage1D;
|
|
||||||
functions->CopyTexImage2D = intelCopyTexImage2D;
|
|
||||||
functions->CopyTexSubImage1D = intelCopyTexSubImage1D;
|
|
||||||
functions->CopyTexSubImage2D = intelCopyTexSubImage2D;
|
|
||||||
functions->GetTexImage = intelGetTexImage;
|
|
||||||
functions->GenerateMipmap = intel_generate_mipmap;
|
functions->GenerateMipmap = intel_generate_mipmap;
|
||||||
|
|
||||||
/* compressed texture functions */
|
|
||||||
functions->CompressedTexImage2D = intelCompressedTexImage2D;
|
|
||||||
functions->CompressedTexSubImage2D = intelCompressedTexSubImage2D;
|
|
||||||
functions->GetCompressedTexImage = intelGetCompressedTexImage;
|
|
||||||
|
|
||||||
functions->NewTextureObject = intelNewTextureObject;
|
functions->NewTextureObject = intelNewTextureObject;
|
||||||
functions->NewTextureImage = intelNewTextureImage;
|
functions->NewTextureImage = intelNewTextureImage;
|
||||||
functions->DeleteTexture = intelDeleteTextureObject;
|
functions->DeleteTexture = intelDeleteTextureObject;
|
||||||
|
@@ -35,116 +35,17 @@
|
|||||||
|
|
||||||
void intelInitTextureFuncs(struct dd_function_table *functions);
|
void intelInitTextureFuncs(struct dd_function_table *functions);
|
||||||
|
|
||||||
|
void intelInitTextureImageFuncs(struct dd_function_table *functions);
|
||||||
|
|
||||||
|
void intelInitTextureSubImageFuncs(struct dd_function_table *functions);
|
||||||
|
|
||||||
|
void intelInitTextureCopyImageFuncs(struct dd_function_table *functions);
|
||||||
|
|
||||||
const struct gl_texture_format *intelChooseTextureFormat(GLcontext * ctx,
|
const struct gl_texture_format *intelChooseTextureFormat(GLcontext * ctx,
|
||||||
GLint internalFormat,
|
GLint internalFormat,
|
||||||
GLenum format,
|
GLenum format,
|
||||||
GLenum type);
|
GLenum type);
|
||||||
|
|
||||||
|
|
||||||
void intelTexImage3D(GLcontext * ctx,
|
|
||||||
GLenum target, GLint level,
|
|
||||||
GLint internalFormat,
|
|
||||||
GLint width, GLint height, GLint depth,
|
|
||||||
GLint border,
|
|
||||||
GLenum format, GLenum type, const void *pixels,
|
|
||||||
const struct gl_pixelstore_attrib *packing,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelTexSubImage3D(GLcontext * ctx,
|
|
||||||
GLenum target,
|
|
||||||
GLint level,
|
|
||||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
|
||||||
GLsizei width, GLsizei height, GLsizei depth,
|
|
||||||
GLenum format, GLenum type,
|
|
||||||
const GLvoid * pixels,
|
|
||||||
const struct gl_pixelstore_attrib *packing,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelTexImage2D(GLcontext * ctx,
|
|
||||||
GLenum target, GLint level,
|
|
||||||
GLint internalFormat,
|
|
||||||
GLint width, GLint height, GLint border,
|
|
||||||
GLenum format, GLenum type, const void *pixels,
|
|
||||||
const struct gl_pixelstore_attrib *packing,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelTexSubImage2D(GLcontext * ctx,
|
|
||||||
GLenum target,
|
|
||||||
GLint level,
|
|
||||||
GLint xoffset, GLint yoffset,
|
|
||||||
GLsizei width, GLsizei height,
|
|
||||||
GLenum format, GLenum type,
|
|
||||||
const GLvoid * pixels,
|
|
||||||
const struct gl_pixelstore_attrib *packing,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelTexImage1D(GLcontext * ctx,
|
|
||||||
GLenum target, GLint level,
|
|
||||||
GLint internalFormat,
|
|
||||||
GLint width, GLint border,
|
|
||||||
GLenum format, GLenum type, const void *pixels,
|
|
||||||
const struct gl_pixelstore_attrib *packing,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelTexSubImage1D(GLcontext * ctx,
|
|
||||||
GLenum target,
|
|
||||||
GLint level,
|
|
||||||
GLint xoffset,
|
|
||||||
GLsizei width,
|
|
||||||
GLenum format, GLenum type,
|
|
||||||
const GLvoid * pixels,
|
|
||||||
const struct gl_pixelstore_attrib *packing,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
|
|
||||||
GLenum internalFormat,
|
|
||||||
GLint x, GLint y, GLsizei width, GLint border);
|
|
||||||
|
|
||||||
void intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
|
|
||||||
GLenum internalFormat,
|
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height,
|
|
||||||
GLint border);
|
|
||||||
|
|
||||||
void intelCopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
|
|
||||||
GLint xoffset, GLint x, GLint y, GLsizei width);
|
|
||||||
|
|
||||||
void intelCopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
|
|
||||||
GLint xoffset, GLint yoffset,
|
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height);
|
|
||||||
|
|
||||||
void intelGetTexImage(GLcontext * ctx, GLenum target, GLint level,
|
|
||||||
GLenum format, GLenum type, GLvoid * pixels,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level,
|
|
||||||
GLint internalFormat,
|
|
||||||
GLint width, GLint height, GLint border,
|
|
||||||
GLsizei imageSize, const GLvoid *data,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage );
|
|
||||||
|
|
||||||
void intelCompressedTexSubImage2D(GLcontext * ctx,
|
|
||||||
GLenum target,
|
|
||||||
GLint level,
|
|
||||||
GLint xoffset, GLint yoffset,
|
|
||||||
GLsizei width, GLsizei height,
|
|
||||||
GLenum format, GLsizei imageSize,
|
|
||||||
const GLvoid * pixels,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
|
|
||||||
GLvoid *pixels,
|
|
||||||
struct gl_texture_object *texObj,
|
|
||||||
struct gl_texture_image *texImage);
|
|
||||||
|
|
||||||
void intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
|
void intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
|
||||||
unsigned long long offset, GLint depth, GLuint pitch);
|
unsigned long long offset, GLint depth, GLuint pitch);
|
||||||
void intelSetTexBuffer(__DRIcontext *pDRICtx,
|
void intelSetTexBuffer(__DRIcontext *pDRICtx,
|
||||||
|
@@ -169,7 +169,7 @@ do_copy_texsubimage(struct intel_context *intel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
|
intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
|
||||||
GLenum internalFormat,
|
GLenum internalFormat,
|
||||||
GLint x, GLint y, GLsizei width, GLint border)
|
GLint x, GLint y, GLsizei width, GLint border)
|
||||||
@@ -216,7 +216,7 @@ intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
|
intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
|
||||||
GLenum internalFormat,
|
GLenum internalFormat,
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height,
|
GLint x, GLint y, GLsizei width, GLsizei height,
|
||||||
@@ -264,7 +264,7 @@ intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelCopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
|
intelCopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
|
||||||
GLint xoffset, GLint x, GLint y, GLsizei width)
|
GLint xoffset, GLint x, GLint y, GLsizei width)
|
||||||
{
|
{
|
||||||
@@ -289,7 +289,7 @@ intelCopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelCopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
|
intelCopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
|
||||||
GLint xoffset, GLint yoffset,
|
GLint xoffset, GLint yoffset,
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height)
|
GLint x, GLint y, GLsizei width, GLsizei height)
|
||||||
@@ -316,3 +316,13 @@ intelCopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
|
|||||||
xoffset, yoffset, x, y, width, height);
|
xoffset, yoffset, x, y, width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
intelInitTextureCopyImageFuncs(struct dd_function_table *functions)
|
||||||
|
{
|
||||||
|
functions->CopyTexImage1D = intelCopyTexImage1D;
|
||||||
|
functions->CopyTexImage2D = intelCopyTexImage2D;
|
||||||
|
functions->CopyTexSubImage1D = intelCopyTexSubImage1D;
|
||||||
|
functions->CopyTexSubImage2D = intelCopyTexSubImage2D;
|
||||||
|
}
|
||||||
|
@@ -551,7 +551,7 @@ intelTexImage(GLcontext * ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelTexImage3D(GLcontext * ctx,
|
intelTexImage3D(GLcontext * ctx,
|
||||||
GLenum target, GLint level,
|
GLenum target, GLint level,
|
||||||
GLint internalFormat,
|
GLint internalFormat,
|
||||||
@@ -568,7 +568,7 @@ intelTexImage3D(GLcontext * ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelTexImage2D(GLcontext * ctx,
|
intelTexImage2D(GLcontext * ctx,
|
||||||
GLenum target, GLint level,
|
GLenum target, GLint level,
|
||||||
GLint internalFormat,
|
GLint internalFormat,
|
||||||
@@ -584,7 +584,7 @@ intelTexImage2D(GLcontext * ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelTexImage1D(GLcontext * ctx,
|
intelTexImage1D(GLcontext * ctx,
|
||||||
GLenum target, GLint level,
|
GLenum target, GLint level,
|
||||||
GLint internalFormat,
|
GLint internalFormat,
|
||||||
@@ -600,12 +600,13 @@ intelTexImage1D(GLcontext * ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void intelCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level,
|
static void
|
||||||
GLint internalFormat,
|
intelCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level,
|
||||||
GLint width, GLint height, GLint border,
|
GLint internalFormat,
|
||||||
GLsizei imageSize, const GLvoid *data,
|
GLint width, GLint height, GLint border,
|
||||||
struct gl_texture_object *texObj,
|
GLsizei imageSize, const GLvoid *data,
|
||||||
struct gl_texture_image *texImage )
|
struct gl_texture_object *texObj,
|
||||||
|
struct gl_texture_image *texImage )
|
||||||
{
|
{
|
||||||
intelTexImage(ctx, 2, target, level,
|
intelTexImage(ctx, 2, target, level,
|
||||||
internalFormat, width, height, 1, border,
|
internalFormat, width, height, 1, border,
|
||||||
@@ -669,7 +670,8 @@ intel_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
|
static void
|
||||||
intelGetTexImage(GLcontext * ctx, GLenum target, GLint level,
|
intelGetTexImage(GLcontext * ctx, GLenum target, GLint level,
|
||||||
GLenum format, GLenum type, GLvoid * pixels,
|
GLenum format, GLenum type, GLvoid * pixels,
|
||||||
struct gl_texture_object *texObj,
|
struct gl_texture_object *texObj,
|
||||||
@@ -679,7 +681,8 @@ intelGetTexImage(GLcontext * ctx, GLenum target, GLint level,
|
|||||||
texObj, texImage, 0);
|
texObj, texImage, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
|
static void
|
||||||
intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
|
intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
|
||||||
GLvoid *pixels,
|
GLvoid *pixels,
|
||||||
struct gl_texture_object *texObj,
|
struct gl_texture_object *texObj,
|
||||||
@@ -689,6 +692,7 @@ intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
|
|||||||
texObj, texImage, 1);
|
texObj, texImage, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
|
intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
|
||||||
unsigned long long offset, GLint depth, GLuint pitch)
|
unsigned long long offset, GLint depth, GLuint pitch)
|
||||||
@@ -797,3 +801,16 @@ intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
|
|||||||
*/
|
*/
|
||||||
intelSetTexBuffer2(pDRICtx, target, GLX_TEXTURE_FORMAT_RGBA_EXT, dPriv);
|
intelSetTexBuffer2(pDRICtx, target, GLX_TEXTURE_FORMAT_RGBA_EXT, dPriv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
intelInitTextureImageFuncs(struct dd_function_table *functions)
|
||||||
|
{
|
||||||
|
functions->TexImage1D = intelTexImage1D;
|
||||||
|
functions->TexImage2D = intelTexImage2D;
|
||||||
|
functions->TexImage3D = intelTexImage3D;
|
||||||
|
functions->GetTexImage = intelGetTexImage;
|
||||||
|
|
||||||
|
functions->CompressedTexImage2D = intelCompressedTexImage2D;
|
||||||
|
functions->GetCompressedTexImage = intelGetCompressedTexImage;
|
||||||
|
}
|
||||||
|
@@ -117,10 +117,7 @@ intelTexSubimage(GLcontext * ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
intelTexSubImage3D(GLcontext * ctx,
|
intelTexSubImage3D(GLcontext * ctx,
|
||||||
GLenum target,
|
GLenum target,
|
||||||
GLint level,
|
GLint level,
|
||||||
@@ -132,18 +129,15 @@ intelTexSubImage3D(GLcontext * ctx,
|
|||||||
struct gl_texture_object *texObj,
|
struct gl_texture_object *texObj,
|
||||||
struct gl_texture_image *texImage)
|
struct gl_texture_image *texImage)
|
||||||
{
|
{
|
||||||
|
|
||||||
intelTexSubimage(ctx, 3,
|
intelTexSubimage(ctx, 3,
|
||||||
target, level,
|
target, level,
|
||||||
xoffset, yoffset, zoffset,
|
xoffset, yoffset, zoffset,
|
||||||
width, height, depth,
|
width, height, depth,
|
||||||
format, type, pixels, packing, texObj, texImage);
|
format, type, pixels, packing, texObj, texImage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
void
|
|
||||||
intelTexSubImage2D(GLcontext * ctx,
|
intelTexSubImage2D(GLcontext * ctx,
|
||||||
GLenum target,
|
GLenum target,
|
||||||
GLint level,
|
GLint level,
|
||||||
@@ -155,17 +149,15 @@ intelTexSubImage2D(GLcontext * ctx,
|
|||||||
struct gl_texture_object *texObj,
|
struct gl_texture_object *texObj,
|
||||||
struct gl_texture_image *texImage)
|
struct gl_texture_image *texImage)
|
||||||
{
|
{
|
||||||
|
|
||||||
intelTexSubimage(ctx, 2,
|
intelTexSubimage(ctx, 2,
|
||||||
target, level,
|
target, level,
|
||||||
xoffset, yoffset, 0,
|
xoffset, yoffset, 0,
|
||||||
width, height, 1,
|
width, height, 1,
|
||||||
format, type, pixels, packing, texObj, texImage);
|
format, type, pixels, packing, texObj, texImage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelTexSubImage1D(GLcontext * ctx,
|
intelTexSubImage1D(GLcontext * ctx,
|
||||||
GLenum target,
|
GLenum target,
|
||||||
GLint level,
|
GLint level,
|
||||||
@@ -182,10 +174,9 @@ intelTexSubImage1D(GLcontext * ctx,
|
|||||||
xoffset, 0, 0,
|
xoffset, 0, 0,
|
||||||
width, 1, 1,
|
width, 1, 1,
|
||||||
format, type, pixels, packing, texObj, texImage);
|
format, type, pixels, packing, texObj, texImage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
intelCompressedTexSubImage2D(GLcontext * ctx,
|
intelCompressedTexSubImage2D(GLcontext * ctx,
|
||||||
GLenum target,
|
GLenum target,
|
||||||
GLint level,
|
GLint level,
|
||||||
@@ -199,3 +190,14 @@ intelCompressedTexSubImage2D(GLcontext * ctx,
|
|||||||
fprintf(stderr, "stubbed CompressedTexSubImage2D: %dx%d@%dx%d\n",
|
fprintf(stderr, "stubbed CompressedTexSubImage2D: %dx%d@%dx%d\n",
|
||||||
width, height, xoffset, yoffset);
|
width, height, xoffset, yoffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
intelInitTextureSubImageFuncs(struct dd_function_table *functions)
|
||||||
|
{
|
||||||
|
functions->TexSubImage1D = intelTexSubImage1D;
|
||||||
|
functions->TexSubImage2D = intelTexSubImage2D;
|
||||||
|
functions->TexSubImage3D = intelTexSubImage3D;
|
||||||
|
functions->CompressedTexSubImage2D = intelCompressedTexSubImage2D;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user