Ian Romanick wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Roland Scheidegger wrote:
>> Roland Scheidegger wrote:
>>>> I thought there was a mechanism that allowed the driver to be
>>>> notified at glBegin (or similar) time.  It seems like you ought to be
>>>> able to emit some extra state at that time to change to / from
>>>> point-sprite mode.
>>> Ah, sounds like a plan. I thought the NotifyBegin would only be useful
>>> for vtxfmt-replace like things. I'll look into that.
>> That was too fast. The NotifyBegin will only be called if there is 
>> actually new state, otherwise the tnl module will simply keep adding new 
>> primitives.
> 
> I think the core should be modified to call NotifyBegin if there is new
> state *or* the primitive type changes.  Perhaps there should be a flag
> to request it being called in that case.


Basically for the hwtnl case you need to look at where you're emitting 
the drawing commands and inject the state right at that point.  For r200 
and ignoring the vtxfmt stuff, that means you need to modify the loop in 
  r200_run_tcl_render to emit the right state at the right time, 
depending on what primitive is about to be emitted.

The i965 driver is quite involved at this level as it has to change all 
sorts of stuff based on the primitive - the clipping algorithm obviously 
changes between points, lines and triangles, and so on.

Regular swtnl drivers also turn stuff on/off based on primtive, there is 
  quite a bit of mechanism in place for this already - have a look at 
eg. r128ChooseRenderState and r128RenderPrimitive/r128RasterPrimitive 
for details.

Keith


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to