Felix Kühling wrote:
Am Mo, den 20.12.2004 schrieb Keith Whitwell um 16:54:
[snip]

Hi Felix,

Your patch looks good to me. If you're looking for ways to avoid the indirect function call, probably the way to do it is to somehow try and get onto the DO_FALLBACK path. This is difficult for PTEX vertices as there is no GL state to say 'OK, I'm going to do PTEX vertices now', it is just based on what comes down the pipe, and we don't have a very good set of triggers for that.

But, if you could find a way to detect that you were expecting PTEX vertices, then the i915 driver (intel_tris.c, intel_atten_point()) might be a model for how to do this.


I had thought about this once, but then I got lost trying to figure out
when and in which order some driver callbacks get called by Mesa. And
since there was no Mesa state for projective textures anyway I gave it
up and took the easy way first.

Your comment made me try a little harder and now it works. :) It's quite
a mess though. I first tried to detect projective textures in
savageRunPipeline, but that doesn't work because apparently the
dimension of tex coords can change in the pipeline. I had a case where
2D texcoords went in and 4D (projective) texcoords came out of the
pipeline.

So now I check for the ptexHack in savageStartRender, and if the
ptexHack state bit changes I call savageChooseRenderSate again. This
works. I hope this is the last patch (attached). I'm going to commit it
after some more testing, unless you find some problem I overlooked.


Good stuff, Felix. I was going to talk about how it was potentially dangerous to be calling FALLBACK() from inside the RenderStart callback, but I see you've already found this out and dealt with it appropriately...


Keith


------------------------------------------------------- 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://productguide.itmanagersjournal.com/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to