Home | History | Annotate | Download | only in main

Lines Matching refs:InternalFormat

773    img->InternalFormat = 0;
799 * \param internalFormat internal format.
811 GLint border, GLenum internalFormat,
822 img->_BaseFormat = _mesa_base_tex_format( ctx, internalFormat );
824 img->InternalFormat = internalFormat;
920 GLint border, GLenum internalFormat,
924 internalFormat, format, 0, GL_TRUE);
1413 * if <internalformat> is TEXTURE_CUBE_MAP_ARRAY and the
1415 * <internalformat> is TEXTURE_3D and the "3D Tex." column of table
1418 * The instances of <internalformat> above should say <target>.
1427 * two-dimensional images. If internalformat is an ETC2/EAC format,
1632 * \param internalFormat Internal format of the texture image
1638 GLenum target, GLenum internalFormat)
1640 if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT
1641 || _mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_STENCIL
1642 || _mesa_base_tex_format(ctx, internalFormat) == GL_STENCIL_INDEX) {
1685 texture_formats_agree(GLenum internalFormat,
1699 _mesa_is_depth_format(internalFormat) ||
1700 _mesa_is_depthstencil_format(internalFormat);
1708 if (_mesa_is_color_format(internalFormat) && !colorFormat && !indexFormat)
1715 if (_mesa_is_ycbcr_format(internalFormat) != _mesa_is_ycbcr_format(format))
1728 * \param internalFormat internal format given by the user.
1738 GLenum type, GLenum internalFormat,
1745 internalFormat);
1748 "%s(format = %s, type = %s, internalformat = %s)",
1751 _mesa_enum_to_string(internalFormat));
1775 * \param internalFormat internal format given by the user.
1796 GLint level, GLint internalFormat,
1840 * "Specifying a value for internalformat that is not one of the
1853 /* Check internalFormat */
1854 if (_mesa_base_tex_format(ctx, internalFormat) < 0) {
1856 "glTexImage%dD(internalFormat=%s)",
1857 dimensions, _mesa_enum_to_string(internalFormat));
1862 * combinations of format, internalFormat, and type that can be used.
1867 texture_format_error_check_gles(ctx, format, type, internalFormat,
1880 if (!texture_formats_agree(internalFormat, format)) {
1882 "glTexImage%dD(incompatible internalFormat = %s, format = %s)",
1883 dimensions, _mesa_enum_to_string(internalFormat),
1889 if (internalFormat == GL_YCBCR_MESA) {
1920 if (!_mesa_legal_texture_base_format_for_target(ctx, target, internalFormat)) {
1927 if (_mesa_is_compressed_format(ctx, internalFormat)) {
1929 if (!_mesa_target_can_be_compressed(ctx, target, internalFormat, &err)) {
1934 if (_mesa_format_no_online_compression(ctx, internalFormat)) {
1949 _mesa_is_enum_format_integer(internalFormat))) {
1976 GLenum internalFormat, GLsizei width,
1985 if (!_mesa_target_can_be_compressed(ctx, target, internalFormat, &error)) {
1990 /* This will detect any invalid internalFormat value */
1991 if (!_mesa_is_compressed_format(ctx, internalFormat)) {
1993 "glCompressedTexImage%dD(internalFormat=%s)",
1994 dimensions, _mesa_enum_to_string(internalFormat));
2005 switch (internalFormat) {
2032 expectedSize = _mesa_cpal_compressed_size(level, internalFormat,
2056 expectedSize = compressed_tex_size(width, height, depth, internalFormat);
2061 if (_mesa_base_tex_format(ctx, internalFormat) < 0) {
2062 reason = "internalFormat";
2179 * combinations of format, internalFormat, and type that can be used.
2185 texImage->InternalFormat,
2204 if (_mesa_format_no_online_compression(ctx, texImage->InternalFormat)) {
2232 * \param internalFormat internal format given by the user.
2245 GLenum target, GLint level, GLint internalFormat,
2296 * internalFormat.
2299 switch (internalFormat) {
2308 "glCopyTexImage%dD(internalFormat=%s)", dimensions,
2309 _mesa_enum_to_string(internalFormat));
2317 * "Parameters level, internalformat, and border are specified using
2319 * arguments of TexImage2D, except that internalformat may not be
2322 if (internalFormat >= 1 && internalFormat <= 4) {
2324 "glCopyTexImage%dD(internalFormat=%d)", dimensions,
2325 internalFormat);
2330 baseFormat = _mesa_base_tex_format(ctx, internalFormat);
2333 "glCopyTexImage%dD(internalFormat=%s)", dimensions,
2334 _mesa_enum_to_string(internalFormat));
2338 rb = _mesa_get_read_renderbuffer_for_format(ctx, internalFormat);
2345 rb_internal_format = rb->InternalFormat;
2346 rb_base_format = _mesa_base_tex_format(ctx, rb->InternalFormat);
2347 if (_mesa_is_color_format(internalFormat)) {
2350 "glCopyTexImage%dD(internalFormat=%s)", dimensions,
2351 _mesa_enum_to_string(internalFormat));
2371 internalFormat == GL_RGB9_E5) {
2374 if (internalFormat == GL_RGB9_E5) {
2379 "glCopyTexImage%dD(internalFormat=%s)", dimensions,
2380 _mesa_enum_to_string(internalFormat));
2394 if (_mesa_get_linear_internalformat(internalFormat) != internalFormat) {
2405 * is LINEAR (see section 6.1.13) and internalformat is
2408 * SRGB and internalformat is not one of the sRGB formats."
2419 if (_mesa_is_enum_format_snorm(internalFormat)) {
2421 "glCopyTexImage%dD(internalFormat=%s)", dimensions,
2422 _mesa_enum_to_string(internalFormat));
2436 * if the texture internalformat is an integer format and the read color
2437 * buffer is not an integer format, or if the internalformat is not an
2440 if (_mesa_is_color_format(internalFormat)) {
2441 bool is_int = _mesa_is_enum_format_integer(internalFormat);
2443 bool is_unorm = _mesa_is_enum_format_unorm(internalFormat);
2451 _mesa_is_enum_format_unsigned_int(internalFormat) !=
2473 if (_mesa_is_compressed_format(ctx, internalFormat)) {
2475 if (!_mesa_target_can_be_compressed(ctx, target, internalFormat, &err)) {
2480 if (_mesa_format_no_online_compression(ctx, internalFormat)) {
2566 if (_mesa_format_no_online_compression(ctx, texImage->InternalFormat)) {
2573 if (texImage->InternalFormat == GL_YCBCR_MESA) {
2588 * CopyTexSubImage* if the texture internalformat is an integer format
2590 * internalformat is not an integer format and the read color buffer
2593 if (_mesa_is_color_format(texImage->InternalFormat)) {
2708 override_internal_format(GLenum internalFormat, GLint width, GLint height)
2711 if (internalFormat == GL_RGBA16F_ARB ||
2712 internalFormat == GL_RGBA32F_ARB) {
2716 else if (internalFormat == GL_RGB16F_ARB ||
2717 internalFormat == GL_RGB32F_ARB) {
2721 else if (internalFormat == GL_LUMINANCE_ALPHA16F_ARB ||
2722 internalFormat == GL_LUMINANCE_ALPHA32F_ARB) {
2726 else if (internalFormat == GL_LUMINANCE16F_ARB ||
2727 internalFormat == GL_LUMINANCE32F_ARB) {
2731 else if (internalFormat == GL_ALPHA16F_ARB ||
2732 internalFormat == GL_ALPHA32F_ARB) {
2737 else if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) {
2738 internalFormat = GL_RGBA;
2742 return internalFormat;
2745 return internalFormat;
2762 GLenum internalFormat, GLenum format, GLenum type)
2775 prevImage->InternalFormat == internalFormat) {
2785 if (internalFormat != format && format != GL_NONE) {
2786 const GLenum before = internalFormat;
2788 switch (internalFormat) {
2791 internalFormat = GL_COMPRESSED_RGB;
2797 internalFormat = GL_COMPRESSED_RGBA;
2803 if (before != internalFormat) {
2809 _mesa_enum_to_string(internalFormat));
2814 f = ctx->Driver.ChooseTextureFormat(ctx, target, internalFormat,
2877 GLenum target, GLint level, GLint internalFormat,
2897 _mesa_enum_to_string(internalFormat),
2904 _mesa_enum_to_string(internalFormat),
2910 internalFormat = override_internal_format(internalFormat, width, height);
2922 internalFormat,
2928 if (texture_error_check(ctx, dims, target, level, internalFormat,
2939 switch (internalFormat) {
2950 _mesa_cpal_compressed_teximage2d(target, level, internalFormat,
2962 * image data. The internalFormat was error checked earlier.
2964 texFormat = _mesa_glenum_to_compressed_format(internalFormat);
2970 if (_mesa_is_gles(ctx) && format == internalFormat) {
2977 internalFormat = adjust_for_oes_float_texture(ctx, format, type);
2981 internalFormat, format, type);
3005 border, internalFormat, texFormat);
3027 _mesa_enum_to_string(internalFormat));
3057 border, internalFormat, texFormat);
3088 _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
3093 teximage(ctx, GL_FALSE, 1, target, level, internalFormat, width, 1, 1,
3099 _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
3105 teximage(ctx, GL_FALSE, 2, target, level, internalFormat, width, height, 1,
3115 _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
3121 teximage(ctx, GL_FALSE, 3, target, level, internalFormat,
3128 _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat,
3133 _mesa_TexImage3D(target, level, (GLint) internalFormat, width, height,
3582 GLenum internalFormat,
3586 if (texImage->InternalFormat != internalFormat)
3604 GLenum target, GLint level, GLenum internalFormat,
3619 _mesa_enum_to_string(internalFormat),
3625 if (copytexture_error_check(ctx, dims, target, level, internalFormat,
3640 internalFormat, GL_NONE, GL_NONE);
3648 if (texImage && can_avoid_reallocation(texImage, internalFormat, texFormat,
3660 rb = _mesa_get_read_renderbuffer_for_format(ctx, internalFormat);
3663 if (_mesa_is_enum_format_unsized(internalFormat)) {
3667 if (rb->InternalFormat == GL_RGB10_A2) {
3675 * "If internalformat is sized, the internal format of the new texel
3676 * array is internalformat, and this is also the new texel array?s
3677 * effective internal format. If the component sizes of internalformat
3680 * INVALID_OPERATION error is generated. If internalformat is unsized,
3727 border, internalFormat, texFormat);
3758 GLenum internalFormat,
3763 copyteximage(ctx, 1, target, level, internalFormat, x, y, width, 1, border);
3769 _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
3774 copyteximage(ctx, 2, target, level, internalFormat,
4021 GLenum internalFormat = texImage->InternalFormat;
4030 if (_mesa_is_compressed_format(ctx, internalFormat)) {
4047 if (!texture_formats_agree(internalFormat, format)) {
4049 "%s(incompatible internalFormat = %s, format = %s)",
4051 _mesa_enum_to_string(internalFormat),
4448 if ((GLint) format != texImage->InternalFormat) {
4481 GLenum internalFormat, GLsizei width,
4486 teximage(ctx, GL_TRUE, 1, target, level, internalFormat,
4493 GLenum internalFormat, GLsizei width,
4498 teximage(ctx, GL_TRUE, 2, target, level, internalFormat,
4505 GLenum internalFormat, GLsizei width,
4510 teximage(ctx, GL_TRUE, 3, target, level, internalFormat,
4818 get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
4821 switch (internalFormat) {
4909 switch (internalFormat) {
4921 switch (internalFormat) {
4999 GLenum internalFormat)
5001 mesa_format format = get_texbuffer_format(ctx, internalFormat);
5044 GLenum internalFormat,
5064 format = _mesa_validate_texbuffer_format(ctx, internalFormat);
5066 _mesa_error(ctx, GL_INVALID_ENUM, "%s(internalFormat %s)",
5067 caller, _mesa_enum_to_string(internalFormat));
5076 texObj->BufferObjectFormat = internalFormat;
5171 _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
5195 texture_buffer_range(ctx, texObj, internalFormat, bufObj, 0,
5202 _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
5242 texture_buffer_range(ctx, texObj, internalFormat, bufObj,
5247 _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer)
5269 texture_buffer_range(ctx, texObj, internalFormat,
5274 _mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer,
5314 texture_buffer_range(ctx, texObj, internalFormat,
5319 _mesa_is_renderable_texture_format(struct gl_context *ctx, GLenum internalformat)
5324 GLenum baseFormat = _mesa_base_fbo_format(ctx, internalformat);
5355 GLint internalformat, GLsizei width,
5393 /* check that the specified internalformat is color/depth/stencil-renderable;
5397 if (immutable && !_mesa_is_legal_tex_storage_format(ctx, internalformat)) {
5399 "%s(internalformat=%s not legal for immutable-format)",
5400 func, _mesa_enum_to_string(internalformat));
5404 if (!_mesa_is_renderable_texture_format(ctx, internalformat)) {
5413 _mesa_error(ctx, GL_INVALID_ENUM, "%s(internalformat=%s)", func,
5414 _mesa_enum_to_string(internalformat));
5419 internalformat, samples);
5450 internalformat, GL_NONE, GL_NONE);
5462 internalformat, texFormat,
5491 internalformat, texFormat,
5519 GLenum internalformat, GLsizei width,
5530 internalformat, width, height, 1,
5538 GLenum internalformat, GLsizei width,
5550 internalformat, width, height, depth,
5572 GLenum internalformat, GLsizei width,
5586 internalformat, width, height, 1,
5593 GLenum internalformat, GLsizei width,
5608 internalformat, width, height, depth,
5615 GLenum internalformat, GLsizei width,
5631 internalformat, width, height, 1,
5638 GLenum internalformat, GLsizei width,
5655 internalformat, width, height, depth,