This seems like a very different idea of semantics. These aren't intended to be hardware resources, and there is no concept of querying the driver to figure out how many the hardware supports. Further, the indices for different semantic names are considered to be disjoint, permitting FOG[0], COLOR[0] and GENERIC[0], each of which would potentially consume an interpolator on some hardware, subverting the idea of a maximum semantic index.
There's currently no concept of driver-specified maximum semantic indexes, and I don't think it's the right direction to be taking things. If we are going to have a limit, it would be on the total number of inputs/outputs from a given stage, not the way that individual ones are labelled. I think if you want to improve linkage semantics, some of your other suggestions are more promising. I'd like to dig into those a little more if that's ok. Keith ________________________________________ From: luca.barbi...@gmail.com [luca.barbi...@gmail.com] On Behalf Of Luca Barbieri [l...@luca-barbieri.com] Sent: Monday, February 01, 2010 6:11 AM To: Keith Whitwell Cc: Brian Paul; mesa3d-dev@lists.sourceforge.net Subject: Re: [PATCH] glsl: put varyings in texcoord slots > In GL, there doesn't seem to be a requirement for sequential usage - an app > using ARB_vp/fp could explicitly pass TEXCOORD[10] and ignore 0..9 if it > wanted to. In ARB_vp, that effectively means the shader would be using > discontiguous register numbers, ie OUTPUT[0], OUTPUT[10], etc. Yes, but TEXCOORD[10] will only work if the hardware supports 11 textures. > > In DX9, there is also no requirement for sequential usage - an app can use > TEXCOORD[1] without [0], or COLOR[0] and [2] without [1] or [3]. I would > expect any DX9 gallium state tracker would also end up using non-sequential > indices if it directly translated DX9 semantics to gallium. I think there is some terminology confusion. I'm not proposing to require indices to be "sequential" in the way you are describing. By "sequential" I mean that if the hardware supports 8 interpolators, then the available semantic indices should run from 0 to 7. Thus, the *available* semantic indices are sequential, but the user is free to use any subset of them. So you can start with OUTPUT[10], but only if at least 11 interpolators are supported (so that the used set {10} is a subset of the available set [0-10]). ------------------------------------------------------------------------------ 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