cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

gmtan
Journeyman III

pixel shader or compute shader

Why do most of examples in Streaming SDK use pixel shader (ps), not compute shader (cs)? What are the advantage or limitation of CS mode?

0 Likes
4 Replies

CS mode available only from HD 4000, PS can be used even on HD 2000, SDK examples were written ages ago.

As for limitations -- CS doesn't supports color buffers but supports LDS.

And no point at all to use PS with HD 5000.

0 Likes

SDK implements matrix multiplications with PS and CS, respectively. I run the programs on HD4870X2. It seems that PS outperforms CS....

0 Likes

that CS allows all registers (AFAIK 1024) to be used whereas PS only allows max 160 registers because of graphics this and that which really limits the use of register, I read it somewhere in this forums moments ago

that CS example is not the what so called "optimized" one

0 Likes

gmtan,
The compute_matmult is not optimized in the same manner as the pixel shader. The main issue is that pixel shader has a natural blocking of threads in a wavefront, 8x8 z-ordering. This aligns with the texture cache quite well, but the CS uses linear ordering, which does not align to cache well at all. The compute shader version has the possibility of higher peak performance but is not written in a manner that does so.
0 Likes