static void r300TexImage3D(GLcontext * ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage) { driTextureObject *t = (driTextureObject *) texObj->DriverData; if (t) { driSwapOutTextureObject(t); } else { t = (driTextureObject *) r300AllocTexObj(texObj); if (!t) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); return; } } texImage->IsClientData = GL_FALSE; #if 0 if (r300ValidateClientStorage(ctx, target, internalFormat, width, height, format, type, pixels, packing, texObj, texImage)) { if (RADEON_DEBUG & DEBUG_TEXTURE) fprintf(stderr, "%s: Using client storage\n", __FUNCTION__); } else #endif { if (RADEON_DEBUG & DEBUG_TEXTURE) fprintf(stderr, "%s: Using normal storage\n", __FUNCTION__); /* Normal path: copy (to cached memory) and eventually upload * via another copy to GART memory and then a blit... Could * eliminate one copy by going straight to (permanent) GART. * * Note, this will call r300ChooseTextureFormat. */ _mesa_store_teximage3d(ctx, target, level, internalFormat, width, height, depth, border, format, type, pixels, &ctx->Unpack, texObj, texImage); t->dirty_images[0] |= (1 << level); } }
static void st_TexImage3D(struct gl_context * ctx, struct gl_texture_image *texImage, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const void *pixels, const struct gl_pixelstore_attrib *unpack) { prep_teximage(ctx, texImage, internalFormat, width, height, depth, border, format, type); _mesa_store_teximage3d(ctx, texImage, internalFormat, width, height, depth, border, format, type, pixels, unpack); }
static void intelTexImage3D( GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage ) { struct intel_texture_object *intelObj = intel_texture_object(texObj); _mesa_store_teximage3d(ctx, target, level, internalFormat, width, height, depth, border, format, type, pixels, &ctx->Unpack, texObj, texImage); intelObj->dirty_images[0] |= (1 << level); intelObj->dirty |= 1 << 0; }