An interview with Alex Chow on Cell Programming models (he mentions Cg..?)

Jawed said:
DeanoC's implication appears to be that Cg makes for a very good Vector C programming language.

Since Cell's design is so strongly focussed on vector processing, Cg seems to make a good match. Regardless of whether the code is for graphics or physics etc.

Jawed

Oh okay, so more than likely they are using it then.

Cool.:cool:
 
Does it matter though? Whether they're writing in C, C++, Cg, Fortran, PASCAL, hex-code or the Aztec language N'ahuatl, who cares as long as it's a good game?
 
Just a Few simple questions if i may??

1. Does it mean that Cell is not as difficult to program because its using this Cg thing???

2. What does it mean to the GAMES???
 
Jawed said:
DeanoC's implication appears to be that Cg makes for a very good Vector C programming language.

Since Cell's design is so strongly focussed on vector processing, Cg seems to make a good match. Regardless of whether the code is for graphics or physics etc.

Jawed
On the other hand, does Cg support objects?

Jawed
 
Shifty Geezer said:
Does it matter though? Whether they're writing in C, C++, Cg, Fortran, PASCAL, hex-code or the Aztec language N'ahuatl, who cares as long as it's a good game?
I thought it was fairly obvious that the Cell BE will be programmed using C/C++ with some inline assembly and that RSX will have shader code generated by Cg. That is, until I read this thread. :smile:

I'm completely lost as to what is being discussed. Are people thinking that Cg will be used to program Cell? If so, why? Why not use GCC?

EDIT: I am really hoping this is all just confusion as to what Cg is/does. Think Microsoft HLSL, or even GLSL if you must. Think Visual Studio (to some extent).
 
mckmas8808 said:
Are you guys using Cg on the Cell?
Just to point out the confusion, I will use this question.

If DeanoC answers "yes," what will you take that to mean? That Cg is being used to program Cell itself or that they have CgFX and the Cg compiler running on Cell and its operating system?
 
wireframe said:
Just to point out the confusion, I will use this question.

If DeanoC answers "yes," what will you take that to mean? That Cg is being used to program Cell itself or that they have CgFX and the Cg compiler running on Cell and its operating system?

I think it's fairly clear he's asking if they're compiling Cg "shaders" to run on Cell. That's really what we're talking about here. The reason you might want to do this is if you had a set of shaders for RSX, and wanted to, for example, do some vertex shading on the CPU, you could compile to it from the same Cg code instead of writing new SPU C, or whatever. Maintain one set of code to compile to two chips.
 
Also LS management could be problematic in Cg, unless it's extended in some way. Hmm... "unoptimised" sounds like the norm for code running under those conditions.

Jawed
 
Titanio said:
I think it's fairly clear he's asking if they're compiling Cg "shaders" to run on Cell.

Yes this is what I was trying to ask. I wonder if DeanoC and the guys are doing exactly this.
 
So, the whole mystery is if the Cell will be used to augment RSX in shading and if the Cg compiler has been "tuned" to make this happen?

I must confess that I am not sure why this notion gets so much attention. Is there a general feeling that the vertex processors on RSX won't be enough? If you look at the proposed specs of RSX and its processing-to-bandwidth ratio, I'd say that there will be time for running shaders aplenty. Please enlighten me.
 
wireframe said:
So, the whole mystery is if the Cell will be used to augment RSX in shading and if the Cg compiler has been "tuned" to make this happen?

I must confess that I am not sure why this notion gets so much attention. Is there a general feeling that the vertex processors on RSX won't be enough? If you look at the proposed specs of RSX and its processing-to-bandwidth ratio, I'd say that there will be time for running shaders aplenty. Please enlighten me.

I'm not a programmer or anything, but honestly it's the lack of RSX information that has me thinking these crazy thoughts. It makes me feel like the RSX will be kind of a let down, so I'm trying to see if the CELL can help a little.

I hope I'm wrong.
 
mckmas8808 said:
I'm not a programmer or anything, but honestly it's the lack of RSX information that has me thinking these crazy thoughts. It makes me feel like the RSX will be kind of a let down, so I'm trying to see if the CELL can help a little.

I hope I'm wrong.
A bit OT, but if you are subconsciously doing "damage control" for what you feel may be an inferior product, wouldn't this "solution" eat into other arguments that you may be having that Cell "is not all that"? Let's say you use Cell to augment RSX in this way, you'd be taking processing power away from Cell to do something else. See what I mean? ;)

I don't get the feeling that RSX will be a let-down at all. If so, how? Compared to Xenos/C1? I choose to look at it this way: If Nvidia provided the graphics for the original Xbox and that worked out so that many thought it had the best graphics in its time, why wouldn't Nvidia be able to pull this off again? Just because it's the Playstation instead of Xbox doesn't mean Nvidia suddenly lost its marbles. In fact, I would argue the other way around. Now you can get a "pure" Nvidia solution that includes Cg because Microsoft is out of the picture. OpenGL is Nvidia's home base and there are no rolled in politics to use DirectX instead. That may not be necessarily better, but let's wait and find out, shall we? :smile:
 
Oh I feel you are right, I'm just losing my mind waiting on this RSX information. I want to be wrong trust me, but I just really need some information on the RSX.
 
RSX is fast

mckmas8808 said:
Oh I feel you are right, I'm just losing my mind waiting on this RSX information. I want to be wrong trust me, but I just really need some information on the RSX.

Do not fear my friend RSX is fastest according to many developers including Xbox360 developers. RSX, if based on G70, is based on very efficient and proven design and in closed box environment will be fully utilized unlike in PC environment where game software is generic and not optimized.
 
mckmas8808 said:
Oh I feel you are right, I'm just losing my mind waiting on this RSX information. I want to be wrong trust me, but I just really need some information on the RSX.

You might end up in an insane asylum if Sony does what I think they'll do (i.e. not release information all, so people will assume PS3's graphical prowess has to do with Cell -- furthering of marketing never hurts). We'll probably have it trickle out sooner or later, but I wouldn't expect the information to come from Sony.
 
Bobbler said:
You might end up in an insane asylum if Sony does what I think they'll do (i.e. not release information all, so people will assume PS3's graphical prowess has to do with Cell -- furthering of marketing never hurts


NOOOOOOOO!!!!!
 
wireframe said:
So, the whole mystery is if the Cell will be used to augment RSX in shading and if the Cg compiler has been "tuned" to make this happen?

I must confess that I am not sure why this notion gets so much attention. Is there a general feeling that the vertex processors on RSX won't be enough? If you look at the proposed specs of RSX and its processing-to-bandwidth ratio, I'd say that there will be time for running shaders aplenty. Please enlighten me.

How about seeing it this way. What exactly is enuff? Do we even know Sony's goals? Maybe the RSX isn't enuff for what Sony and their devs want to do for next-gen gaming.

This does not automatically mean its not up to par or beyond the Xenos.
 
mckmas8808 said:
Are you guys using Cg on the Cell?
Nope not at the moment but we (NT) have a Cg parser in the archived codebase from Xbox days so we probably could, of course without a bucket load of optimisations it would suck. But if one guy (Simon when he worked with us at JAM) could write one, why couldn't a big corp like Sony.

For why you would want to... the honest truth is that C and SIMD code don't mix. Quite frankly GCC (and VC) suck at it, so if you do any vector maths you usually end up doing it in intrinsics which is basically a macro assembler. HLSL/Cg are better designed for vectors so it much easier not to end up in intrinisics.
 
Would there be much value in Sony investing resources into a specific version of Cg for RSX? Or would the standard compiler be pretty much as good for it as it could be?

I ask because Sony does seem to have put people onto Cg compiler optimisation and the like. Will there be a specific RSX version? Of course, they may also be looking into a Cell version too.
 
Cg provides benefits that raw C programming doesn't because you can use the effects framework stuff to describe effects and a semantic linkage between variables in shaders and in GUI effects editors. You see this in Microsoft's FXC. It's good that artists don't need to hack C code to edit essential effect parameters and can use high end 3D modeling tools to tweak shaders.

But Cg could also be extended, to support DirectX10 features like geometry shaders. These geometry shaders would then be compiled via the Cg compiler to run as an SPUlet. You'd do vertex and geometry shading for some objects, and the Cg compiler/runtime would transparently decide whether it needs to run on the SPU+GPU or just the GPU. Don't forget Cg is also a runtime interface to OpenGL and not just a parser.

You wouldn't run general purpose SPU code in Cg, but code that conforms to well known stream-based algorothms could have an execution model in Cg where it would be efficient to write code using that language (e.g. Geometry Shaders)
 
Back
Top