An idea for graphics acceleration...

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

Post Reply
zyrixnet
Posts: 3
Joined: Wed Sep 26, 2007 5:03 am
Location: Winnipeg, Canada
Contact:

An idea for graphics acceleration...

Post by zyrixnet »

Well, I have a proof of concept here for applying graphics acceleration to the PS3 Linux platform. I have tried this out, and it appears to be functions perfectly. I am surprised no-one else thought about doing it this way...

I am sure everybody here is familiar with the X Window System, correct? You should also know that the X Server does not need to be on the same machine as the X Clients.

The X Server controls the GPU(Graphics card), Monitor, Keyboard, and mouse.

What I have done, is on my Debian box, I opened up a blank X Server with -ac option.
I then connected to my PS3 via SSH, I directed the DISPLAY variable to my debian box with my nice nVidia card.
I opened up an xterm, and started up a gnome-session.

I was using my PS3 at my LCDs native resolution, now if only I had a 1Gbit network card in my PC, and a 1Gbit switch, everything would be great.
What I am getting at, is that you do not need access to the RSX chip, you can run the X Server elsewhere where the graphics chip is supported, since the apps are working on the PS3, you can code and test your Cell Processor apps with your PCs graphics card.

I am sure if you beg to Sony enough, they might just close the door on "Other OS" completely. The community has already upset some developers because we are begging for this and that too much. All Sony needs to do is release a firmware update with no information that it will disable the Other OS.

Another cool idea would be to create a small embedded system with a 1Gbit NIC, an X Server, and a really good GPU. Then, what we can do developers is connected this nice embedded system to the PS3 and plug a nice regular LCD monitor to the embedded system for full graphics and processing ability. Thus we can make our homebrew, or at least test it out. Sony will open the RSX one day, rushing them won't really help too much. As I always say, there's always an alternative method for doing something.

I guess you can just say, the embedded system is just a dumb X Terminal with a wonder graphics chip. The PS3 will do all the processing, while the dumb X Terminal does all the GPU stuff.

I'm going to get a 1Gbit Network card for my Linux box, and connect the PS3 directly to it via cross-over cable and report any information on the graphics results, FPS, etc...

If anyone out there has a 1Gbit network card already in their PC, please try this out and see if the results come out good.

I hope this information helps and gives some ideas on what we can do about the graphics on PS3 Linux at this very moment in time.

Any comments welcomed, good or bad.
PSN ID: chronoboy<br>"PlayStation 3 -- The next generation server at your company, or your kid's next generation video game console. You Decide!"<br>PlayStation 3, what can it not do?
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

Why wouldn't you just hook such a computer directly to your TV?

Using a PS3 in such a setup is utterly pointless.

There are always people whining for things in any community, especially ones that involve video games and consoles. Our approach is to ask for information regarding certain features and if we don't get any we go and try to find our own way to get what we want.

The ball regarding 3D (or even better 2D acceleration) rests in Sonys court they just have to know that if they do nothing someone will eventually want it enough to find their own way to do it. If and when that happens I doubt it would be in a manner that would make Sony happy.
zyrixnet
Posts: 3
Joined: Wed Sep 26, 2007 5:03 am
Location: Winnipeg, Canada
Contact:

The idea would be...

Post by zyrixnet »

The idea would be that you can still use the Cell Processor, while using your computers video card. Because hey, if I want to render something, I wouldn't mind using the Cell and my Video card for the render process over a 1Gbit link.

Although I do understand what you are saying, as far as real PS3 2D and 3D acceloration.
PSN ID: chronoboy<br>"PlayStation 3 -- The next generation server at your company, or your kid's next generation video game console. You Decide!"<br>PlayStation 3, what can it not do?
ldesnogu
Posts: 94
Joined: Sat Apr 17, 2004 10:37 pm

Re: An idea for graphics acceleration...

Post by ldesnogu »

zyrixnet wrote:If anyone out there has a 1Gbit network card already in their PC, please try this out and see if the results come out good.
Let's do some optimistic math: let's say your 1 Gbit network can deliver 100 MB/s.
A full HD picture is 9MB so at most you will get 11-12 FPS if you use it directly.

So basically your setup disqualifies any use of rendering done on the PS3. All should be done on your powerful X terminal. But I am afraid that even in that case the bandwidth won't be enough if your scenes are too dynamic (think of textures, display lists that change every 3 or 4 frames, etc.).

I think your idea will work, but not for real-time stuff (after all the same setup has been used for dozen of years: supercomputers hooked up to graphics terminal; but not for gaming).
Laurent
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

The ball regarding 3D (or even better 2D acceleration) rests in Sonys court
They are already working on 2D acceleration. They haven't given an ETA but it's in progress.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

spu-medialib migth be extended to handle 2d acellerations if people just start working on it :)

currently it only has 2d video acellerations
Don't do it alone.
hpux735
Posts: 1
Joined: Tue Nov 06, 2007 3:29 pm

Re: An idea for graphics acceleration...

Post by hpux735 »

ldesnogu wrote:
zyrixnet wrote:If anyone out there has a 1Gbit network card already in their PC, please try this out and see if the results come out good.
Let's do some optimistic math: let's say your 1 Gbit network can deliver 100 MB/s.
A full HD picture is 9MB so at most you will get 11-12 FPS if you use it directly.

So basically your setup disqualifies any use of rendering done on the PS3. All should be done on your powerful X terminal. But I am afraid that even in that case the bandwidth won't be enough if your scenes are too dynamic (think of textures, display lists that change every 3 or 4 frames, etc.).

I think your idea will work, but not for real-time stuff (after all the same setup has been used for dozen of years: supercomputers hooked up to graphics terminal; but not for gaming).
Almost, but not quite.

If the PS3 were sending fully-rendered frames then sure, 1Gbit is insufficient for full frame rate HD video.
However, if the frames were fully rendered in the PS3 then we wouldn't need 3D acceleration, would we?
All that would need to be done is dump it to the framebuffer.

However, the approach given transfers the drawing commands over the network and they are things such as "glVertex3f..."
calls and are rather efficient in terms of aggregate bandwidth, especially when you use things like vertex buffer arrays, and drawing lists.

The problem then becomes that of the delay it would take to load textures and vertex lists across the network.
This would be a one-time expense per texture and easily hidden through the use of creative programming.
Remember that OpenGL was designed in an era in which the computation was done in a different room,
or even building, than the display hardware (19" rack of specialized SGI hardware).

All told, great idea xyrixnet. I'm sure that I'll be using this technique extensively.
ldesnogu
Posts: 94
Joined: Sat Apr 17, 2004 10:37 pm

Re: An idea for graphics acceleration...

Post by ldesnogu »

hpux735 wrote:
ldesnogu wrote:
zyrixnet wrote:If anyone out there has a 1Gbit network card already in their PC, please try this out and see if the results come out good.
Let's do some optimistic math: let's say your 1 Gbit network can deliver 100 MB/s.
A full HD picture is 9MB so at most you will get 11-12 FPS if you use it directly.

So basically your setup disqualifies any use of rendering done on the PS3. All should be done on your powerful X terminal. But I am afraid that even in that case the bandwidth won't be enough if your scenes are too dynamic (think of textures, display lists that change every 3 or 4 frames, etc.).

I think your idea will work, but not for real-time stuff (after all the same setup has been used for dozen of years: supercomputers hooked up to graphics terminal; but not for gaming).
Almost, but not quite.

If the PS3 were sending fully-rendered frames then sure, 1Gbit is insufficient for full frame rate HD video.
However, if the frames were fully rendered in the PS3 then we wouldn't need 3D acceleration, would we?
All that would need to be done is dump it to the framebuffer.

However, the approach given transfers the drawing commands over the network and they are things such as "glVertex3f..."
calls and are rather efficient in terms of aggregate bandwidth, especially when you use things like vertex buffer arrays, and drawing lists.

The problem then becomes that of the delay it would take to load textures and vertex lists across the network.
This would be a one-time expense per texture and easily hidden through the use of creative programming.
Remember that OpenGL was designed in an era in which the computation was done in a different room,
or even building, than the display hardware (19" rack of specialized SGI hardware).

All told, great idea xyrixnet. I'm sure that I'll be using this technique extensively.
I think you or I misunderstood the original poster.
My understanding is that he wants the rendering to be done on the PC because the PS3 does not have HW acceleration available when running Linux. In that context what you describe would not work, unless (and it's another topic) you use the SPUs for the rendering and in that case I don't see what benefits there is from sending commands from the PC :)

Anyway in your context, you would not use your PC gfx card, while zyrixnet wrote:
The idea would be that you can still use the Cell Processor, while using your computers video card.
Did I miss something?
Laurent
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

And so it begins.

Tonight im starting work on an EXA compatible spu to further extend the spu-medialib portfolio, last night i uploaded several new spu accellerators for yuv420->yuyv2 and to argb + yuv422->argb functions.

I do not att all intend to work on anythnig related to the EXA it self. However i will make functions that can do EXA (not including composite to start with) so this is perhaps a call to anyone not intending to work on spu's but intend to help work on the cell be that knows something about X.

cheers
Don't do it alone.
Axon
Posts: 1
Joined: Sat Nov 17, 2007 11:37 am

Re: An idea for graphics acceleration...

Post by Axon »

zyrixnet wrote:What I have done, is on my Debian box, I opened up a blank X Server with -ac option.
I then connected to my PS3 via SSH, I directed the DISPLAY variable to my debian box with my nice nVidia card.
I opened up an xterm, and started up a gnome-session.

I was using my PS3 at my LCDs native resolution, now if only I had a 1Gbit network card in my PC, and a 1Gbit switch, everything would be great.
What I am getting at, is that you do not need access to the RSX chip, you can run the X Server elsewhere where the graphics chip is supported, since the apps are working on the PS3, you can code and test your Cell Processor apps with your PCs graphics card.
This approach sound like it could have potential to exploring the PS3 GPU using a different driver??? Is it possible to use the remote system to probe the GPU caps?
wot me worry
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Re: An idea for graphics acceleration...

Post by jimparis »

Axon wrote:This approach sound like it could have potential to exploring the PS3 GPU using a different driver??? Is it possible to use the remote system to probe the GPU caps?
No, what he has done is just normal X forwarding, and "exploring" or "probing" any of the PS3 hardware is nonsense in this context.
d-range
Posts: 60
Joined: Fri Oct 26, 2007 8:22 pm

Post by d-range »

Its an interesting idea but you will still end up with (HW assisted) indirect rendering. It's faster than software rendering, but don't expect performance anywhere near what direct rendering would achieve. For real-time interactive applications you also have to factor in input delay, network latency, etc.
Post Reply