Ian Romanick wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I've been digging through the softpipe code in gallium for the past few > days. I think I'm starting to "get it". I do have one question about > the way quads are processed. > > It looks like the triangle setup code produces a row of quads and passes > them off, one at a time, to the fragment shader. The fragment shader > then does the attribute interpolation and passes the fragments to the > real shader. Is that correct? > > It seems like instead we'd want the setup code to produce large groups > of quads with all of attributes pre-interpolated. Each quad would be > tagged with some ordering information. The shader code could then > process quads however it wanted as longs as the tagged ordering > information was respected. This would allow a few things: > > 1. Group quad processing to better use the tile cache. > > 2. Trivially distribute quad processing to multiple CPU cores (not just > on Cell, either). > > 3. If the shader doesn't modify Z values, early Z culling could be > performed. > > I don't see any easy way to achieve this with the current code. Am I > missing something, or is this a place where I could jump in and help?
For multiprocessing I think we'll do things at the granularity of tiles, not quads. That is, a processor will get a batch of triangles and a tile position, then render those triangles into that tile. Roughly: render_batch(triangles, tilex, tiley) { get_tile_color_and_z(tilex, tiley); set_scissor_to_tile_bounds(); render_triangles_into_tile(); put_tile_color_and_z(tilex, tiley); } As for attribute interpolation, that's something that can be done with a few extra instructions prefixed onto the fragment shader. Eventually, we'd like the whole quad pipeline (shading, z/stencil, blend) to be done with dynamically generated code. Then the triangle rasterizer itself, etc. -Brian ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev