Re: gl calls before context set up = crash!
Brian Paul <[email protected]> Tue, 01 Mar 2005 17:21:53 -0700
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
I can add the two lines you listed below, but I guess I don't
understand why the no-op functions aren't working as-is.
In NULLfuncs.c the glim table is statically initialized:
/* Declare and initialize the glim dispatch table here so that we */
/* can initialize all entries to no-op routines. */
SPUDispatchTable glim = {
NULL_Accum,
NULL_ActiveTextureARB,
NULL_AlphaFunc,
NULL_AreProgramsResidentNV,
[...]
That _should_ be sufficient. Perhaps I'm missing some subtle aspect
of the Windows code though.
-Brian
[email protected] wrote:
> Hi Brian and Greg,
>
> The function stubInit apparently gets glim initialized, but it is only called
> (on Windows anyway) from the functions in wgl.c which have to do with context
> creation, etc... So glim isn't initialized to the null funcs at load time...
>
> But if you add the following to DllMain at the Bottom of load.c this seems to
> do the trick:
>
> crSPUInitDispatchTable( &glim );
> crSPUCopyDispatchTable(&glim, &stubNULLDispatch);
>
> Now the 3rd-party app gets far enough to say it can't get a PixelFormat it
> likes.. But we'll take it from there for now!
>
> Thanks,
> Jon
>
> ps. If noone has seen the bug report on sourceforge, I'm pretty sure that
> the "params" array in tilesortspu_stereo.c should be 18 elements long rather
> than 17. It's at line 109 in the version I have.
>
>
>
>
>
> Quoting Brian Paul <[email protected]>:
>
>
>>Initially, all functions are supposed to jump into no-op functions.
>>
>>In the NULLfuncs.c file, when we declare (define?) the glim table, we
>>initialize all the pointers to no-op functions.
>>
>>Jonathan, could you use a debugger to examine the value of
>>glim.SomeFunc to make sure it points to a null/no-op function?
>>
>>-Brian
>>
>>Greg Humphreys wrote:
>>
>>>I'm pretty sure that at some point in the past glim was set up to
>>>point to the NOP spu, which was always loaded by default. Has this
>>>changed?
>>>
>>>
>>>On Fri, 25 Feb 2005 19:46:15 -0700, [email protected]
>>><[email protected]> wrote:
>>>
>>>
>>>>Hi all,
>>>>
>>>>My research group is working on some modifications to Cr to allow
>>
>>head-tracked
>>
>>>>stereo for CAVE-type environments and we've had some good success!
>>>>
>>>>But I've run into a nasty problem: we're running a 3rd-party client app
>>
>>that's
>>
>>>>very naughty... It appears to be calling gl calls before setting up its
>>>>rendering context.
>>>>
>>>>We're working on Windows, starting from the 1.7 release code (I know, I
>>
>>should
>>
>>>>probably grab what's in CVS...) and the functions in windows_exports.c
>>>>typically do the following:
>>>>
>>>>NAKED void cr_SomeFunc( argsGoHere )
>>>>{
>>>> __asm jmp [glim.SomeFunc]
>>>> UNUSED( argsGoHere );
>>>>}
>>>>
>>>>I haven't dug too far into this yet, but I think this blind jmp is the
>>>>problem, since glim hasn't been set up yet. We would either need to test
>>
>>for
>>
>>>>this or glim needs to be set up sooner...
>>>>
>>>>Can anyone comment on what would be involved in getting a high-performance
>>>>work-around going for this degenerate case!
>>>>
>>>>Thanks,
>>>>Jon
>>>>
>>>>Jonathan Marbach
>>>>BP Center for Visualization
>>>>3400 Marine St.
>>>>Boulder, CO 80218
>>>>www.bpvizcenter.com
>>>>
>>>>-------------------------------------------------------
>>>>SF email is sponsored by - The IT Product Guide
>>>>Read honest & candid reviews on hundreds of IT Products from real users.
>>>>Discover which products truly live up to the hype. Start reading now.
>>>>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>>>>_______________________________________________
>>>>Chromium-dev mailing list
>>>>[email protected]
>>>>https://lists.sourceforge.net/lists/listinfo/chromium-dev
>>>>
>>>>
>>>
>>>
>>>
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Chromium-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/chromium-dev
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click