Am Thursday 27 August 2009 03:19:01 schrieb Ian Romanick:
> Brian Paul wrote:
> > Ian Romanick wrote:
> >> From: Ian Romanick <[email protected]>
> >>
> >> Several changes are made to program parameter limits.  Several of the
> >> non-NATIVE limits are set higher.  All of the NATIVE limits are set to
> >> zero in the core Mesa code.  Each driver must set the actual value in
> >> its context creation routine.  If the NATIVE value remains zero, this
> >> indicates that hardware shaders may not be supported.
> >>
> >> Each of the preceeding changes matches the bahavior of Apple's shader
> >> assembler, so it seems safe.
> >>
> >> Finally, we limit the value of MaxEnvParams to be no greater than
> >> MaxNativeAttribs.  At least one case has been found where an
> >> application does the wrong thing if MaxNativeAttribs < MaxEnvParams.
> >>
> >> See also bugzilla #23490.
> >
> > Looks good, Ian.  Just curious: what app(s) actually query these limits?
>
> I don't know for sure.  Unlike figuring out which extensions are used by
> an application, there isn't way to externally (i.e., using strings and
> grep) check this.  Any app that uses more that the defined minimum
> maximums damn well should!

Most applications probably don't do it because those native limits aren't 
actually that useful.

For example: In the r300 driver, we set the native instruction limit to the 
number of instruction slots available. However, if you use a lot of non-native 
instructions like SIN, COS, or LRP, you might need more instruction slots even 
though the number of assembly instructions is well below the native limit. 
Conversely, instructions can sometimes be paired so that only a single 
instruction slot is required for two instructions, which can raise the 
effective native instruction count.

Similar considerations apply to temporaries limits (even ignoring 
optimizations done by the driver, the R300 vertex processor has two different 
kinds of temporary registers!).

There really isn't a good way to expose all these hardware-specific oddities 
to applications. So the best thing they can do is trying to compile and then 
checking afterwards. Of course, applications that fail to check whether a 
program actually compiled successfully to be native makes me sad.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to