On Tue, Feb 9, 2010 at 10:48 PM, Brian Paul <bri...@vmware.com> wrote:
> Pauli Nieminen wrote:
>>
>> MAX_COMBINED_TEXTURE_IMAGE_UNITS fix[1] is not taking account drivers
>> wihtout support for ARB_vertex_shader should support. Current
>> implementation makes all older drivers to allow glActiveTexture call
>> for up to 32 texture units which is clearly wrong.
>
> All drivers should set the ctx->Const.MaxCombinedTextureImageUnits constant.
>
> For older drivers, it should probably be equal to
> ctx->Const.MaxTextureCoordUnits.
>
> Perhaps you could submit a patch that fixes this?
>

Looks like a lot of code duplication. Can we do it in single place in
core mesa if driver doesn't set any value for MacCombined. Same for
any other constant that is required by some updated or extension of
OGL.

possible code flow idea:
1. Common code sets optional constants to -1
2. Driver sets constant that it supports in context creation
3. Common code sets all remaining constant that are required
internally by mesa to good defaults.
4. In debug build warn about missing constant that driver should set.
(would help catching bugs like I just found from radeon that one of
constants was not set in driver)

This would remove requirement to change old drivers if core mesa
requires a new (optional) constant for a new feature.

In this case sensible default would 0 for drivers not supporting glsl.

>
>> I don't know what specs says about number of texture units. But my
>> guess is that it should match GL_MAX_TEXTURE_UNITS_ARB.
>
> Not necessarily.  See the spec for details.

yes

>
> -Brian
>

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to