From: <ma...@co...> - 2005-07-25 21:20:03
|
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" <bn...@sa...>: > 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 > > |