On 10/15/2013 05:42 PM, Anuj Phogat wrote: [snip] >>> + /* WM will be run in MSDISPMODE_PERSAMPLE. So, only SIMD8 mode will be >> >> Looking at the docs for 3DSTATE_PS, I believe that SIMD16 is allowed in >> some cases... >> >> SNB: Must be SIMD8 only. >> IVB: >> - 4x MSAA: Either SIMD8 or SIMD16 should work. >> - 8x MSAA: Must be SIMD8 only. >> >> Maybe I'm crazy, though...I haven't looked into it too closely... >> > Yes, you're right. I should have explained it here that I've chosen > to use 'SIMD8 only' for 4x and 8x MSAA on both SNB and IVB. > I decided to use SIMD8 over SIMD16 in case of 4x MSAA after > reading following lines in IVB PRM vol 2, part 1, page 330: > "Object Size: If the number of very small objects (e.g., covering 2 > subspans or fewer) is expected to comprise a significant portion > of the workload, supporting the 8-pixel dispatch mode may be > advantageous Otherwise there could be a large number of 16-pixel > dispatches with only 1 or 2 valid subspans, resulting in low > efficiency for those threads"
I don't see any text on that page to indicate that SIMD8-only is advantageous for per-sample shading. You can actually program up to three pixel shader kernels in 3DSTATE_PS the GPU will dynamically select the best one based on the object size. Valid combinations are listed in the table on page 330. This means that if you have a small polygon which spans only a few pixels, it'll use the 8-wide program. But if you have a large polygon, covering a large area of pixels, it'll use the 16-wide (or 32-wide) program. Processing more pixels at a time amortizes the cost of instruction dispatch over twice as many pixels. This is why we always program both an 8-wide and 16-wide version, when possible. (We'd also like to experiment with 32-wide eventually.) > Do you have other reasons to suggest using SIMD16 for 4x MSAA > on IVB? At least with normal per-pixel shading, SIMD16 has proven to be a 10-20% performance improvement. So I think it's worth using where possible. --Ken _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev