Cg and the meeting notes

KimB

Legend
Well, there obviously wasn't much about Cg in those meeting notes, but this did look intriguing to me:

Bill Licea-Kane reported vigorous activity on the mailing list. Main accomplishments: accepted contributions with signed contributor agreements from 3Dlabs & NVIDIA, and decided to use glslang as the basis for the HLSL. Now merging issues from both glslang and Cg drafts into a single issues list. Working hard to conclude draft spec by end of CY 2002.

Why are the issues between glslang and Cg being merged into a single issues list? If glslang has been selected as the basis for the HLSL, why is Cg of consequence? I can only assume that those directly involved with working on GL2 have decided to keep some aspects of Cg, or that nVidia thought it was to their benefit to modify Cg to be more conforming with GL2 (Personally, I hope very much that Cg and glslang are both merged into one language...one that doesn't just work in OpenGL2...).
 
I hope very much that Cg and glslang are both merged into one language...one that doesn't just work in OpenGL2...).

Well aren't those the intentions of Nvidia for Cg(they don't even want to merge at all, but use their language exclusively instead of glslang, and it certainly looks like it is not gonna work. Remember the key word is OPEN gl not Nvidia GL or HLSL
 
gkar1, why not drop the anti-NVidia BS in your posts?

NVidia actually contributed valuable concepts, some of those ideas (like profiles and precision hinting) are being absorbed into MS DX9 HLSL and 3dLab's proposal.

This is the normal standards process. Vendors start out with proprietary extensions, languages, libraries, etc (because real implementations must come first in real products before standards exist) and then standards committees hammer out the differences and adopt useful features and concepts from each of the participants.

Why must you continue to persist in your NVidia == evicampaign. They have every right to create a proprietary language or extension for their hardware in development just as 3dLabs invented their HLSL to support the capabilities of the P10 hardware that was in development long before it became an OpenGL proposal.

OpenGL's final HLSL will draw from many sources -- 3dLabs HLSL, Cg, RenderMan, C/C++, etc the the final standard reflecting the input of everyone within the ARB and ideas drawn from outside sources. It will not be the singular invention or creation of any one company or person.

Syntactically and semantically, Cg and 3dLabs HLSL are nearly identical. I made a post in another thread detailing the few minor differences. Most of the differences will go away over the time and the situation will eventually resemble the situation with C/C++ compilers today which have proprietary keyword extensions. (e.g. __X stuff)

It's not worth fussing over, so please, drop the BS.
 
To illustrate how close all of the proposed languages are, at Siggraph 3dlab's Randi Rost asked the audience if they would mind having to use a Perl conversion script to go from one language to another should the companies not be able to work out their differences. I'm not sure if he was serious or jesting, but his point was that the languages are nearly identical functionally.
 
DemoCoder said:
gkar1, why not drop the anti-NVidia BS in your posts?

NVidia actually contributed valuable concepts, some of those ideas (like profiles and precision hinting) are being absorbed into MS DX9 HLSL and 3dLab's proposal.

This is the normal standards process. Vendors start out with proprietary extensions, languages, libraries, etc (because real implementations must come first in real products before standards exist) and then standards committees hammer out the differences and adopt useful features and concepts from each of the participants.

Why must you continue to persist in your NVidia == evicampaign. They have every right to create a proprietary language or extension for their hardware in development just as 3dLabs invented their HLSL to support the capabilities of the P10 hardware that was in development long before it became an OpenGL proposal.

OpenGL's final HLSL will draw from many sources -- 3dLabs HLSL, Cg, RenderMan, C/C++, etc the the final standard reflecting the input of everyone within the ARB and ideas drawn from outside sources. It will not be the singular invention or creation of any one company or person.

Syntactically and semantically, Cg and 3dLabs HLSL are nearly identical. I made a post in another thread detailing the few minor differences. Most of the differences will go away over the time and the situation will eventually resemble the situation with C/C++ compilers today which have proprietary keyword extensions. (e.g. __X stuff)
It's not worth fussing over, so please, drop the BS.



Huh?

What i don't like is the encroachment of a single IHV onto an API menat to be free, trying to sway the industry their way. Then "licensing" it by a "modest" fee.
Its as if some politician was trying to pass a law forcing you to drive on the left side of the road and would charge you a fee for it, while all along driving on the right side of the road is already free and the norm.


3dcgi said:
To illustrate how close all of the proposed languages are, at Siggraph 3dlab's Randi Rost asked the audience if they would mind having to use a Perl conversion script to go from one language to another should the companies not be able to work out their differences. I'm not sure if he was serious or jesting, but his point was that the languages are nearly identical functionally.

Exactly, if they are so similar why go to the option that Nvidia offers. Sure they can incorporate the best ideas of the language, but not adopt it as a replacement. Its as if a doctor were offered a new technique of doing surgery but only able to practice it by being forced to use the surgical instruments provided by the inventors of the new technique(and for a fee).
 
It has already been done. Cg has been incorporated into Microsoft's HLSL. It is effectively a near subset of DX9 HLSL. NVidia's Cg then, is just a compiler for DX9 HLSL that can target OpenGL as a profile as well as DX9 shaders. I bet Microsoft's FXC compiler could compile Cg shaders with minimally tweaking.

I have been hammering away on this point almost since Cg was released, but you guys still don't accept it. NVidia's Cg is first and foremost, a tool -- a runtime library + a compiler. The Cg "language" is really immaterial since all of the various C-subsets are effectively identical.

NVidia could produce a Cg compiler and runtime that works with both 3dLabs's language AND Microsoft's DX9 HLSL (which is, in fact, fully compatible with NVidia's Cg language spec) and still call it "Cg". I would bet that Nvidia has no real attachment to controlling the language, but is more interesting in producing the most optimal HLSL compiler with the best run-time tools so that developers primarily want to use NV30 cards to develop on.

Before DX9 HLSL and OGL2.0 hits the market, Nvidia needed a high level tool to expose and enable development for their next-gen NV30. They had no other option but to create Cg, the same way 3dLabs had no other option but to create Glslang for the P10.
 
I'm just hoping that OpenGL will keep the primary benefit of glslang, which is, in my mind, the idea that the language should be standardized, not the assembly-level instruction set.

Anyway, if the two languages are almost identical on the syntax side, then I see great things for Cg...it could be the first real unifying force between OpenGL and Direct3D, making for better inter-platform development.

Oh, and by the way, if nVidia manages to succesfully make the HLSL's used for OpenGL and Direct3D identical, or nearly so, then ATI will put out their own version of Cg for compiling to their own hardware (though they probably won't call it Cg...as a matter of pride or, more nicely-stated, a matter of PR).
 
I doubt glslang and DX9 HLSL will be harmonized that much. The basic subsets of C they use are similar. They name their primitive datatypes differently (vec3 vs float3, etc) and differ on the basic way parameters are passed to and from functions (cg/dx9 = pass/return a struct by value, glslang = pass/return primitive datatypes by reference) I doubt MS/Nvidia are going to rename their primitives, so ARB would have to rename them. Also, ARB would also have to add STRUCT, hints, profiles, and pass-by-value. The swizzling syntax and type-promotion rules would have to be harmonized as well.

DX9 HLSL is imminent, so I doubt they will change this close to release. ARB might not change out of anti MS/Nvidia politics, or simply because they don't care if they are in harmony with MS. GL advocates (of which I am one) have always sort of cast a nasty look at DirectX.

However, all is not lost because it would be relatively easy to write a translator to convert between them. Moreover, the compiler could do it quite easy as well. I fully expect HLSL compilers in the future to be able to compile for many different language syntaxes, the same way that GNU C can compile C++, Fortran, Java, and many other languages.
 
Back
Top