RE: Possible problem in crStateTransformDiff (state_transform.c)
[email protected] Mon, 25 Jul 2005 15:20:22 -0600
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Brian,
Yes we're using VS .Net 2003.
As a side note - I had to change some of the nested case statements in pixel.c
into if-elses to get that to compile on a human time scale. I'll send a copy
when I get back to my dev box (if anyone's interested).
More importantly... I found the problem today!
It stems from diff_api.ActiveTextureARB pointing to a no-op function. I don't
have all the code in front of me right now, but the quick fix was to manually
change tilesortspu_diffapi.c such that the ActiveTextureARB function has the
right calling convention and args:
static void nop(void)
{
}
static void TILESORTSPU_APIENTRY tilesortspuDiffActiveTextureARB( GLenum
textureUnit ){
return;
}
void tilesortspuCreateDiffAPI( void )
{
SPUDispatchTable diff;
crSPUInitDispatchTable(&diff);
/* Note: state differencing should never involve calling a "glGet"
* function. So we set those pointers to NULL.
*/
diff.Accum = tilesort_spu.swap ? crPackAccumSWAP : crPackAccum;
/*diff.ActiveTextureARB = (ActiveTextureARBFunc_t) nop;*/
diff.ActiveTextureARB = tilesortspuDiffActiveTextureARB;
...
The optimizer must have taken the "nop" to the extreme - it probably optimized
it to nothing - which probably meant it wasn't cleaning up the stack properly...
When I get a chance, I'll take a look at the script that generates
tilesortspu_diff.c and put the fix in there.
The good news is that everything else seems to be working OK with optimizations
on! So I think the hard part is over! In general though, we'll have to be on
the lookout for more nop functions like that one.
Thanks,
Jon
Quoting "Wylie, Brian" <[email protected]>:
> Just an observation. If your compiling with Visual Studio .Net 2003, we
> have had some seriously dorky stuff happen with that optimizer. So just
> an FYI. :)
>
> Brian Wylie - Org 9227
> Sandia National Laboratories
> MS 0822 - Building 880/A1-J
> (505)844-2238 FAX(505)845-0833
> ____ _ __
> / __ \____ _________ | | / (_)__ _ __
> / /_/ / __ `/ ___/ __ `/ | / / / _ \ | /| / /
> / ____/ /_/ / / / /_/ /| |/ / / __/ |/ |/ /
> /_/ \__,_/_/ \__,_/ |___/_/\___/|__/|__/
>
> Unleash the Beast
>
>
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click