NVIDIA Cg Compiler Technology to be Open Source
Jim Norton writes "This announcement from nVidia states that
their Cg compiler technology for 3D applications will be Open Source and available under a free, unrestrictive license. The ETA for this is in August and will be available here." The linked company release says it will be under "a nonrestrictive, free license," but does not give further details. BSD?
Money talks. If you like what they are doing, tell them you like it by buying one of their cards.
What's a "Cg compiler"
Cg compiler stands for "C for Graphics"
People who write pixel shaders ( those nice little algorithms that makes games pretty ) for things like fog effects, lighting etc have to use some low level assembly ( which is sometimes tied to the card as well ). This will allow for a higher level language so you can use do loops, for next etc. with writing shaders and for possible expanded ( cross card ) support
I've been coding in Cg for some time, there have been a number of problems I've faced so far:
1. The vertex engine calls are not logical. Sometimes you call passing a referenced pointer, other time you have to pass a referenced strucute, some form of standarization to calls would have made it easier for developers to write function calls (more insane than POSIX threads).
2. The lanugae is not truely Turning complete. Which could have been fixed by taking some more time and making the language more complete.
3. The compiled bytecode is giving a security mask that disables it's use on chips that do not carry a compliment decoder (To keep competetors away?).
4. Confusing definitions of pointer/references. They could have made this easier by removing the entire pointer usage.
5. Class calls outside of friend functions can at certain times reach memory outside of parent definitions (Bad language design?! I think this is one of the most debated feature/bug, since you can piggyback this to implement vertex calls within lighmaps).
6. No SMP support in current implmentation and no thoughts to future support (What about threading?!).
7. Inlining support is bad and possibly unusable outside the scope of inling cg within c.
Some of the best news is that they've openly said they'll include support for ATI and other large manufacturers of competing graphics products. I'm glad to see that Nvidia isn't being closed-minded or trying to undermine their own intentions for ease of development by using the proprietarity card.
I'm in a field totally different from graphics programming and hardware, but:
In my reading of earlier coverage of Cg, my understanding that most people weren't concerned about Cg or its compiler being open source, but rather that Cg would depend to some extent on hardware specs that are proprietary. This would have the effect of driving other hardware competitors out of business because they can't implement Cg components because of hardware patents. Sort of similar to fears associated with MS open sourcing part of C# while keeping a good deal of it dependent on proprietary stuff. The fear is that Cg would lead to people saying things like "well, your video card is so crappy it doesn't even support a standard graphics programming language" (all the while being unaware that the card can't because of hardware patents). Just because the language and compiler is open-source doesn't mean the hardware it will run on is.
Anyone more knowledgable care to comment? Am I misunderstanding this?
I'm not sure if it will help, but you can read more about Cg Here.
File under 'M' for 'Manic ranting'
i would really love to give some witty comments here -- but am at a loss of words. which could be fixed by thinking up a few words to form a witty comment with.
My life in the land of the rising sun.
Practically, Cg is less useful than RenderMonkey because it is readily integrated into popular graphics packages.
However, there are some pretty good potential there, to make a Cg plugin for everything under the sun.
Controlling the Shader Language standard is almost as important as making a better video card, as you'll have a feature set your competitors have to follow - if Cg becomes the most popular language, then NVidia can say on their marketing material "GeForce 10: 100% Cg compatible, Radeon 50000: only supports 80%".
Nvidia, if you're reading this, please read.
For as long as I remember, the #1 complaint from the open source community has been the lack of open source X drivers, and the lack of documentation for directly accessing the hardware.
This still isn't direct access to the hardware is it? This is an API that goes through a compiler that translates things into machine code. Absolutely no real access to speak of.
Sometimes I wonder if nvidia cards are truly the hardware marvels that they are. Their implementation sort of reminds me of Play Incorporated's snappy video snapshot, where the hardware functions and bios get's loaded by an external program. I don't know if this is the exact case with nvidia hardware, but i'm pretty sure i'm not that far off the mark.
If that really is the case, it means that TNT2 cards are capable of all the neat tricks gforce cards only alot slower. I can see why you wouldn't want it opened up to the public. What's to stop a competetor from using the same hardware/software implementation you are?
I don't think it would seriously put a dent in the bottom line however. People tend to keep loyaltee's towards a company if it doesn't fuck their customers. Look at how many hits a day voodoofiles.com gets!
So be bold and daring like the new dorito's. Let other companies mimic your techniques, and try not to worry about the bottom line so much. If you let a bunch of open source guru's hack on your code, you could fire a few of those internal programmers thereby making up the cost. If you do this, anytime a relative, friend, customer asks us what 3d card solution they should get, we will respond NVIDIA.
yours truly
--toq
The positive by NVIDIA so far is that they licensed technology from someone else to construct their drivers and hardware, and they are not at liberty to release open drivers. Fine, that's something I can accept for now.
What I'd really like to know is, as they move forward to new hardware and new drivers and new technologies, will they do so with the free software philosophy in mind, so that they can be more open about their work, and help the community adopt their hardware on other platforms than Windows, Linux, and MacOS.
Certainly, if they release this compiler under a free license, then that's a good first step, because it could mean that they recoginize the value of free software and how it aids the spread of technologies to new platforms, not to mention how good free interfaces can become standards. Seems clear that NVIDIA would like to be the new SGI, settings the standard by which graphic innovation is defined.
Curmudgeon Gamer: Not happy
They have kick-ass products that officially support my platform of choice. 'Nuff said. :-)
Karma whorin' since 1999
ATI will be providing plug ins to compile Renderman or Maya code to run on its Radeon 9700 rather than on the central processor. Although not directly competing with Cg, this does seem to be a much better approach. Provided of course that you could take your 'binaries' from Renderman/Maya and use them in your video game or whatever.
Bryan
Yes, you can do pixel and vertex shaders on the CPU, but it will make the application so slow as to be unusable.
Don't think that your 6 year old TNT2 card will become some magic speed demon if nVidia gives you driver source. It won't. Your argument is akin to saying, "Intel, give us the internals to the P4. I know I can make my 80286 run all new code if you do!"
It's important to make the distinction here. nVidia has opensourced the parser and compiler for CG, but they control the language. Look at it this way, nvidia needs something to show off NV30 with, and CG will be the thing to do it. This is in direct competition with the opengl 2.0 and DX9 HLSLs though, and you can bet that they won't be steering CG in any directions favorable to their competition like ATI or 3DLabs. It's fine if nVidia wants to do their own thing, but realize that this cg isn't nearly as open as the "opensource" headline makes it sound.
Since when do I need any sort of excuse - like encouraging Cg - to buy an Nvidia card? I needed an excuse?
I'm the stranger...posting to
Don't think that your 6 year old TNT2 card will become some magic speed demon if nVidia gives you driver source.
Did I say that? I thought I said...
If that really is the case, it means that TNT2 cards are capable of all the neat tricks gforce cards only alot slower.
Please read comments before replying, thank you.
--toq
Wow. This is so off base its not even funny. This has nothing to do with vector code. Any given Cg program is highly non-vectorizible. They have a very limited number of inputs and only one output. Sure, multiple vertex units can run the same vertex program on different verticies (or pixel shaders can run same pixel program on different pixels) but a vectorizing compiler has nothing to do with it. Besides that fact, a C compiler is quite a leap away from a Cg compiler. We're talking about a machine that can't do loops properly...
A deep unwavering belief is a sure sign you're missing something...
Great another raving looney :P
Well, I used to work with the guys from play inc. One of them basically explained how the snappy video snapshot worked.
Their custom chip was sort of combination of rom/ram and logic. The rom acted as a bootstrap for basic parrelel port communications. The ram would store code downloaded via the parrelel port, and the logic would chew on that.
Basically the snappy never really got any REAL upgrades to the hardware. (note this is where nvidia and play differs, nvidia adds faster hardware) Versions 1 2 and 3 of the snappy were all nothing more than "soft upgrades"
I think nvidia cards work in the same fashion, that's why we see such an performance increase between driver releases because the actual chip logic is loaded at boot.
1. Preboot, vga compatible mode
2. Boot, load custom OS specific hardware register code
3. Load OS specific driver for glue between the OS and the hardware (which is really software)
There is only so much you can do from calls to the OS for speed. If on the otherhand you could "soft upgrade" the hardware on boot, everytime you optimized that boot software a little more, it would stand to reason that the card would run faster.
So basically if you wanted to add that "gwhiz AA x4" feature to your card, you could write it in software, and load it into your card at boot.
Like I said earlier, nvidia open sourcing it would probably lead to a lot of the newer cards features being found on older cards, only a helluva lot slower. This too, is a reasonable assumption because the hardware is slower. It's no less capable of running the same code though.
Hope that clears things up.
NVidia cannot release the source code due to parts which are not belong to them (they belong to SGI and other parties)...
BUT - do you really think that ATI or Matrox cannot reverse engineer the driver? Go ask Matrox engineer and they'll swear that NVidia reversed engineers Matrox's binary only driver for dual head and thats how NVidia got dual head (at least thats what one of Matrox engineers told me)
Hetz (Heunique)
I'll try to sum it up for you in simple terms, since you can't seem to grasp the concept.
TNT2 doesn't have the transistors to do hardware transform and lighting. It can't do pixel and vertex shaders. Those can only be done in dedicated hardware or on the CPU. No amount of driver source code will change that.
Via proper software drivers (OpenGL and/or DirectX) TNT2 cards can *already* run games that use pixel and vertex shaders. It's just that since the card is offloading all of those calcuations to the CPU the programs are intolerably slow.
Please take your random thoughts to logical conclusions before posting insipid open letters to corporations.
There is no way you could write a new driver for a TNT2 card that would allow it to do those advanced features. Give up the pipe dream. A programable pipleline graphics card != a simple video convertor box. It doesn't matter how much you believe that the hardware/software design behind a Snappy can be transfered to a video card, it just isn't going to work.
Why bother.
Microcode updates? Bios Updates? Programmable Grid Arrays? Ever hear of any of these? Probably not.
I won't flame you, you obviously don't know enough about hardware to make any logical conclusions yourself..
NVidia cannot release the source code due to parts which are not belong to them (they belong to SGI and other parties)...
SGI has said, on a number of occaisions, that they are not at all involved in keeping the nVidia driver closed source. They have also stated that they are in favor of open sourcing the driver.
Dinivin
"Now if only they would do the same with their drivers!"
I known someone who once worked for MetroLink. He was part of the team that was writing the NVidia device driver for Metro-X. They were a source licensee, under NDA, yadda yadda, so they had access to the NVidia driver source.
He said that the NVidia driver source is highly coupled with the chip design. Apparently, the NVidia driver people have intimate knowledge of the hardware design, and take advantage of it. This lets the driver exploit as much of the hardware's potential as possible. However, it also means that the driver has specific knowledge of the hardware design.
Given that NVidia's sole business is chip design, you can bet that they will never release source for that driver. It contains too much of their business. (No, it is not a chip schematic, but that isn't the point. It contains enough to make their lawyers unhappy.)
For better or worse, that is the way it is with NVidia. If you do not like it, do not buy their cards.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
Matrox engineers probably would claim that at this point. Basically dual head technology is old news and anyone can make a dual-headed card. This isn't nvidia's bread and butter and never was, so I doubt they took the time to reverse engineer Matrox's stuff.
It's a wonder Matrox is still alive in this day and age. Sure, they have what is considered the best 2d card of all time, and that's nice for OEMs and a handful of windows-using graphic designers, but the margins just aren't there. They lost the 3d race more than 5 years ago. ATI is barely keeping up and their driver quality is too poor to help them win.
Nvidia just owns the 3d market now, have for the last 2 years or more.