Bug 4331 - 16 Bits per Channel Compile on GL_EXT_texture_compression_fxt1
Summary: 16 Bits per Channel Compile on GL_EXT_texture_compression_fxt1
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-01 00:34 UTC by Roy Walmsley
Modified: 2009-08-24 12:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Roy Walmsley 2005-09-01 00:34:34 UTC
I set CHAN_BITS to 16 in config.h. Then using MSVC6 I compiled the mesa 
project. On compilation there were 11 warnings of which 9 related to the 
summary above. I will detail the first one - the next 3 are similar.

On line 180 of file texcompress_fxt1.c there is a function call to 
fxt1_decode_1. The last arguments, texel, is a GLchan *, which due to my 
setting of CHAN_BITS, is typedef'd to unsigned short *. However, in the 
function declaration on line 49 and definition on line 1638 of the same file 
the final argument rgba is defined as GLubyte *. These types are therefore 
incompatible.

On line 1367 of the same file the final argument newSource, which is defined as 
GLubyte * on line 1357, is passed to the function _mesa_upscale_teximage2d. 
However this parameter is (correctly?) defined as GLchan * in the declaration 
and definition of the function in texstore.h/texstore.c.

Similarly in the file texcompress_s3tc.c line 175 the fourth argument pixels is 
defined as GLchan *. However in the function typedef on line 72 this parameter 
is declared as GLubyte *. The remaining three instances are similar.
Comment 1 Brian Paul 2005-09-10 09:21:39 UTC
I've fixed this in CVS.  Thanks.
Comment 2 Roy Walmsley 2005-09-12 04:33:22 UTC
(In reply to comment #1)
> I've fixed this in CVS.  Thanks.

In file texcompress_fxt1.c line 1663 you have redefined the local variables 
r,g,b and a (see line 1609). Presumably this second definition is not required 
as they will go out of scope at the end of the block (line 1672) and the values 
from the original declaration will be transferred. Roy
Comment 3 Brian Paul 2005-09-12 06:59:48 UTC
Thanks for catching that.  Fixed now.
Comment 4 Adam Jackson 2009-08-24 12:23:24 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.