Luca, I haven't tried to probe crazy high numbers, but within reason, my experience is that the numbers are unconstrained. Certainly, within the range you're suggesting for gallium, there is no constraint in DX9. No doubt where there is a system-interpreted meaning attached to a semantic, that meaning will impose an interpretation on the index and that will imply a limit on the semantic index. For instance, in pixel shader outputs, COLOR[n] means a particular output is destined to be written to colorbuffer n. Nobody is saying there isn't a limit on the number of bound colorbuffers. By implication, the same limit already exists in gallium.
Now, your particular hardware has a additional limitation which is fairly unique, and you're pushing a change to gallium which would mimic the restrictions of your hardware. I'm not actually interested in adjusting gallium to the constraints of one particular driver, but *am* quite interested in finding a way to improve linkage issues across the hardware we support. If you take a look at i965, I think you'll see that the change you're suggesting does nothing to avoid retranslating vertex shaders on that platform. Likewise the software rasterizers and any driver relying on the draw module are currently jumping through hoops to emulate a routing table, which wouldn't be improved by your change. But your change does dramatically alter the meaning of one part of gallium and introduces a new raft of hardware capabilities we'd have to be checking and respecting in every state tracker. If we are going to adjust gallium, lets figure out a way to improve linkage generally. Adding a per-driver, per-semantic maximum index query just for the benefit of one driver doesn't strike me as a good trade-off. Keith ________________________________________ From: luca.barbi...@gmail.com [luca.barbi...@gmail.com] On Behalf Of Luca Barbieri [l...@luca-barbieri.com] Sent: Monday, February 01, 2010 9:15 AM To: Keith Whitwell Cc: mesa3d-dev@lists.sourceforge.net Subject: Re: [Mesa3d-dev] light_twoside RE: [PATCH] glsl: put varyings in texcoord slots > DX9 semantic indexes are apparently unlimited According to http://msdn.microsoft.com/en-us/library/ee418355%28VS.85%29.aspx, this is not the case. Here is the relevant text: << These semantics have meaning when attached to a vertex-shader parameters. These semantics are supported in both Direct3D 9 and Direct3D 10. [...] n is an optional integer between 0 and the number of resources supported. For example, POSITION0, TEXCOOR1, etc. [...] These semantics have meaning when attached to a pixel-shader input parameter. These semantics are supported in both Direct3D 9 and Direct3D 10. [...] n is an optional integer between 0 and the number of resources supported. For example, PSIZE0, COLOR1, etc. >> Thus, both DX9 and DX10 do not need arbitrary indices. OpenGL also doesn't, as fragment.texcoord[i] has i < GL_MAX_TEXTURE_COORDS_ARB. It seems to make sense to follow those APIs in the design of Gallium semantics. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev