cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

niexuchina
Journeyman III

How many pixels are shaded at the same time?

GPU has many cores. I wonder whether several pixels are shaded at the same time, or all cores are always used to shade a single pixel.

0 Likes
6 Replies
nou
Exemplar

IMHO theoreticaly radeon 5870 can shade 20*16 pixels on the same time as each one 5D unit take one pixel.

0 Likes

Here’s an answer, maybe a little overly complicated:

 

Each shader core or “stream processor” works on a different pixel independently  at the same time. The exact number of pixels “in flight” or being shaded at the same time varies on the how many pixels are using the same shader code, the amount of conditional branching, and other factors. Stream processors are arranged in groups called “SIMDs” (single instruction, multiple data). All of the stream processors within a SIMD execute the same VLIW (very long instruction word) at the same time. VLIW’s are actually made up of multiple instructions that can get executed in parallel on the individual ALU’s of the stream processor.  On the current generation of ATI hardware, there are 16 shader processors per SIMD, so each runs the same code with different data. This means there are 16 threads running at any given time on a SIMD. The GPU time slices the thread execution on SIMDs  so that they run 4 groups of threads per SIMD. This makes a total of 4 x 16 = 64 threads per SIMD over a period of 4 clock cycles. This group of 64 threads is called a “wavefront”.  Different GPU versions in the 5800 series have different numbers of SIMDs which allow the high end GPUs to run more wavefronts than the low end GPUS. The 5870 has 20 SIMDs which means it can run 20 x 64 = 1280 threads over 4 cycles, or 20x16 = 320 threads at any given instant. So the maximum number of pixels that are being processed at once on a 5870 is 320, or 1280 time-sliced over 4 cycles. Keep in mind the VLIW can be executed in parallel across the 5 ALUs in the stream processor, so the rate of processing can be up to 5X, however it’s unlikely that all of the instructions in the shader will be able to use all of the ALUs in the stream processor at once.

 

Anandtech has a good article on the 5800 architecture: http://www.anandtech.com/show/2841/4 and http://www.anandtech.com/show/2841/5

 

 

0 Likes
niexuchina
Journeyman III

Thank you all.

But how many vertices can be processed at the same time?

0 Likes

many. just like pixels.

0 Likes

In theory the same number.

 

The shader processors can either work on vertices or pixels. Typically the GPU determines how many shader processors will work on vertices and how many will work on pixels, based on the workload.

 

0 Likes

Thank you all.

0 Likes