Hacker News new | past | comments | ask | show | jobs | submit login

Several titles probably did it (I only know of one for sure) but it does not mean it's any good technique.

You see, on PS3 GPU there are no pixel shader constant registers. This means you need to patch shader code if you want any alterations in your pixel shader. A naive approach, with patching on CPU when submitting every primitive, is horrendously slow because the CPU sucks at moving large amounts of data. A slightly faster approach, using the GPU DMA, is still unbelievably slow, because even though the GPU moves large amounts of data very quickly it takes a lot of time to switch between pushing triangles to copying mem ranges and back. Luckily, on the PS3 there are also SPUs, pretty good at moving large amounts of data and having no penalty for doing so. Patching shaders on SPUs is so fast you forget about it. Also very easy to write.

So the mind boggles when you see people using GPU patching and, to somehow save peformance, do some complicated scheme with occlusion culling via SPU.




Wait, really? Isn't the RSX a DX9-class GPU? How does it not have any constant registers?


No version of DX mandates any specific hardware architecture. Otherwise you would not be able to run DX9 games on modern hardware that also does not have constant registers.


It coud be that all nvidia drivers (for pc) that is we're doing constant patching with some clever caching behind the driver.


Indeed. There is a reason the draw primitive rate is so different on the PS3 and a PC with the same GPU.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: