Bug 13656 - glCompressedTexImage2DARB/glGetTexImage: texture format not set correctly
Summary: glCompressedTexImage2DARB/glGetTexImage: texture format not set correctly
Status: RESOLVED DUPLICATE of bug 13830
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/FFB (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-14 05:29 UTC by Jacek
Modified: 2009-08-24 12:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jacek 2007-12-14 05:29:39 UTC
The following (1., 2.) sequence (level = 1):
0. ...
1. glTexImage2D(GL_TEXTURE_2D, level, internalFormat_a = GL_RGB, ..., *image) //  wipe out the existing texture image
2. glCompressedTexImage2DARB(GL_TEXTURE_2D, level, internalFormat_b = GL_COMPRESSED_RGB_S3TC_DXT1_EXT , ..., *image)

causes that the following:
3. glGetTexImage            (GL_TEXTURE_2D, level, ..., *image)

returns the texture image (sets, e.g.  the FetchTexel2Df), assuming texture's internalFormat_a (internally: texformat_argb8888) instead of internalFormat_b (internally: texformat_rgb_dxt1). If level = 0, the example works O.K.
Comment 1 Jacek 2007-12-17 06:00:07 UTC
The problem is caused by the fact, that the texImage->FetchTexelf ptr is not re-initialized to a new value (depending on the internalFormat arg of glCompressedTexImage2DARB) in the following calls sequence:

_mesa_CompressedTexImage2DARB()-> _mesa_get_tex_image()
                               -> _mesa_init_teximage_fields()
Comment 2 Jacek 2007-12-17 06:00:53 UTC
The problem is caused by the fact, that the texImage->FetchTexelf ptr is not
re-initialized to a new value (depending on the internalFormat arg of
glCompressedTexImage2DARB) in the following calls sequence:

_mesa_CompressedTexImage2DARB()-> _mesa_get_tex_image()
                               -> _mesa_init_teximage_fields()
Comment 3 Jacek 2007-12-27 05:31:21 UTC

*** This bug has been marked as a duplicate of bug 13830 ***
Comment 4 Adam Jackson 2009-08-24 12:28:44 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.