Proprosed break in libGL / DRI driver ABI
Brian Paul
brian.paul at tungstengraphics.com
Wed Apr 6 21:02:04 PDT 2005
Roland Mainz wrote:
> Brian Paul wrote:
> [snip]
>
>>>What about making MAX_WIDTH and MAX_HEIGHT runtime-configurable - would
>>>that be possible (for stack allocations the Mesa code then has to depend
>>>on |alloca()|) ?
>>
>>Probably do-able, but a lot of work.
>
>
> Depends... if |alloca()| can safely be used on all platforms supported
> by Mesa then this should be no problem to implement. Alternatively the
> code could simply assume that the C compiler supports the C++ feature
> (BTW: Is this supported in C99, too ?) that an array can be dynamically
> sized at declaration (however that's less portable).
I don't want to create a dependency on C99's variable length arrays.
I'm also leary of alloca() since it's not in POSIX.
"grep MAX_WIDTH src/mesa/*/*.[ch] | wc" shows there's about 160
occurances of MAX_WIDTH that would have to be changed for dynamic
allocation. A lot of work.
-Brian
More information about the xorg-arch
mailing list