On 11/26/2012 02:58 PM, Paul Berry wrote:
On 20 November 2012 21:40, Kenneth Graunke <[email protected] <mailto:[email protected]>> wrote:+ unsigned dispatch_width; /** 8 or 16 */ + While we're at it, why don't we make it const? That will prevent us from accidentally modifying it at some inoppurtune time, and it *may* even cause the compiler to generate more efficient code. Note: if we do that we'll have to use the C++ "initialization list" syntax to initialize it, e.g.: fs_visitor::fs_visitor(...) : dispatch_width(dispatch_width) { ... }
Oh, good idea! I didn't know you could do that. For fs_visitor, it makes sense as it should never change. After the split, I can't make it const in fs_generator, since I actually do modify it.
Consider it done. _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
